org.apache.jackrabbit.api.jsr283.lock
Interface Lock

All Superinterfaces:
Lock

public interface Lock
extends Lock

This interface holds extensions made in JCR 2.0 while work is in progress implementing JCR 2.0.

Since:
JCR 2.0

Method Summary
 long getSecondsRemaining()
          Returns the seconds remaining until this locks times out (Long.MAX_VALUE if the timeout is unknown or infinite).
 boolean isLockOwningSession()
          Returns true if the current session is the owner of this lock, either because it is session-scoped and bound to this session or open-scoped and this session currently holds the token for this lock.
 
Methods inherited from interface javax.jcr.lock.Lock
getLockOwner, getLockToken, getNode, isDeep, isLive, isSessionScoped, refresh
 

Method Detail

getSecondsRemaining

long getSecondsRemaining()
                         throws RepositoryException
Returns the seconds remaining until this locks times out (Long.MAX_VALUE if the timeout is unknown or infinite).

Returns:
a long
Throws:
RepositoryException - If an error occurs.
Since:
JCR 2.0

isLockOwningSession

boolean isLockOwningSession()
Returns true if the current session is the owner of this lock, either because it is session-scoped and bound to this session or open-scoped and this session currently holds the token for this lock. Returns false otherwise.

Returns:
a boolean.
Since:
JCR 2.0


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