Todo
move this somewhere more appropriate
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final DefaultByteBufferPool | |
| private final int | |
| private volatile boolean | |
| private int | |
| private volatile int | |
| private static final AtomicIntegerFieldUpdater | |
| private final boolean | |
| private final int | |
| private final int | |
| private final ConcurrentLinkedQueue | |
| private volatile int | |
| private static final AtomicIntegerFieldUpdater | |
| private final DefaultByteBufferPool. | |
| private final int | |
| private final List |
| Access | Constructor and Description |
|---|---|
| public | DefaultByteBufferPool(boolean
If this implementation should use direct buffers direct, int The buffer size to use bufferSize)
|
| public | DefaultByteBufferPool(boolean
If this implementation should use direct buffers direct, int The buffer size to use bufferSize, int The maximum pool size, in number of buffers, it does not include buffers in thread local caches maximumPoolSize, int The maximum number of buffers that can be stored in a thread local cache threadLocalCacheSize, int leakDecetionPercent)
|
| public | DefaultByteBufferPool(boolean
If this implementation should use direct buffers direct, int The buffer size to use bufferSize, int The maximum pool size, in number of buffers, it does not include buffers in thread local caches maximumPoolSize, int The maximum number of buffers that can be stored in a thread local cache threadLocalCacheSize)
|
| Modifier and Type | Method and Description |
|---|---|
| public PooledByteBuffer | |
| private void | |
| public void | close()
Implements io. Closes this stream and releases any system resources associated with it. |
| protected void | finalize()
Overrides java. Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. |
| private void | |
| public ByteBufferPool | getArrayBackedPool()
Implements io. If this byte buffer pool corresponds to an array backed pool then this will return itself. |
| public int | |
| public boolean | |
| private void |
| arrayBackedPool | back to summary |
|---|---|
| private final DefaultByteBufferPool arrayBackedPool | |
| bufferSize | back to summary |
|---|---|
| private final int bufferSize | |
| closed | back to summary |
|---|---|
| private volatile boolean closed | |
| count | back to summary |
|---|---|
| private int count | |
| currentQueueLength | back to summary |
|---|---|
private volatile int currentQueueLength
| |
| currentQueueLengthUpdater | back to summary |
|---|---|
| private static final AtomicIntegerFieldUpdater<DefaultByteBufferPool> currentQueueLengthUpdater | |
| direct | back to summary |
|---|---|
| private final boolean direct | |
| leakDectionPercent | back to summary |
|---|---|
| private final int leakDectionPercent | |
| maximumPoolSize | back to summary |
|---|---|
| private final int maximumPoolSize | |
| queue | back to summary |
|---|---|
| private final ConcurrentLinkedQueue<ByteBuffer> queue | |
| reclaimedThreadLocals | back to summary |
|---|---|
private volatile int reclaimedThreadLocals
| |
| reclaimedThreadLocalsUpdater | back to summary |
|---|---|
| private static final AtomicIntegerFieldUpdater<DefaultByteBufferPool> reclaimedThreadLocalsUpdater | |
| threadLocalCache | back to summary |
|---|---|
| private final DefaultByteBufferPool. | |
| threadLocalCacheSize | back to summary |
|---|---|
| private final int threadLocalCacheSize | |
| threadLocalDataList | back to summary |
|---|---|
| private final List<WeakReference<DefaultByteBufferPool. | |
| DefaultByteBufferPool | back to summary |
|---|---|
public DefaultByteBufferPool(boolean direct, int bufferSize)
| |
| DefaultByteBufferPool | back to summary |
|---|---|
public DefaultByteBufferPool(boolean direct, int bufferSize, int maximumPoolSize, int threadLocalCacheSize, int leakDecetionPercent)
| |
| DefaultByteBufferPool | back to summary |
|---|---|
public DefaultByteBufferPool(boolean direct, int bufferSize, int maximumPoolSize, int threadLocalCacheSize)
| |
| allocate | back to summary |
|---|---|
| public PooledByteBuffer allocate() Implements io.
| |
| cleanupThreadLocalData | back to summary |
|---|---|
| private void cleanupThreadLocalData() | |
| close | back to summary |
|---|---|
| public void close() Implements io. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| finalize | back to summary |
|---|---|
| protected void finalize() throws Throwable Overrides java. Doc from java. Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
A subclass overrides the
When running in a Java virtual machine in which finalization has been
disabled or removed, the garbage collector will never call
The general contract of
The
The Java programming language does not guarantee which thread will
invoke the
After the
The
Any exception thrown by the | |
| freeInternal | back to summary |
|---|---|
| private void freeInternal(ByteBuffer buffer) | |
| getArrayBackedPool | back to summary |
|---|---|
| public ByteBufferPool getArrayBackedPool() Implements io. Doc from io. If this byte buffer pool corresponds to an array backed pool then this will return itself. Otherwise it will return an array backed pool that contains buffers of the same size.
| |
| getBufferSize | back to summary |
|---|---|
| public int getBufferSize() Implements io.
| |
| isDirect | back to summary |
|---|---|
| public boolean isDirect() Implements io.
| |
| queueIfUnderMax | back to summary |
|---|---|
| private void queueIfUnderMax(ByteBuffer buffer) | |
| Modifier and Type | Field and Description |
|---|---|
| private ByteBuffer | |
| private final DefaultByteBufferPool. | |
| private final DefaultByteBufferPool | |
| private volatile int | |
| private static final AtomicIntegerFieldUpdater |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements io. Closes this resource, relinquishing any underlying resources. |
| public ByteBuffer | |
| public boolean | |
| public String |
| buffer | back to summary |
|---|---|
| private ByteBuffer buffer | |
| leakDetector | back to summary |
|---|---|
| private final DefaultByteBufferPool. | |
| pool | back to summary |
|---|---|
| private final DefaultByteBufferPool pool | |
| referenceCount | back to summary |
|---|---|
| private volatile int referenceCount | |
| referenceCountUpdater | back to summary |
|---|---|
| private static final AtomicIntegerFieldUpdater<DefaultByteBufferPool. | |
| DefaultPooledBuffer | back to summary |
|---|---|
| pack-priv DefaultPooledBuffer(DefaultByteBufferPool pool, ByteBuffer buffer, boolean detectLeaks) | |
| close | back to summary |
|---|---|
| public void close() Implements io. Doc from java. Closes this resource, relinquishing any underlying resources.
This method is invoked automatically on objects managed by the
| |
| getBuffer | back to summary |
|---|---|
| public ByteBuffer getBuffer() Implements io.
| |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() Implements io.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Field and Description |
|---|---|
| private final Throwable | |
| pack-priv volatile boolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected void | finalize()
Overrides java. Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. |
| allocationPoint | back to summary |
|---|---|
| private final Throwable allocationPoint | |
| closed | back to summary |
|---|---|
| pack-priv volatile boolean closed | |
| LeakDetector | back to summary |
|---|---|
| private LeakDetector() | |
| finalize | back to summary |
|---|---|
| protected void finalize() throws Throwable Overrides java. Doc from java. Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
A subclass overrides the
When running in a Java virtual machine in which finalization has been
disabled or removed, the garbage collector will never call
The general contract of
The
The Java programming language does not guarantee which thread will
invoke the
After the
The
Any exception thrown by the | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Map |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv DefaultByteBufferPool. | |
| pack-priv void | |
| pack-priv void |
| localsByThread | back to summary |
|---|---|
| pack-priv Map<Thread, DefaultByteBufferPool. | |
| ThreadLocalCache | back to summary |
|---|---|
| private ThreadLocalCache() | |
| get | back to summary |
|---|---|
| pack-priv DefaultByteBufferPool. | |
| remove | back to summary |
|---|---|
| pack-priv void remove(DefaultByteBufferPool. | |
| set | back to summary |
|---|---|
| pack-priv void set(DefaultByteBufferPool. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| pack-priv ArrayDeque |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected void | finalize()
Overrides java. Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. |
| allocationDepth | back to summary |
|---|---|
| pack-priv int allocationDepth | |
| buffers | back to summary |
|---|---|
| pack-priv ArrayDeque<ByteBuffer> buffers | |
| ThreadLocalData | back to summary |
|---|---|
| private ThreadLocalData() | |
| finalize | back to summary |
|---|---|
| protected void finalize() throws Throwable Overrides java. Doc from java. Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
A subclass overrides the
When running in a Java virtual machine in which finalization has been
disabled or removed, the garbage collector will never call
The general contract of
The
The Java programming language does not guarantee which thread will
invoke the
After the
The
Any exception thrown by the | |