Abstract base class for entity persisters that support locking.
| Modifiers | Name | Description |
|---|---|---|
static int |
DEFAULT_TIMEOUT |
| Fields inherited from class | Fields |
|---|---|
class EntityPersister |
proxyFactory, publisher, reflector, session |
| Constructor and description |
|---|
LockableEntityPersister
(MappingContext mappingContext, PersistentEntity entity, Session session, org.springframework.context.ApplicationEventPublisher publisher) |
| Type | Name and description |
|---|---|
boolean |
isLocked(java.lang.Object o)Return whether an object is locked or not |
java.lang.Object |
lock(java.io.Serializable id)Locks an object for the given identifier returning the locked instance |
java.lang.Object |
lock(java.io.Serializable id, int timeout)Acquire a lock using the given identifier and timeout delay |
java.lang.Object |
proxy(java.io.Serializable key) |
void |
unlock(java.lang.Object o)Unlocks a locked object |
Return whether an object is locked or not
o - The objectLocks an object for the given identifier returning the locked instance
id - The identifierAcquire a lock using the given identifier and timeout delay
id - the identifiertimeout - the amount of time to wait before giving up in secondsUnlocks a locked object
o - The object to unlock