Package com.db4o.foundation
Class TimeoutBlockingQueue<T>
- java.lang.Object
-
- com.db4o.foundation.BlockingQueue<T>
-
- com.db4o.foundation.PausableBlockingQueue<T>
-
- com.db4o.foundation.TimeoutBlockingQueue<T>
-
- All Implemented Interfaces:
BlockingQueue4<T>
,PausableBlockingQueue4<T>
,Queue4<T>
,TimeoutBlockingQueue4<T>
public class TimeoutBlockingQueue<T> extends PausableBlockingQueue<T> implements TimeoutBlockingQueue4<T>
-
-
Field Summary
-
Fields inherited from class com.db4o.foundation.BlockingQueue
_lock, _queue, _stopped
-
-
Constructor Summary
Constructors Constructor Description TimeoutBlockingQueue(long maxTimeToRemainPaused)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
check()
boolean
pause()
Pauses the queue, making calls toQueue4.next()
block untilPausableBlockingQueue4.resume()
is called.void
reset()
-
Methods inherited from class com.db4o.foundation.PausableBlockingQueue
isPaused, resume, tryNext, unsafeWaitForNext
-
Methods inherited from class com.db4o.foundation.BlockingQueue
add, drainTo, hasNext, iterator, next, next, nextMatching, stop, unsafeWaitForNext, waitForNext, waitForNext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.db4o.foundation.BlockingQueue4
drainTo, next, stop
-
Methods inherited from interface com.db4o.foundation.PausableBlockingQueue4
isPaused, resume, tryNext
-
-
-
-
Method Detail
-
pause
public boolean pause()
Description copied from interface:PausableBlockingQueue4
Pauses the queue, making calls to
Queue4.next()
block untilPausableBlockingQueue4.resume()
is called.- Specified by:
pause
in interfacePausableBlockingQueue4<T>
- Overrides:
pause
in classPausableBlockingQueue<T>
- Returns:
- whether or not this call changed the state of the queue.
-
check
public void check()
- Specified by:
check
in interfaceTimeoutBlockingQueue4<T>
-
reset
public void reset()
- Specified by:
reset
in interfaceTimeoutBlockingQueue4<T>
-
-