public class SessionLockManager extends Object implements javax.jcr.lock.LockManager
SessionLockManager
implements the
LockManager
. In contrast
to the internal LockManager
interface that is created once
for each WorkspaceInfo
, the JSR 283 LockManager
is associated with a single Session
and its
Workspace
.Workspace.getLockManager()
Constructor and Description |
---|
SessionLockManager(SessionContext context,
LockManager systemLockMgr)
Creates a lock manager.
|
Modifier and Type | Method and Description |
---|---|
void |
addLockToken(String lockToken) |
javax.jcr.lock.Lock |
getLock(String absPath) |
String[] |
getLockTokens() |
boolean |
holdsLock(String absPath) |
boolean |
isLocked(String absPath) |
javax.jcr.lock.Lock |
lock(String absPath,
boolean isDeep,
boolean isSessionScoped,
long timeoutHint,
String ownerInfo) |
void |
removeLockToken(String lockToken) |
void |
unlock(String absPath) |
public SessionLockManager(SessionContext context, LockManager systemLockMgr)
context
- component context of the current sessionsystemLockMgr
- internal lock managerpublic String[] getLockTokens() throws javax.jcr.RepositoryException
getLockTokens
in interface javax.jcr.lock.LockManager
javax.jcr.RepositoryException
LockManager.getLockTokens()
public void addLockToken(String lockToken) throws javax.jcr.lock.LockException, javax.jcr.RepositoryException
addLockToken
in interface javax.jcr.lock.LockManager
javax.jcr.lock.LockException
javax.jcr.RepositoryException
LockManager.addLockToken(String)
public void removeLockToken(String lockToken) throws javax.jcr.lock.LockException, javax.jcr.RepositoryException
removeLockToken
in interface javax.jcr.lock.LockManager
javax.jcr.lock.LockException
javax.jcr.RepositoryException
LockManager.removeLockToken(String)
public boolean isLocked(String absPath) throws javax.jcr.RepositoryException
isLocked
in interface javax.jcr.lock.LockManager
javax.jcr.RepositoryException
LockManager.isLocked(String)
public javax.jcr.lock.Lock getLock(String absPath) throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.lock.LockException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
getLock
in interface javax.jcr.lock.LockManager
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.lock.LockException
javax.jcr.AccessDeniedException
javax.jcr.RepositoryException
LockManager.getLock(String)
public boolean holdsLock(String absPath) throws javax.jcr.RepositoryException
holdsLock
in interface javax.jcr.lock.LockManager
javax.jcr.RepositoryException
LockManager.holdsLock(String)
public javax.jcr.lock.Lock lock(String absPath, boolean isDeep, boolean isSessionScoped, long timeoutHint, String ownerInfo) throws javax.jcr.RepositoryException
lock
in interface javax.jcr.lock.LockManager
javax.jcr.RepositoryException
LockManager.lock(String, boolean, boolean, long, String)
public void unlock(String absPath) throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.lock.LockException, javax.jcr.AccessDeniedException, javax.jcr.InvalidItemStateException, javax.jcr.RepositoryException
unlock
in interface javax.jcr.lock.LockManager
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.lock.LockException
javax.jcr.AccessDeniedException
javax.jcr.InvalidItemStateException
javax.jcr.RepositoryException
LockManager.unlock(String)
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.