public class SynchronizedBuffer extends SynchronizedCollection implements Buffer
Buffer
to synchronize its behaviour
for a multi-threaded environment.
Methods are synchronized, then forwarded to the decorated buffer.
This class is Serializable from Commons Collections 3.1.
Modifier and Type | Method and Description |
---|---|
static Buffer |
decorate(Buffer buffer)
Factory method to create a synchronized buffer.
|
java.lang.Object |
get()
Gets the next object from the buffer without removing it.
|
java.lang.Object |
remove()
Gets and removes the next object from the buffer.
|
add, addAll, clear, contains, containsAll, decorate, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString
public static Buffer decorate(Buffer buffer)
buffer
- the buffer to decorate, must not be nulljava.lang.IllegalArgumentException
- if buffer is nullpublic java.lang.Object get()
Buffer
Copyright © 2010 - 2020 Adobe. All Rights Reserved