Class LockManagerImpl
- java.lang.Object
-
- org.apache.jackrabbit.oak.jcr.lock.LockManagerImpl
-
- All Implemented Interfaces:
LockManager
public class LockManagerImpl extends 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(String lockToken)
boolean
canUnlock(NodeDelegate node)
Verifies if the currentsessionContext
can unlock the specified node@NotNull Lock
getLock(String absPath)
@NotNull String[]
getLockTokens()
boolean
holdsLock(String absPath)
boolean
isLocked(String absPath)
@NotNull Lock
lock(String absPath, boolean isDeep, boolean isSessionScoped, long timeoutHint, String ownerInfo)
void
removeLockToken(String lockToken)
void
unlock(String absPath)
-
-
-
Constructor Detail
-
LockManagerImpl
public LockManagerImpl(SessionContext sessionContext)
-
-
Method Detail
-
getLockTokens
@NotNull public @NotNull String[] getLockTokens() throws RepositoryException
- Specified by:
getLockTokens
in interfaceLockManager
- Throws:
RepositoryException
-
addLockToken
public void addLockToken(String lockToken) throws RepositoryException
- Specified by:
addLockToken
in interfaceLockManager
- Throws:
RepositoryException
-
removeLockToken
public void removeLockToken(String lockToken) throws RepositoryException
- Specified by:
removeLockToken
in interfaceLockManager
- Throws:
RepositoryException
-
isLocked
public boolean isLocked(String absPath) throws RepositoryException
- Specified by:
isLocked
in interfaceLockManager
- Throws:
RepositoryException
-
holdsLock
public boolean holdsLock(String absPath) throws RepositoryException
- Specified by:
holdsLock
in interfaceLockManager
- Throws:
RepositoryException
-
getLock
@NotNull public @NotNull Lock getLock(String absPath) throws RepositoryException
- Specified by:
getLock
in interfaceLockManager
- Throws:
RepositoryException
-
lock
@NotNull public @NotNull Lock lock(String absPath, boolean isDeep, boolean isSessionScoped, long timeoutHint, String ownerInfo) throws RepositoryException
- Specified by:
lock
in interfaceLockManager
- Throws:
RepositoryException
-
unlock
public void unlock(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
-
-