|
uPortal 2.4.1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines a lock associated with an owner and a portal entity that
guarantees some degree of exclusive access to the entity, depending on
lockType
and expirationTime
.
See IEntityLockService for the rules governing lock assignment
and a code example.
IEntityLockService
Method Summary | |
void |
convert(int newType)
Attempts to change the lockType of this lock to
newType . |
void |
convert(int newType,
int newDuration)
Attempts to change the lockType of this lock to
newType . |
java.lang.String |
getEntityKey()
|
java.lang.Class |
getEntityType()
|
java.util.Date |
getExpirationTime()
|
java.lang.String |
getLockOwner()
Could be the portal user or the framework or ...? |
int |
getLockType()
See IEntityLockingService for a description of lock types. |
boolean |
isValid()
Answers if this lock is still good. |
void |
release()
Invalidate the lock. |
void |
renew()
Extends the expiration time of this lock for a service-defined period. |
void |
renew(int duration)
Extends the expiration time of this lock for duration seconds. |
Method Detail |
public void convert(int newType) throws LockingException
lockType
of this lock to
newType
. The expirationTime
is renewed.
newType
- int
LockingException
- - if the conversion fails.public void convert(int newType, int newDuration) throws LockingException
lockType
of this lock to
newType
. The expirationTime
is extended
newDuration
seconds.
newType
- intnewDuration
- int
LockingException
- - if the conversion fails.public java.lang.String getEntityKey()
public java.lang.Class getEntityType()
for known types.
public java.util.Date getExpirationTime()
public java.lang.String getLockOwner()
public int getLockType()
public boolean isValid() throws LockingException
LockingException
public void release() throws LockingException
LockingException
public void renew() throws LockingException
LockingException
public void renew(int duration) throws LockingException
duration
seconds.
LockingException
|
uPortal 2.4.1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |