|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IEntityLock
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 |
---|
void convert(int newType) throws LockingException
lockType
of this lock to
newType
. The expirationTime
is renewed.
newType
- int
LockingException
- - if the conversion fails.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.java.lang.String getEntityKey()
java.lang.Class getEntityType()
for known types.
java.util.Date getExpirationTime()
java.lang.String getLockOwner()
int getLockType()
boolean isValid() throws LockingException
LockingException
void release() throws LockingException
LockingException
void renew() throws LockingException
LockingException
void renew(int duration) throws LockingException
duration
seconds.
LockingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |