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
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.update.VersionBucket
VersionBucket.CheckedFunction<T,R>
-
-
Field Summary
-
Fields inherited from class org.apache.solr.update.VersionBucket
highest
-
-
Constructor Summary
Constructors Constructor Description TimedVersionBucket()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
awaitNanos(long nanosTimeout)
<T,R>
RrunWithLock(int lockTimeoutMs, VersionBucket.CheckedFunction<T,R> function)
This will run the function with the lock.void
signalAll()
protected boolean
tryLock(int lockTimeoutMs)
void
unlock()
Nothing to do for the intrinsic object monitor.-
Methods inherited from class org.apache.solr.update.VersionBucket
updateHighest
-
-
-
-
Method Detail
-
runWithLock
public <T,R> R runWithLock(int lockTimeoutMs, VersionBucket.CheckedFunction<T,R> function) throws IOException
This will run the function with the lock. It will throw exception if it can't obtain the lock withinlockTimeoutMs
.- Overrides:
runWithLock
in classVersionBucket
- Throws:
IOException
-
unlock
public void unlock()
Description copied from class:VersionBucket
Nothing to do for the intrinsic object monitor.- Overrides:
unlock
in classVersionBucket
-
signalAll
public void signalAll()
- Overrides:
signalAll
in classVersionBucket
-
awaitNanos
public void awaitNanos(long nanosTimeout)
- Overrides:
awaitNanos
in classVersionBucket
-
tryLock
protected boolean tryLock(int lockTimeoutMs)
-
-