|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.utils.pooling.DirectBufferPoolQueue
public class DirectBufferPoolQueue
A ByteBuffer pool backed by a ConcurrentLinkedQueue.
| Constructor Summary | |
|---|---|
DirectBufferPoolQueue()
|
|
| Method Summary | |
|---|---|
ByteBuffer |
get()
Get an object from the pool, or create it if the pool is empty. |
boolean |
isEmpty()
Determine whether this pool is empty. |
void |
put(ByteBuffer buffer)
Release an object into this pool, and make it availble. |
int |
size()
Use this method with precaution, as its performance is in O(n). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DirectBufferPoolQueue()
| Method Detail |
|---|
public ByteBuffer get()
get in interface ObjectPool<ByteBuffer>public void put(ByteBuffer buffer)
put in interface ObjectPool<ByteBuffer>buffer - the object to release.public boolean isEmpty()
isEmpty in interface ObjectPool<ByteBuffer>true if the pool is empty, false otherwise.public int size()
size in interface ObjectPool<ByteBuffer>
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||