Class ArrayBlockingQueueBuffer<T>
java.lang.Object
org.apache.skywalking.oap.server.library.datacarrier.buffer.ArrayBlockingQueueBuffer<T>
- All Implemented Interfaces:
QueueBuffer<T>
The buffer implementation based on JDK ArrayBlockingQueue.
This implementation has better performance in server side. We are still trying to research whether this is suitable for agent side, which is more sensitive about blocks.
-
Method Summary
Modifier and TypeMethodDescriptionintvoidObtain the existing data from the queuebooleanSave data into the queue;voidsetStrategy(BufferStrategy strategy) Set different strategy when queue is full.
-
Method Details
-
save
Description copied from interface:QueueBufferSave data into the queue;- Specified by:
savein interfaceQueueBuffer<T>- Parameters:
data- to add.- Returns:
- true if saved
-
setStrategy
Description copied from interface:QueueBufferSet different strategy when queue is full.- Specified by:
setStrategyin interfaceQueueBuffer<T>
-
obtain
Description copied from interface:QueueBufferObtain the existing data from the queue- Specified by:
obtainin interfaceQueueBuffer<T>
-
getBufferSize
public int getBufferSize()- Specified by:
getBufferSizein interfaceQueueBuffer<T>
-