Package de.hybris.platform.util
Class DefaultWorkerValueQueue<E>
- java.lang.Object
-
- de.hybris.platform.util.AbstractWorkerValueQueue<E>
-
- de.hybris.platform.util.DefaultWorkerValueQueue<E>
-
- All Implemented Interfaces:
WorkerValueQueue<E>
public class DefaultWorkerValueQueue<E> extends AbstractWorkerValueQueue<E>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.hybris.platform.util.WorkerValueQueue
WorkerValueQueue.ExecuteOnTaken<E>, WorkerValueQueue.ExecuteWhileWaiting<E>
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_PUT_INTERVALstatic java.util.concurrent.TimeUnitDEFAULT_PUT_INTERVAL_UNIT-
Fields inherited from class de.hybris.platform.util.AbstractWorkerValueQueue
DEFAULT_WAIT_INTERVAL, DEFAULT_WAIT_INTERVAL_UNIT
-
-
Constructor Summary
Constructors Constructor Description DefaultWorkerValueQueue(int workerSize)DefaultWorkerValueQueue(int workerSize, int maxQueueSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()voidclearValueTaken(int workerNumber)java.lang.ObjectexecuteOnTakenValues(WorkerValueQueue.ExecuteOnTaken<E> exec)booleanisValueTakenOrQueueNotEmpty()booleanput(E value, WorkerValueQueue.ExecuteWhileWaiting<E> exec)voidstop()Etake(int workerNumber)voidwaitUntilEmpty(long time, java.util.concurrent.TimeUnit timeUnit, WorkerValueQueue.ExecuteWhileWaiting<E> exec)-
Methods inherited from class de.hybris.platform.util.AbstractWorkerValueQueue
put, waitUntilEmpty, waitUntilEmpty
-
-
-
-
Field Detail
-
DEFAULT_PUT_INTERVAL
public static final int DEFAULT_PUT_INTERVAL
- See Also:
- Constant Field Values
-
DEFAULT_PUT_INTERVAL_UNIT
public static final java.util.concurrent.TimeUnit DEFAULT_PUT_INTERVAL_UNIT
-
-
Method Detail
-
stop
public void stop()
-
executeOnTakenValues
public java.lang.Object executeOnTakenValues(WorkerValueQueue.ExecuteOnTaken<E> exec)
-
take
public E take(int workerNumber)
-
clearValueTaken
public void clearValueTaken(int workerNumber)
-
put
public boolean put(E value, WorkerValueQueue.ExecuteWhileWaiting<E> exec)
-
waitUntilEmpty
public void waitUntilEmpty(long time, java.util.concurrent.TimeUnit timeUnit, WorkerValueQueue.ExecuteWhileWaiting<E> exec)
-
clear
public void clear()
-
isValueTakenOrQueueNotEmpty
public boolean isValueTakenOrQueueNotEmpty()
-
-