Home » lucene-3.0.1-src » org.apache » lucene » store » [javadoc | source]
org.apache.lucene.store
abstract public static class: Lock.With [javadoc | source]
java.lang.Object
   org.apache.lucene.store.Lock$With
Utility class for executing code with exclusive access.
Constructor:
 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.