|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.jcr2spi.lock.LockManagerImpl
public class LockManagerImpl
LockManagerImpl...
TODO: TOBEFIXED. Lock objects obtained through this mgr are not informed if another session is or becomes lock-holder and removes the lock again.
| Constructor Summary | |
|---|---|
LockManagerImpl(WorkspaceManager wspManager,
ItemManager itemManager,
CacheBehaviour cacheBehaviour,
PathResolver pathResolver)
|
|
| Method Summary | |
|---|---|
void |
addLockToken(String lt)
Delegates this call to WorkspaceManager.addLockToken(String). |
Lock |
getLock(NodeState nodeState)
If the session created a lock on the node with the given state, we already know the lock. |
Lock |
getLock(String absPath)
|
String[] |
getLockTokens()
Returns the lock tokens present on the SessionInfo this
manager has been created with. |
boolean |
holdsLock(String absPath)
|
void |
checkLock(NodeState nodeState)
Check whether the given node state is locked by somebody else than the current session. |
boolean |
isLocked(NodeState nodeState)
Returns true if this node is locked either as a result
of a lock held by this node or by a deep lock on a node above this
node; otherwise returns false. |
boolean |
isLocked(String absPath)
|
Lock |
lock(NodeState nodeState,
boolean isDeep,
boolean isSessionScoped)
Lock a node. |
Lock |
lock(NodeState nodeState,
boolean isDeep,
boolean isSessionScoped,
long timeoutHint,
String ownerHint)
Lock a node. |
Lock |
lock(String absPath,
boolean isDeep,
boolean isSessionScoped,
long timeoutHint,
String ownerInfo)
|
void |
loggedOut(Session session)
Called when a Session has been 'closed' by
calling |
void |
loggingOut(Session session)
Called when a Session is about to be 'closed' by
calling |
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 for Session.removeLockToken(String). |
void |
unlock(NodeState nodeState)
Removes the lock on a node. |
void |
unlock(String absPath)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LockManagerImpl(WorkspaceManager wspManager,
ItemManager itemManager,
CacheBehaviour cacheBehaviour,
PathResolver pathResolver)
| Method Detail |
|---|
public Lock getLock(String absPath)
throws LockException,
RepositoryException
getLock in interface LockManagerLockException
RepositoryExceptionLockManager.getLock(String)
public boolean isLocked(String absPath)
throws RepositoryException
isLocked in interface LockManagerRepositoryExceptionLockManager.isLocked(String)
public boolean holdsLock(String absPath)
throws RepositoryException
holdsLock in interface LockManagerRepositoryExceptionLockManager.holdsLock(String)
public Lock lock(String absPath,
boolean isDeep,
boolean isSessionScoped,
long timeoutHint,
String ownerInfo)
throws RepositoryException
lock in interface LockManagerRepositoryExceptionLockManager.lock(String, boolean, boolean, long, String)
public void unlock(String absPath)
throws LockException,
RepositoryException
unlock in interface LockManagerLockException
RepositoryExceptionLockManager.unlock(String)
public Lock lock(NodeState nodeState,
boolean isDeep,
boolean isSessionScoped)
throws LockException,
RepositoryException
LockManager
isDeep - whether the lock applies to this node onlyisSessionScoped - whether the lock is session scoped
LockException - if this node already is locked, or some descendant
node is locked and isDeep is true
RepositoryExceptionLockManager.lock(NodeState,boolean,boolean)
public Lock lock(NodeState nodeState,
boolean isDeep,
boolean isSessionScoped,
long timeoutHint,
String ownerHint)
throws RepositoryException
LockManager
isDeep - whether the lock applies to this node onlyisSessionScoped - whether the lock is session scopedtimeoutHint - optional timeout hint.ownerHint - optional String defining the lock owner info to be
displayed.
LockException - if this node already is locked, or some descendant
node is locked and isDeep is true
RepositoryExceptionLockManager.lock(NodeState,boolean,boolean,long,String)
public void unlock(NodeState nodeState)
throws LockException,
RepositoryException
LockManager
nodeState -
LockException - if this node is not locked or the session does not
have the correct lock token
RepositoryExceptionLockManager.unlock(NodeState)
public Lock getLock(NodeState nodeState)
throws LockException,
RepositoryException
nodeState -
LockException - if this node is not locked
RepositoryExceptionLockManager.getLock(NodeState)
public boolean isLocked(NodeState nodeState)
throws RepositoryException
LockManagertrue if this node is locked either as a result
of a lock held by this node or by a deep lock on a node above this
node; otherwise returns false.
nodeState -
true if this node is locked either as a result
of a lock held by this node or by a deep lock on a node above this
node; otherwise returns false
RepositoryException - If an error occurs.LockManager.isLocked(NodeState)
public void checkLock(NodeState nodeState)
throws LockException,
RepositoryException
LockManager
nodeState -
LockException - if write access to the specified node is not allowed
RepositoryException - if some other error occursLockManager.checkLock(NodeState)public String[] getLockTokens()
SessionInfo this
manager has been created with.
getLockTokens in interface LockManagerSession this
lock manager has been created for.LockManager.getLockTokens()
public void addLockToken(String lt)
throws LockException,
RepositoryException
WorkspaceManager.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.
addLockToken in interface LockManagerlt - added lock token
LockException
RepositoryExceptionLockManager.addLockToken(String)
public void removeLockToken(String lt)
throws LockException,
RepositoryException
Session.removeLockToken(String).WorkspaceManager.removeLockToken(String).
All locks stored in the local lock map are notified by the removed
token in order have them updated their lock information.
removeLockToken in interface LockManagerlt - removed lock token
LockException
RepositoryExceptionLockManager.removeLockToken(String)public void loggingOut(Session session)
SessionListenerSession is about to be 'closed' by
calling Session.logout()
- Specified by:
loggingOut in interface SessionListener
- Parameters:
session - - See Also:
SessionListener.loggingOut(Session)
public void loggedOut(Session session)
SessionListenerSession has been 'closed' by
calling Session.logout()
- Specified by:
loggedOut in interface SessionListener
- Parameters:
session - - See Also:
SessionListener.loggedOut(Session)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||