org.apache.jackrabbit.rmi.client
Class ClientLock

java.lang.Object
  extended by org.apache.jackrabbit.rmi.client.ClientLock
All Implemented Interfaces:
javax.jcr.lock.Lock

public class ClientLock
extends Object
implements javax.jcr.lock.Lock

Local adapter for the JCR-RMI RemoteLock interface. This class makes a remote lock locally available using the JCR Lock interface.

See Also:
Lock, RemoteLock

Constructor Summary
ClientLock(javax.jcr.Node node, RemoteLock remote)
          Creates a local adapter for the given remote lock.
 
Method Summary
 String getLockOwner()
          
 String getLockToken()
          
 javax.jcr.Node getNode()
          Returns the owning node without contacting the remote lock.
 boolean isDeep()
          
 boolean isLive()
          
 boolean isSessionScoped()
          
 void refresh()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientLock

public ClientLock(javax.jcr.Node node,
                  RemoteLock remote)
Creates a local adapter for the given remote lock.

Parameters:
node - current node
remote - remote lock
Method Detail

getNode

public javax.jcr.Node getNode()
Returns the owning node without contacting the remote lock.

Specified by:
getNode in interface javax.jcr.lock.Lock

getLockOwner

public String getLockOwner()

Specified by:
getLockOwner in interface javax.jcr.lock.Lock

isDeep

public boolean isDeep()

Specified by:
isDeep in interface javax.jcr.lock.Lock

getLockToken

public String getLockToken()

Specified by:
getLockToken in interface javax.jcr.lock.Lock

isLive

public boolean isLive()
               throws javax.jcr.RepositoryException

Specified by:
isLive in interface javax.jcr.lock.Lock
Throws:
javax.jcr.RepositoryException

refresh

public void refresh()
             throws javax.jcr.RepositoryException

Specified by:
refresh in interface javax.jcr.lock.Lock
Throws:
javax.jcr.RepositoryException

isSessionScoped

public boolean isSessionScoped()

Specified by:
isSessionScoped in interface javax.jcr.lock.Lock


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.