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 java.lang.LongCONST_LONG_ZERO
-
Constructor Summary
Constructors Constructor Description LockEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.LonggetExclusiveResourceId()java.lang.LonggetExpiryTime()java.lang.LonggetId()java.lang.StringgetLockToken()java.lang.LonggetSharedResourceId()java.lang.LonggetStartTime()java.lang.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(java.lang.Long exclusiveResourceId)voidsetExpiryTime(java.lang.Long expiryTime)voidsetId(java.lang.Long id)voidsetLockToken(java.lang.String lockToken)voidsetSharedResourceId(java.lang.Long sharedResourceId)voidsetStartTime(java.lang.Long startTime)voidsetVersion(java.lang.Long version)java.lang.StringtoString()
-
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
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 java.lang.Long getId()
-
setId
public void setId(java.lang.Long id)
-
getVersion
public java.lang.Long getVersion()
-
setVersion
public void setVersion(java.lang.Long version)
-
incrementVersion
public void incrementVersion()
Increments the version number or resets it if it reaches a large number
-
getSharedResourceId
public java.lang.Long getSharedResourceId()
- Returns:
- Returns the ID of the shared lock resource
-
setSharedResourceId
public void setSharedResourceId(java.lang.Long sharedResourceId)
- Parameters:
sharedResourceId- the ID of the shared lock resource
-
getExclusiveResourceId
public java.lang.Long getExclusiveResourceId()
-
setExclusiveResourceId
public void setExclusiveResourceId(java.lang.Long exclusiveResourceId)
-
getLockToken
public java.lang.String getLockToken()
- Returns:
- Returns the token assigned when the lock was created
-
setLockToken
public void setLockToken(java.lang.String lockToken)
- Parameters:
lockToken- the token assigned when the lock was created
-
getStartTime
public java.lang.Long getStartTime()
- Returns:
- Returns the time when the lock was started
-
setStartTime
public void setStartTime(java.lang.Long startTime)
-
getExpiryTime
public java.lang.Long getExpiryTime()
-
setExpiryTime
public void setExpiryTime(java.lang.Long expiryTime)
-
-