Class LockManagerImpl
- java.lang.Object
-
- org.apache.jackrabbit.oak.jcr.lock.LockManagerImpl
-
- All Implemented Interfaces:
LockManager
public class LockManagerImpl extends java.lang.Object implements LockManager
-
-
Constructor Summary
Constructors Constructor Description LockManagerImpl(SessionContext sessionContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLockToken(java.lang.String lockToken)
boolean
canUnlock(NodeDelegate node)
Verifies if the currentsessionContext
can unlock the specified node@NotNull Lock
getLock(java.lang.String absPath)
@NotNull java.lang.String[]
getLockTokens()
boolean
holdsLock(java.lang.String absPath)
boolean
isLocked(java.lang.String absPath)
@NotNull Lock
lock(java.lang.String absPath, boolean isDeep, boolean isSessionScoped, long timeoutHint, java.lang.String ownerInfo)
void
removeLockToken(java.lang.String lockToken)
void
unlock(java.lang.String absPath)
-
-
-
Constructor Detail
-
LockManagerImpl
public LockManagerImpl(SessionContext sessionContext)
-
-
Method Detail
-
getLockTokens
@NotNull public @NotNull java.lang.String[] getLockTokens() throws RepositoryException
- Specified by:
getLockTokens
in interfaceLockManager
- Throws:
RepositoryException
-
addLockToken
public void addLockToken(java.lang.String lockToken) throws RepositoryException
- Specified by:
addLockToken
in interfaceLockManager
- Throws:
RepositoryException
-
removeLockToken
public void removeLockToken(java.lang.String lockToken) throws RepositoryException
- Specified by:
removeLockToken
in interfaceLockManager
- Throws:
RepositoryException
-
isLocked
public boolean isLocked(java.lang.String absPath) throws RepositoryException
- Specified by:
isLocked
in interfaceLockManager
- Throws:
RepositoryException
-
holdsLock
public boolean holdsLock(java.lang.String absPath) throws RepositoryException
- Specified by:
holdsLock
in interfaceLockManager
- Throws:
RepositoryException
-
getLock
@NotNull public @NotNull Lock getLock(java.lang.String absPath) throws RepositoryException
- Specified by:
getLock
in interfaceLockManager
- Throws:
RepositoryException
-
lock
@NotNull public @NotNull Lock lock(java.lang.String absPath, boolean isDeep, boolean isSessionScoped, long timeoutHint, java.lang.String ownerInfo) throws RepositoryException
- Specified by:
lock
in interfaceLockManager
- Throws:
RepositoryException
-
unlock
public void unlock(java.lang.String absPath) throws RepositoryException
- Specified by:
unlock
in interfaceLockManager
- Throws:
RepositoryException
-
canUnlock
public boolean canUnlock(NodeDelegate node)
Verifies if the currentsessionContext
can unlock the specified node- Parameters:
node
- the node state to check- Returns:
- true if the current sessionContext can unlock the specified node
-
-