org.apache.jackrabbit.jcr2spi
Class JcrLockManager

java.lang.Object
  extended by org.apache.jackrabbit.jcr2spi.JcrLockManager
All Implemented Interfaces:
LockManager

public class JcrLockManager
extends Object
implements LockManager

JcrLockManager...


Constructor Summary
protected JcrLockManager(SessionImpl session)
           
 
Method Summary
 void addLockToken(String lt)
          Delegates this call to WorkspaceManager.addLockToken(String).
 Lock getLock(String absPath)
           
 String[] getLockTokens()
          Returns the lock tokens present on the SessionInfo this manager has been created with.
 boolean holdsLock(String absPath)
           
 boolean isLocked(String absPath)
           
 Lock lock(String absPath, boolean isDeep, boolean isSessionScoped, long timeoutHint, String ownerInfo)
           
 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(String absPath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JcrLockManager

protected JcrLockManager(SessionImpl session)
Method Detail

getLock

public Lock getLock(String absPath)
             throws LockException,
                    RepositoryException
Specified by:
getLock in interface LockManager
Throws:
LockException
RepositoryException
See Also:
LockManager.getLock(String)

isLocked

public boolean isLocked(String absPath)
                 throws RepositoryException
Specified by:
isLocked in interface LockManager
Throws:
RepositoryException
See Also:
LockManager.isLocked(String)

holdsLock

public boolean holdsLock(String absPath)
                  throws RepositoryException
Specified by:
holdsLock in interface LockManager
Throws:
RepositoryException
See Also:
LockManager.holdsLock(String)

lock

public Lock lock(String absPath,
                 boolean isDeep,
                 boolean isSessionScoped,
                 long timeoutHint,
                 String ownerInfo)
          throws RepositoryException
Specified by:
lock in interface LockManager
Throws:
RepositoryException
See Also:
LockManager.lock(String, boolean, boolean, long, String)

unlock

public void unlock(String absPath)
            throws LockException,
                   RepositoryException
Specified by:
unlock in interface LockManager
Throws:
LockException
RepositoryException
See Also:
LockManager.unlock(String)

getLockTokens

public String[] getLockTokens()
                       throws RepositoryException
Returns the lock tokens present on the SessionInfo this manager has been created with.

Specified by:
getLockTokens in interface LockManager
Throws:
RepositoryException
See Also:
LockManager.getLockTokens()

addLockToken

public void addLockToken(String lt)
                  throws LockException,
                         RepositoryException
Delegates this call to 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.

Specified by:
addLockToken in interface LockManager
Throws:
LockException
RepositoryException
See Also:
LockManager.addLockToken(String)

removeLockToken

public void removeLockToken(String lt)
                     throws LockException,
                            RepositoryException
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).
Otherwise the call is delegated to 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.

Specified by:
removeLockToken in interface LockManager
Throws:
LockException
RepositoryException
See Also:
LockManager.removeLockToken(String)


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.