
Public Member Functions | |
| boolean | _tryLock (EOAdaptorChannel channel, EOModel model, String lockOwnerName, boolean createTableIfMissing) |
| 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) |
Static Public Attributes | |
| static final Logger | log = Logger.getLogger(ERXJDBCMigrationLock.class) |
Protected Member Functions | |
| boolean | createIfMissing () |
| String | dbUpdaterCreateStatement (EOModel model, JDBCAdaptor adaptor) |
| EOModel | dbUpdaterModelWithModel (EOModel model, JDBCAdaptor adaptor) |
| int | initialVersionForModel (EOModel model) |
| String | migrationTableName (JDBCAdaptor adaptor) |
Private Attributes | |
| EOModel | _dbUpdaterModelCache |
| EOModel | _lastUpdatedModel |
| boolean _tryLock | ( | EOAdaptorChannel | channel, | |
| EOModel | model, | |||
| String | lockOwnerName, | |||
| boolean | createTableIfMissing | |||
| ) |
| boolean createIfMissing | ( | ) | [protected] |
| String dbUpdaterCreateStatement | ( | EOModel | model, | |
| JDBCAdaptor | adaptor | |||
| ) | [protected] |
| EOModel dbUpdaterModelWithModel | ( | EOModel | model, | |
| JDBCAdaptor | adaptor | |||
| ) | [protected] |
| int initialVersionForModel | ( | EOModel | model | ) | [protected] |
| String migrationTableName | ( | JDBCAdaptor | adaptor | ) | [protected] |
Adds support for overriding the name of the db updater table on a per-database product level.
| adaptor | the current jdbc adaptor |
| void setVersionNumber | ( | EOAdaptorChannel | channel, | |
| EOModel | model, | |||
| int | versionNumber | |||
| ) |
Sets the current version number of the named model.
| 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.
| channel | the adaptor channel associated with this process | |
| model | the model to try to lock | |
| lockOwnerName | the name of the lock owner |
Implements IERXMigrationLock.
| void unlock | ( | EOAdaptorChannel | channel, | |
| EOModel | model | |||
| ) |
Unlocks the given model. This should only be called if you acquired a lock with tryLock(..).
| 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.
| channel | the adaptor channel associated with this process | |
| model | the model to lookup version information on |
Implements IERXMigrationLock.
EOModel _dbUpdaterModelCache [private] |
EOModel _lastUpdatedModel [private] |
final Logger log = Logger.getLogger(ERXJDBCMigrationLock.class) [static] |
1.5.8