|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.portal.concurrency.locking.EntityLockImpl
public class EntityLockImpl
An implementation of IEntityLock. A lock is granted to a
lockOwner for an entityType and
entityKey. It guarantees some degree of exclusive
access to the entity, depending on lockType and
expirationTime.
IEntityLock| Constructor Summary | |
|---|---|
protected |
EntityLockImpl(Class newEntityType,
String newEntityKey,
int newLockType,
Date newExpirationTime,
String newLockOwner)
|
protected |
EntityLockImpl(Class newEntityType,
String newEntityKey,
int newLockType,
Date newExpirationTime,
String newLockOwner,
IEntityLockService newService)
|
| Method Summary | |
|---|---|
void |
convert(int newType)
Delegate to the service. |
void |
convert(int newType,
int duration)
Delegate to the service. |
boolean |
equals(Object obj)
|
protected void |
expire()
|
protected void |
finalize()
|
String |
getEntityKey()
|
Class |
getEntityType()
|
Date |
getExpirationTime()
|
String |
getLockOwner()
Could be the portal user or the framework or ...? |
int |
getLockType()
See IEntityLockingService for a description of lock types. |
protected IEntityLockService |
getService()
|
int |
hashCode()
This method is supported primarily for hash tables, such as those provided in java.util. |
boolean |
isLocked()
Answer if the lock is unexpired. |
boolean |
isValid()
Delegate to the service. |
void |
release()
Delegate to the service. |
void |
renew()
Delegate to the service. |
void |
renew(int duration)
Delegate to the service. |
String |
toString()
Returns a String that represents the value of this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected EntityLockImpl(Class newEntityType,
String newEntityKey,
int newLockType,
Date newExpirationTime,
String newLockOwner)
protected EntityLockImpl(Class newEntityType,
String newEntityKey,
int newLockType,
Date newExpirationTime,
String newLockOwner,
IEntityLockService newService)
| Method Detail |
|---|
public void convert(int newType)
throws LockingException
convert in interface IEntityLocknewType - int
LockingException - - if the conversion fails.
public void convert(int newType,
int duration)
throws LockingException
convert in interface IEntityLocknewType - intduration - int
LockingException - - if the conversion fails.public boolean equals(Object obj)
equals in class Objectobj - the Object to compare with
Hashtableprotected void expire()
protected void finalize()
throws Throwable
finalize in class ObjectThrowablepublic String getEntityKey()
getEntityKey in interface IEntityLockpublic Class getEntityType()
getEntityType in interface IEntityLockfor known types.public Date getExpirationTime()
getExpirationTime in interface IEntityLockpublic String getLockOwner()
getLockOwner in interface IEntityLockpublic int getLockType()
getLockType in interface IEntityLockprotected IEntityLockService getService()
public int hashCode()
hashCode in class ObjectHashtablepublic boolean isLocked()
public boolean isValid()
throws LockingException
isValid in interface IEntityLockLockingException
public void release()
throws LockingException
release in interface IEntityLockLockingException
public void renew()
throws LockingException
renew in interface IEntityLockLockingException
public void renew(int duration)
throws LockingException
renew in interface IEntityLockLockingExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||