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
SessionLockManagerimplements theLockManager. In contrast to the internalLockManagerinterface that is created once for eachWorkspaceInfo, the JSR 283LockManageris associated with a singleSessionand 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 voidaddLockToken(String lockToken)LockgetLock(String absPath)String[]getLockTokens()booleanholdsLock(String absPath)booleanisLocked(String absPath)Locklock(String absPath, boolean isDeep, boolean isSessionScoped, long timeoutHint, String ownerInfo)voidremoveLockToken(String lockToken)voidunlock(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:
getLockTokensin interfaceLockManager- Throws:
RepositoryException- See Also:
LockManager.getLockTokens()
-
addLockToken
public void addLockToken(String lockToken) throws LockException, RepositoryException
- Specified by:
addLockTokenin interfaceLockManager- Throws:
LockExceptionRepositoryException- See Also:
LockManager.addLockToken(String)
-
removeLockToken
public void removeLockToken(String lockToken) throws LockException, RepositoryException
- Specified by:
removeLockTokenin interfaceLockManager- Throws:
LockExceptionRepositoryException- See Also:
LockManager.removeLockToken(String)
-
isLocked
public boolean isLocked(String absPath) throws RepositoryException
- Specified by:
isLockedin interfaceLockManager- Throws:
RepositoryException- See Also:
LockManager.isLocked(String)
-
getLock
public Lock getLock(String absPath) throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, RepositoryException
- Specified by:
getLockin interfaceLockManager- Throws:
UnsupportedRepositoryOperationExceptionLockExceptionAccessDeniedExceptionRepositoryException- See Also:
LockManager.getLock(String)
-
holdsLock
public boolean holdsLock(String absPath) throws RepositoryException
- Specified by:
holdsLockin 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:
lockin 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:
unlockin interfaceLockManager- Throws:
UnsupportedRepositoryOperationExceptionLockExceptionAccessDeniedExceptionInvalidItemStateExceptionRepositoryException- See Also:
LockManager.unlock(String)
-
-