public class SessionLockManager extends Object implements 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) |
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) |
public SessionLockManager(SessionContext context, LockManager systemLockMgr)
context
- component context of the current sessionsystemLockMgr
- internal lock managerpublic String[] getLockTokens() throws RepositoryException
getLockTokens
in interface LockManager
RepositoryException
LockManager.getLockTokens()
public void addLockToken(String lockToken) throws LockException, RepositoryException
addLockToken
in interface LockManager
LockException
RepositoryException
LockManager.addLockToken(String)
public void removeLockToken(String lockToken) throws LockException, RepositoryException
removeLockToken
in interface LockManager
LockException
RepositoryException
LockManager.removeLockToken(String)
public boolean isLocked(String absPath) throws RepositoryException
isLocked
in interface LockManager
RepositoryException
LockManager.isLocked(String)
public Lock getLock(String absPath) throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, RepositoryException
getLock
in interface LockManager
UnsupportedRepositoryOperationException
LockException
AccessDeniedException
RepositoryException
LockManager.getLock(String)
public boolean holdsLock(String absPath) throws RepositoryException
holdsLock
in interface LockManager
RepositoryException
LockManager.holdsLock(String)
public Lock lock(String absPath, boolean isDeep, boolean isSessionScoped, long timeoutHint, String ownerInfo) throws RepositoryException
lock
in interface LockManager
RepositoryException
LockManager.lock(String, boolean, boolean, long, String)
public void unlock(String absPath) throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, InvalidItemStateException, RepositoryException
unlock
in interface LockManager
UnsupportedRepositoryOperationException
LockException
AccessDeniedException
InvalidItemStateException
RepositoryException
LockManager.unlock(String)
Copyright © 2004–2022 The Apache Software Foundation. All rights reserved.