Class use for compatibility with existing blocking java serialization frameworks e.g.
Class use for compatibility with existing blocking java serialization frameworks e.g. Avro.
Contrarily to the regular ByteArrayOutputStream this class accumulate byte arrays into a list buffer and assumes a thread-safe environment and immutability which permit to optimize the code by removing synchronization and defense copying.
Contrarily to the regular ByteArrayOutputStream this class accumulate byte buffers into a list segment and assumes a thread-safe environment and immutability which permit to optimize the code by removing synchronization and defense copying.
Contrarily to the regular CharArrayOutputStream this class accumulate byte buffers into a list segment and assumes a thread-safe environment and immutability which permit to optimize the code by removing synchronization and defense copying.
Suggested by John Sullivan on scala-user mailing list (4 mai 2011)
A simple non-reentrant lock used for exclusion when managing queues and workers.
A simple non-reentrant lock used for exclusion when managing queues and workers. We use a custom lock so that we can readily probe lock state in constructions that check among alternative actions. The lock is normally only very briefly held, and sometimes treated as a spinlock, but other usages block to reduce overall contention in those cases where locked code bodies perform allocation/resizing.
Code and comments borrowed from Doug Lea's FJPool.
Platform specific line separator
Misc utilities