Class LockInfoImpl
java.lang.Object
org.apache.jackrabbit.spi.commons.LockInfoImpl
- All Implemented Interfaces:
Serializable
,LockInfo
LockInfoImpl
implements a serializable LockInfo
based on another lock info.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLockInfoImpl
(String lockToken, String lockOwner, boolean isDeep, boolean isSessionScoped, long secondsRemaining, boolean isLockOwner, NodeId nodeId) Creates a new lock info for the givenlock
info.LockInfoImpl
(String lockToken, String lockOwner, boolean isDeep, boolean isSessionScoped, NodeId nodeId) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionReturns the lock token for this lock ornull
if the token should not be exposed to the API user.Returns theNodeId
of the lock-holding Node.getOwner()
Returns the user ID of the user who owns this lock or some user defined information about the lock owner.long
Returns the seconds remaining until the lock times out or (Long.MAX_VALUE
if the timeout is unknown or infinite).boolean
isDeep()
Returns true if the Lock is deep.boolean
Returnstrue
if theSessionInfo
used to retrieve thisLockInfo
is the lock holder and thus enabled to refresh or release the lock.boolean
Returns true if the Lock is session scoped.
-
Constructor Details
-
LockInfoImpl
public LockInfoImpl(String lockToken, String lockOwner, boolean isDeep, boolean isSessionScoped, NodeId nodeId) Deprecated.Creates a new lock info for the givenlock
info.- 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 givenlock
info.- 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
-true
if the calling session is lock owner;false
otherwise.nodeId
- the node id of the locked node.- Since:
- JCR 2.0
-
-
Method Details
-
getLockToken
Returns the lock token for this lock ornull
if the token should not be exposed to the API user.- Specified by:
getLockToken
in interfaceLockInfo
- Returns:
- lock token or
null
- See Also:
-
getOwner
Returns the user ID of the user who owns this lock or some user defined information about the lock owner. -
isDeep
public boolean isDeep()Returns true if the Lock is deep. False otherwise. -
isSessionScoped
public boolean isSessionScoped()Returns true if the Lock is session scoped. False otherwise.- Specified by:
isSessionScoped
in interfaceLockInfo
- Returns:
- true if the Lock is session scoped. False otherwise.
- See Also:
-
getSecondsRemaining
public long getSecondsRemaining()Returns the seconds remaining until the lock times out or (Long.MAX_VALUE
if the timeout is unknown or infinite).- Specified by:
getSecondsRemaining
in interfaceLockInfo
- Returns:
- number of seconds until the lock times out.
- See Also:
-
isLockOwner
public boolean isLockOwner()Returnstrue
if theSessionInfo
used to retrieve thisLockInfo
is the lock holder and thus enabled to refresh or release the lock.- Specified by:
isLockOwner
in interfaceLockInfo
- Returns:
true
if theSessionInfo
used to retrieve thisLockInfo
is the lock holder.- See Also:
-
getNodeId
Returns theNodeId
of the lock-holding Node.
-
LockInfoImpl(String, String, boolean, boolean, long, boolean, NodeId)
instaed.