Class SPBlockingPutStrategy
java.lang.Object
kieker.monitoring.queue.putstrategy.SPBlockingPutStrategy
- All Implemented Interfaces:
PutStrategy
public class SPBlockingPutStrategy extends java.lang.Object implements PutStrategy
This take strategy blocks if the queue is full.
IMPORTANT: This put strategy only works correctly if at most one producer accesses the queue.
IMPORTANT: This put strategy only works correctly if at most one producer accesses the queue.
- Since:
- 1.13
- Author:
- Christian Wulf
-
Field Summary
Fields Modifier and Type Field Description int
storeFence
-
Constructor Summary
Constructors Constructor Description SPBlockingPutStrategy()
-
Method Summary
Modifier and Type Method Description <E> void
backoffOffer(java.util.Queue<E> q, E e)
void
signal()
-
Field Details
-
storeFence
public volatile int storeFence
-
-
Constructor Details
-
SPBlockingPutStrategy
public SPBlockingPutStrategy()
-
-
Method Details
-
signal
public void signal()- Specified by:
signal
in interfacePutStrategy
-
backoffOffer
public <E> void backoffOffer(java.util.Queue<E> q, E e) throws java.lang.InterruptedException- Specified by:
backoffOffer
in interfacePutStrategy
- Type Parameters:
E
- element type- Parameters:
q
- queuee
- element- Throws:
java.lang.InterruptedException
- on interruption of the queue
-