Package org.apache.johnzon.core
Class BufferStrategyFactory.QueueProvider<T>
- java.lang.Object
-
- org.apache.johnzon.core.BufferStrategyFactory.QueueProvider<T>
-
- All Implemented Interfaces:
Serializable
,BufferStrategy.BufferProvider<T>
- Direct Known Subclasses:
BufferStrategyFactory.CharBufferQueueProvider
- Enclosing class:
- BufferStrategyFactory
private abstract static class BufferStrategyFactory.QueueProvider<T> extends Object implements BufferStrategy.BufferProvider<T>
-
-
Field Summary
Fields Modifier and Type Field Description private ConcurrentLinkedQueue<T>
queue
private int
size
-
Constructor Summary
Constructors Constructor Description QueueProvider(int size)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description T
newBuffer()
protected abstract T
newInstance(int size)
void
release(T value)
-
-
-
Field Detail
-
size
private final int size
-
queue
private final ConcurrentLinkedQueue<T> queue
-
-
Method Detail
-
newInstance
protected abstract T newInstance(int size)
-
newBuffer
public T newBuffer()
- Specified by:
newBuffer
in interfaceBufferStrategy.BufferProvider<T>
-
release
public void release(T value)
- Specified by:
release
in interfaceBufferStrategy.BufferProvider<T>
-
-