Package org.apache.solr.update
Class TimedVersionBucket
- java.lang.Object
-
- org.apache.solr.update.VersionBucket
-
- org.apache.solr.update.TimedVersionBucket
-
public class TimedVersionBucket extends VersionBucket
This implementation uses lock and condition and will throw exception if it can't obtain the lock withinlockTimeoutMs.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.update.VersionBucket
VersionBucket.CheckedFunction<T,R>
-
-
Constructor Summary
Constructors Constructor Description TimedVersionBucket()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidawaitNanos(long nanosTimeout)<T,R>
RrunWithLock(int lockTimeoutMs, VersionBucket.CheckedFunction<T,R> function)This will run the function with the lock.voidsignalAll()protected booleantryLock(int lockTimeoutMs)voidunlock()Nothing to do for the intrinsic object monitor.
-
-
-
Method Detail
-
runWithLock
public <T,R> R runWithLock(int lockTimeoutMs, VersionBucket.CheckedFunction<T,R> function) throws IOExceptionThis will run the function with the lock. It will throw exception if it can't obtain the lock withinlockTimeoutMs.- Overrides:
runWithLockin classVersionBucket- Throws:
IOException
-
unlock
public void unlock()
Description copied from class:VersionBucketNothing to do for the intrinsic object monitor.- Overrides:
unlockin classVersionBucket
-
signalAll
public void signalAll()
- Overrides:
signalAllin classVersionBucket
-
awaitNanos
public void awaitNanos(long nanosTimeout)
- Overrides:
awaitNanosin classVersionBucket
-
tryLock
protected boolean tryLock(int lockTimeoutMs)
-
-