ERXMemoryMigrationLock Class Reference

Inherits er::extensions::migration::IERXMigrationLock.

Collaboration diagram for ERXMemoryMigrationLock:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ERXMemoryMigrationLock ()
void setVersionNumber (EOAdaptorChannel channel, EOModel model, int versionNumber)
boolean tryLock (EOAdaptorChannel channel, EOModel model, String lockOwnerName)
void unlock (EOAdaptorChannel channel, EOModel model)
int versionNumber (EOAdaptorChannel channel, EOModel model)

Protected Member Functions

int initialVersionForModel (EOModel model)

Private Attributes

NSMutableDictionary< String,
Integer > 
_modelVersions


Detailed Description

This stub exists to make memory migrations work.

Author:
mschrag

Constructor & Destructor Documentation


Member Function Documentation

int initialVersionForModel ( EOModel  model  )  [protected]

void setVersionNumber ( EOAdaptorChannel  channel,
EOModel  model,
int  versionNumber 
)

Sets the current version number of the named model.

Parameters:
channel the adaptor channel associated with this process
model the model to set version information on
versionNumber the new version number

Implements IERXMigrationLock.

boolean tryLock ( EOAdaptorChannel  channel,
EOModel  model,
String  lockOwnerName 
)

Attempts to retrieve a lock on the migration process for the named model. A lockOwnerName is provided that provides a simple mechanism to recover from a stale lock. If the lock owner name passed in matches the current lock owner name, then the lock is acquired.

Parameters:
channel the adaptor channel associated with this process
model the model to try to lock
lockOwnerName the name of the lock owner
Returns:
true if the lock was acquired, false if it was not

Implements IERXMigrationLock.

void unlock ( EOAdaptorChannel  channel,
EOModel  model 
)

Unlocks the given model. This should only be called if you acquired a lock with tryLock(..).

Parameters:
channel the adaptor channel associated with this process
model the model to unlock

Implements IERXMigrationLock.

int versionNumber ( EOAdaptorChannel  channel,
EOModel  model 
)

Returns the current version number of the named model.

Parameters:
channel the adaptor channel associated with this process
model the model to lookup version information on
Returns:
the current version number of the named model

Implements IERXMigrationLock.


Member Data Documentation


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:16 2012 for Project Wonder by  doxygen 1.5.8