Package org.apache.jackrabbit.core.lock
Class SessionLockManager
- java.lang.Object
-
- org.apache.jackrabbit.core.lock.SessionLockManager
-
- All Implemented Interfaces:
LockManager
public class SessionLockManager extends Object implements LockManager
SessionLockManager
implements theLockManager
. In contrast to the internalLockManager
interface that is created once for eachWorkspaceInfo
, the JSR 283LockManager
is associated with a singleSession
and itsWorkspace
.- See Also:
Workspace.getLockManager()
-
-
Constructor Summary
Constructors Constructor Description SessionLockManager(SessionContext context, LockManager systemLockMgr)
Creates a lock manager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLockToken(String lockToken)
Lock
getLock(String absPath)
String[]
getLockTokens()
boolean
holdsLock(String absPath)
boolean
isLocked(String absPath)
Lock
lock(String absPath, boolean isDeep, boolean isSessionScoped, long timeoutHint, String ownerInfo)
void
removeLockToken(String lockToken)
void
unlock(String absPath)
-
-
-
Constructor Detail
-
SessionLockManager
public SessionLockManager(SessionContext context, LockManager systemLockMgr)
Creates a lock manager.- Parameters:
context
- component context of the current sessionsystemLockMgr
- internal lock manager
-
-
Method Detail
-
getLockTokens
public String[] getLockTokens() throws RepositoryException
- Specified by:
getLockTokens
in interfaceLockManager
- Throws:
RepositoryException
- See Also:
LockManager.getLockTokens()
-
addLockToken
public void addLockToken(String lockToken) throws LockException, RepositoryException
- Specified by:
addLockToken
in interfaceLockManager
- Throws:
LockException
RepositoryException
- See Also:
LockManager.addLockToken(String)
-
removeLockToken
public void removeLockToken(String lockToken) throws LockException, RepositoryException
- Specified by:
removeLockToken
in interfaceLockManager
- Throws:
LockException
RepositoryException
- See Also:
LockManager.removeLockToken(String)
-
isLocked
public boolean isLocked(String absPath) throws RepositoryException
- Specified by:
isLocked
in interfaceLockManager
- Throws:
RepositoryException
- See Also:
LockManager.isLocked(String)
-
getLock
public Lock getLock(String absPath) throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, RepositoryException
- Specified by:
getLock
in interfaceLockManager
- Throws:
UnsupportedRepositoryOperationException
LockException
AccessDeniedException
RepositoryException
- See Also:
LockManager.getLock(String)
-
holdsLock
public boolean holdsLock(String absPath) throws RepositoryException
- Specified by:
holdsLock
in interfaceLockManager
- Throws:
RepositoryException
- See Also:
LockManager.holdsLock(String)
-
lock
public Lock lock(String absPath, boolean isDeep, boolean isSessionScoped, long timeoutHint, String ownerInfo) throws RepositoryException
- Specified by:
lock
in interfaceLockManager
- Throws:
RepositoryException
- See Also:
LockManager.lock(String, boolean, boolean, long, String)
-
unlock
public void unlock(String absPath) throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, InvalidItemStateException, RepositoryException
- Specified by:
unlock
in interfaceLockManager
- Throws:
UnsupportedRepositoryOperationException
LockException
AccessDeniedException
InvalidItemStateException
RepositoryException
- See Also:
LockManager.unlock(String)
-
-