org.priha.core.locks
Class QLock

java.lang.Object
  extended by org.priha.core.locks.QLock

public class QLock
extends java.lang.Object


Nested Class Summary
 class QLock.Impl
          The implementation which is per Session.
 
Constructor Summary
QLock(NodeImpl ni, boolean isDeep, boolean isSessionScoped)
           
QLock(QLock orig)
           
 
Method Summary
protected  boolean expire(SessionImpl s)
          This method checks if this QLock should be expired from the given Session.
 QLock.Impl getLockInstance(SessionImpl session)
           
 java.lang.String getLockOwner()
           
 java.lang.String getLockToken(SessionImpl s)
           
 Path getPath()
           
 java.lang.String getToken()
           
 java.lang.String getWorkspace()
           
 void invalidate()
          Invalidates the lock in such a way that isLive() returns false and it can be collected.
 boolean isDeep()
           
 boolean isLive()
           
 boolean isSessionScoped()
           
protected  void move(Path destPath)
           
 void refresh()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QLock

public QLock(NodeImpl ni,
             boolean isDeep,
             boolean isSessionScoped)
      throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

QLock

public QLock(QLock orig)
Method Detail

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