Package org.apache.jackrabbit.jcr2spi
Class JcrLockManager
- java.lang.Object
-
- org.apache.jackrabbit.jcr2spi.JcrLockManager
-
- All Implemented Interfaces:
LockManager
public class JcrLockManager extends Object implements LockManager
JcrLockManager
...
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
JcrLockManager(SessionImpl session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLockToken(String lt)
Delegates this call toWorkspaceManager.addLockToken(String)
.Lock
getLock(String absPath)
String[]
getLockTokens()
Returns the lock tokens present on theSessionInfo
this manager has been created with.boolean
holdsLock(String absPath)
boolean
isLocked(String absPath)
Lock
lock(String absPath, boolean isDeep, boolean isSessionScoped, long timeoutHint, String ownerInfo)
void
removeLockToken(String lt)
If the lock addressed by the token is session-scoped, this method will throw a LockException, such as defined by JSR170 v.1.0.1 forSession.removeLockToken(String)
.
Otherwise the call is delegated toWorkspaceManager.removeLockToken(String)
.void
unlock(String absPath)
-
-
-
Constructor Detail
-
JcrLockManager
protected JcrLockManager(SessionImpl session)
-
-
Method Detail
-
getLock
public Lock getLock(String absPath) throws LockException, RepositoryException
- Specified by:
getLock
in interfaceLockManager
- Throws:
LockException
RepositoryException
- See Also:
LockManager.getLock(String)
-
isLocked
public boolean isLocked(String absPath) throws RepositoryException
- Specified by:
isLocked
in interfaceLockManager
- Throws:
RepositoryException
- See Also:
LockManager.isLocked(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 LockException, RepositoryException
- Specified by:
unlock
in interfaceLockManager
- Throws:
LockException
RepositoryException
- See Also:
LockManager.unlock(String)
-
getLockTokens
public String[] getLockTokens() throws RepositoryException
Returns the lock tokens present on theSessionInfo
this manager has been created with.- Specified by:
getLockTokens
in interfaceLockManager
- Throws:
RepositoryException
- See Also:
LockManager.getLockTokens()
-
addLockToken
public void addLockToken(String lt) throws LockException, RepositoryException
Delegates this call toWorkspaceManager.addLockToken(String)
. If this succeeds this method will inform all locks stored in the local map in order to give them the chance to update their lock information.- Specified by:
addLockToken
in interfaceLockManager
- Throws:
LockException
RepositoryException
- See Also:
LockManager.addLockToken(String)
-
removeLockToken
public void removeLockToken(String lt) throws LockException, RepositoryException
If the lock addressed by the token is session-scoped, this method will throw a LockException, such as defined by JSR170 v.1.0.1 forSession.removeLockToken(String)
.
Otherwise the call is delegated toWorkspaceManager.removeLockToken(String)
. All locks stored in the local lock map are notified by the removed token in order have them updated their lock information.- Specified by:
removeLockToken
in interfaceLockManager
- Throws:
LockException
RepositoryException
- See Also:
LockManager.removeLockToken(String)
-
-