Home » lucene-3.0.1-src » org.apache » lucene » store » [javadoc | source]
abstract public static class: Lock.With [javadoc | source]
Utility class for executing code with exclusive access.
 public With(Lock lock,
    long lockWaitTimeout) 
    Constructs an executor that will grab the named lock.
Method from org.apache.lucene.store.Lock$With Summary:
doBody,   run
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.store.Lock$With Detail:
 abstract protected Object doBody() throws IOException
    Code to execute with exclusive access.
 public Object run() throws LockObtainFailedException, IOException 
    Calls #doBody while lock is obtained. Blocks if lock cannot be obtained immediately. Retries to obtain lock once per second until it is obtained, or until it has tried ten times. Lock is released when #doBody exits.