Class JcTools
java.lang.Object
io.opentelemetry.sdk.trace.internal.JcTools
Internal accessor of JCTools package for fast queues.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longReturns the capacity of theQueue.static <T> voidRemove up to limit elements from theQueueand hand to consume.private static <T> voiddrainNonJcQueue(Queue<T> queue, int maxExportBatchSize, Consumer<T> consumer) static <T> Queue<T> newFixedSizeQueue(int capacity) Returns a newQueueappropriate for use with multiple producers and a single consumer.
-
Field Details
-
queueCreationWarningLogged
-
logger
-
-
Constructor Details
-
JcTools
private JcTools()
-
-
Method Details
-
newFixedSizeQueue
-
capacity
-
drain
Remove up to limit elements from theQueueand hand to consume.- Throws:
IllegalArgumentException- consumer isnullIllegalArgumentException- if maxExportBatchSize is negative
-
drainNonJcQueue
-