| java.lang.Object org.jasig.portal.concurrency.locking.ReferenceEntityLockService
ReferenceEntityLockService | public class ReferenceEntityLockService implements IEntityLockService(Code) | | author: Dan Ellentuck version: $Revision: 35550 $ |
Method Summary | |
public void | convert(IEntityLock lock, int newType) Attempts to change the lock's lockType to newType . | public void | convert(IEntityLock lock, int newType, int newDuration) Attempts to change the lock's lockType to newType . | public boolean | existsInStore(IEntityLock lock) Answer if this IEntityLock exists in the store. | public boolean | isValid(IEntityLock lock) Answers if this IEntityLock represents a lock that is still
good. | public IEntityLock | newLock(Class entityType, String entityKey, int lockType, String owner) Returns a lock for the entity, lock type and owner if no conflicting locks exist. | public IEntityLock | newLock(Class entityType, String entityKey, int lockType, String owner, int durationSecs) Returns a lock for the entity, lock type and owner if no conflicting locks exist.
Parameters: entityType - Parameters: entityKey - Parameters: lockType - Parameters: owner - Parameters: durationSecs - org.jasig.portal.groups.IEntityLock exception: LockingException - Retrieves potentially conflicting locks and checks them before addingthe new lock to the store. | public IEntityLock | newLock(EntityIdentifier entityID, int lockType, String owner) Returns a lock for the entity, lock type and owner if no conflicting locks exist. | public IEntityLock | newLock(EntityIdentifier entityID, int lockType, String owner, int durationSecs) Returns a lock for the entity, lock type and owner if no conflicting locks exist. | public void | release(IEntityLock lock) Releases the IEntityLock . | public void | renew(IEntityLock lock) Extends the expiration time of the lock by some service-defined increment. | public void | renew(IEntityLock lock, int duration) Extends the expiration time of the lock by some service-defined increment. | public static synchronized IEntityLockService | singleton() |
ReferenceEntityLockService | public ReferenceEntityLockService() throws LockingException(Code) | | ReferenceEntityLockingService constructor comment.
|
newLock | public IEntityLock newLock(Class entityType, String entityKey, int lockType, String owner) throws LockingException(Code) | | Returns a lock for the entity, lock type and owner if no conflicting locks exist.
Parameters: entityType - Parameters: entityKey - Parameters: lockType - Parameters: owner - org.jasig.portal.groups.IEntityLock exception: LockingException - |
newLock | public IEntityLock newLock(Class entityType, String entityKey, int lockType, String owner, int durationSecs) throws LockingException(Code) | | Returns a lock for the entity, lock type and owner if no conflicting locks exist.
Parameters: entityType - Parameters: entityKey - Parameters: lockType - Parameters: owner - Parameters: durationSecs - org.jasig.portal.groups.IEntityLock exception: LockingException - Retrieves potentially conflicting locks and checks them before addingthe new lock to the store. The add of a write lock will fail if any other lock exists for the entity. The add of a read lock will fail if a write lock exists for the entity. After we add a write lock we check the store a second time and roll back if any other lock has snuckin. I think this is slightly safer than depending on the db isolationlevel for transactional integrity. |
newLock | public IEntityLock newLock(EntityIdentifier entityID, int lockType, String owner) throws LockingException(Code) | | Returns a lock for the entity, lock type and owner if no conflicting locks exist.
org.jasig.portal.groups.IEntityLock Parameters: entityID - org.jasig.portal.EntityIdentifier Parameters: lockType - int Parameters: owner - String exception: LockingException - |
newLock | public IEntityLock newLock(EntityIdentifier entityID, int lockType, String owner, int durationSecs) throws LockingException(Code) | | Returns a lock for the entity, lock type and owner if no conflicting locks exist.
org.jasig.portal.groups.IEntityLock Parameters: entityID - org.jasig.portal.EntityIdentifier Parameters: lockType - int Parameters: owner - String Parameters: durationSecs - int exception: LockingException - |
|
|