Package org.alfresco.repo.domain.locks
Class LockEntity
- java.lang.Object
-
- org.alfresco.repo.domain.locks.LockEntity
-
-
Field Summary
Fields Modifier and Type Field Description static LongCONST_LONG_ZERO
-
Constructor Summary
Constructors Constructor Description LockEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)LonggetExclusiveResourceId()LonggetExpiryTime()LonggetId()StringgetLockToken()LonggetSharedResourceId()LonggetStartTime()LonggetVersion()booleanhasExpired()inthashCode()voidincrementVersion()Increments the version number or resets it if it reaches a large numberbooleanisExclusive()Determine if the lock is logically exclusive.voidsetExclusiveResourceId(Long exclusiveResourceId)voidsetExpiryTime(Long expiryTime)voidsetId(Long id)voidsetLockToken(String lockToken)voidsetSharedResourceId(Long sharedResourceId)voidsetStartTime(Long startTime)voidsetVersion(Long version)StringtoString()
-
-
-
Field Detail
-
CONST_LONG_ZERO
public static final Long CONST_LONG_ZERO
-
-
Method Detail
-
isExclusive
public boolean isExclusive()
Determine if the lock is logically exclusive. A lock is exclusive if the shared lock resource matches the exclusive lock resource.- Returns:
- Returns true if the lock is exclusive or false if it is not
-
hasExpired
public boolean hasExpired()
-
getId
public Long getId()
-
setId
public void setId(Long id)
-
getVersion
public Long getVersion()
-
setVersion
public void setVersion(Long version)
-
incrementVersion
public void incrementVersion()
Increments the version number or resets it if it reaches a large number
-
getSharedResourceId
public Long getSharedResourceId()
- Returns:
- Returns the ID of the shared lock resource
-
setSharedResourceId
public void setSharedResourceId(Long sharedResourceId)
- Parameters:
sharedResourceId- the ID of the shared lock resource
-
getExclusiveResourceId
public Long getExclusiveResourceId()
-
setExclusiveResourceId
public void setExclusiveResourceId(Long exclusiveResourceId)
-
getLockToken
public String getLockToken()
- Returns:
- Returns the token assigned when the lock was created
-
setLockToken
public void setLockToken(String lockToken)
- Parameters:
lockToken- the token assigned when the lock was created
-
getStartTime
public Long getStartTime()
- Returns:
- Returns the time when the lock was started
-
setStartTime
public void setStartTime(Long startTime)
-
getExpiryTime
public Long getExpiryTime()
-
setExpiryTime
public void setExpiryTime(Long expiryTime)
-
-