Class LockInfoImpl
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.LockInfoImpl
-
- All Implemented Interfaces:
Serializable,LockInfo
public class LockInfoImpl extends Object implements LockInfo, Serializable
LockInfoImplimplements a serializableLockInfobased on another lock info.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LockInfoImpl(String lockToken, String lockOwner, boolean isDeep, boolean isSessionScoped, long secondsRemaining, boolean isLockOwner, NodeId nodeId)Creates a new lock info for the givenlockinfo.LockInfoImpl(String lockToken, String lockOwner, boolean isDeep, boolean isSessionScoped, NodeId nodeId)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLockToken()Returns the lock token for this lock ornullif the token should not be exposed to the API user.NodeIdgetNodeId()Returns theNodeIdof the lock-holding Node.StringgetOwner()Returns the user ID of the user who owns this lock or some user defined information about the lock owner.longgetSecondsRemaining()Returns the seconds remaining until the lock times out or (Long.MAX_VALUEif the timeout is unknown or infinite).booleanisDeep()Returns true if the Lock is deep.booleanisLockOwner()Returnstrueif theSessionInfoused to retrieve thisLockInfois the lock holder and thus enabled to refresh or release the lock.booleanisSessionScoped()Returns true if the Lock is session scoped.
-
-
-
Constructor Detail
-
LockInfoImpl
@Deprecated public LockInfoImpl(String lockToken, String lockOwner, boolean isDeep, boolean isSessionScoped, NodeId nodeId)
Deprecated.Creates a new lock info for the givenlockinfo.- Parameters:
lockToken- the lock tokenlockOwner- the lock ownerisDeep- whether this lock is deep or notisSessionScoped- whether this lock is session scoped or notnodeId- the node id of the locked node.
-
LockInfoImpl
public LockInfoImpl(String lockToken, String lockOwner, boolean isDeep, boolean isSessionScoped, long secondsRemaining, boolean isLockOwner, NodeId nodeId)
Creates a new lock info for the givenlockinfo.- Parameters:
lockToken- the lock tokenlockOwner- the lock ownerisDeep- whether this lock is deep or notisSessionScoped- whether this lock is session scoped or notsecondsRemaining- Number of seconds until the lock timeout is reached.isLockOwner-trueif the calling session is lock owner;falseotherwise.nodeId- the node id of the locked node.- Since:
- JCR 2.0
-
-
Method Detail
-
getLockToken
public String getLockToken()
Returns the lock token for this lock ornullif the token should not be exposed to the API user.- Specified by:
getLockTokenin interfaceLockInfo- Returns:
- lock token or
null - See Also:
Lock.getLockToken()
-
getOwner
public String getOwner()
Returns the user ID of the user who owns this lock or some user defined information about the lock owner.- Specified by:
getOwnerin interfaceLockInfo- Returns:
- user ID of the user who owns this lock.
- See Also:
Lock.getLockOwner()
-
isDeep
public boolean isDeep()
Returns true if the Lock is deep. False otherwise.- Specified by:
isDeepin interfaceLockInfo- Returns:
- true if the Lock is deep. False otherwise.
- See Also:
Lock.isDeep()
-
isSessionScoped
public boolean isSessionScoped()
Returns true if the Lock is session scoped. False otherwise.- Specified by:
isSessionScopedin interfaceLockInfo- Returns:
- true if the Lock is session scoped. False otherwise.
- See Also:
Lock.isSessionScoped()
-
getSecondsRemaining
public long getSecondsRemaining()
Returns the seconds remaining until the lock times out or (Long.MAX_VALUEif the timeout is unknown or infinite).- Specified by:
getSecondsRemainingin interfaceLockInfo- Returns:
- number of seconds until the lock times out.
- See Also:
Lock.getSecondsRemaining()
-
isLockOwner
public boolean isLockOwner()
Returnstrueif theSessionInfoused to retrieve thisLockInfois the lock holder and thus enabled to refresh or release the lock.- Specified by:
isLockOwnerin interfaceLockInfo- Returns:
trueif theSessionInfoused to retrieve thisLockInfois the lock holder.- See Also:
Lock.isLockOwningSession()
-
-