org.priha.core.locks
Class QLock
java.lang.Object
org.priha.core.locks.QLock
public class QLock
- extends java.lang.Object
Nested Class Summary |
class |
QLock.Impl
The implementation which is per Session. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QLock
public QLock(NodeImpl ni,
boolean isDeep,
boolean isSessionScoped)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
QLock
public QLock(QLock orig)
getWorkspace
public java.lang.String getWorkspace()
getPath
public Path getPath()
getToken
public java.lang.String getToken()
getLockOwner
public java.lang.String getLockOwner()
isDeep
public boolean isDeep()
isLive
public boolean isLive()
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
isSessionScoped
public boolean isSessionScoped()
refresh
public void refresh()
throws javax.jcr.lock.LockException,
javax.jcr.RepositoryException
- Throws:
javax.jcr.lock.LockException
javax.jcr.RepositoryException
getLockInstance
public QLock.Impl getLockInstance(SessionImpl session)
invalidate
public void invalidate()
- Invalidates the lock in such a way that isLive() returns
false and it can be collected.
move
protected void move(Path destPath)
getLockToken
public java.lang.String getLockToken(SessionImpl s)
expire
protected boolean expire(SessionImpl s)
- This method checks if this QLock should be expired from the given Session.
- Parameters:
s
-
- Returns:
- True, if this QLock is expired