public class LockInfoImpl extends java.lang.Object implements LockInfo, java.io.Serializable
LockInfoImpl
implements a serializable LockInfo
based on another lock info.Constructor and Description |
---|
LockInfoImpl(java.lang.String lockToken,
java.lang.String lockOwner,
boolean isDeep,
boolean isSessionScoped,
long secondsRemaining,
boolean isLockOwner,
NodeId nodeId)
Creates a new lock info for the given
lock info. |
LockInfoImpl(java.lang.String lockToken,
java.lang.String lockOwner,
boolean isDeep,
boolean isSessionScoped,
NodeId nodeId)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getLockToken()
Returns the lock token for this lock or
null if the token
should not be exposed to the API user. |
NodeId |
getNodeId()
Returns the
NodeId of the lock-holding Node. |
java.lang.String |
getOwner()
Returns the user ID of the user who owns this lock or some user defined
information about the lock owner.
|
long |
getSecondsRemaining()
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 |
isLockOwner()
Returns
true if the SessionInfo used to
retrieve this LockInfo is the lock holder and thus enabled
to refresh or release the lock. |
boolean |
isSessionScoped()
Returns true if the Lock is session scoped.
|
public LockInfoImpl(java.lang.String lockToken, java.lang.String lockOwner, boolean isDeep, boolean isSessionScoped, NodeId nodeId)
LockInfoImpl(String, String, boolean, boolean, long, boolean, NodeId)
instaed.lock
info.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.public LockInfoImpl(java.lang.String lockToken, java.lang.String lockOwner, boolean isDeep, boolean isSessionScoped, long secondsRemaining, boolean isLockOwner, NodeId nodeId)
lock
info.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.public java.lang.String getLockToken()
null
if the token
should not be exposed to the API user.getLockToken
in interface LockInfo
null
Lock.getLockToken()
public java.lang.String getOwner()
getOwner
in interface LockInfo
Lock.getLockOwner()
public boolean isDeep()
isDeep
in interface LockInfo
Lock.isDeep()
public boolean isSessionScoped()
isSessionScoped
in interface LockInfo
Lock.isSessionScoped()
public long getSecondsRemaining()
Long.MAX_VALUE
if the timeout is unknown or infinite).getSecondsRemaining
in interface LockInfo
Lock.getSecondsRemaining()
public boolean isLockOwner()
true
if the SessionInfo
used to
retrieve this LockInfo
is the lock holder and thus enabled
to refresh or release the lock.isLockOwner
in interface LockInfo
true
if the SessionInfo
used to
retrieve this LockInfo
is the lock holder.Lock.isLockOwningSession()
Copyright © 2010 - 2020 Adobe. All Rights Reserved