| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final BufferAllocator | |
| private final int | |
| private final int | |
| private final int | |
| private volatile int | |
| private static final AtomicIntegerFieldUpdater | |
| private final Queue |
| Access | Constructor and Description |
|---|---|
| public | LimitedBufferSlicePool(final BufferAllocator<ByteBuffer>
the buffer allocator to use allocator, final int the size of each buffer bufferSize, final int the maximum region size for each backing buffer maxRegionSize, final int the maximum regions to create, zero for unlimited maxRegions)Construct a new instance. |
| public | LimitedBufferSlicePool(BufferAllocator<ByteBuffer>
the buffer allocator to use allocator, int the size of each buffer bufferSize, int the maximum region size for each backing buffer maxRegionSize)Construct a new instance. |
| public | LimitedBufferSlicePool(final int
the size of each buffer bufferSize, final int the maximum region size for each backing buffer maxRegionSize)Construct a new instance, using a direct buffer allocator. |
| Modifier and Type | Method and Description |
|---|---|
| public LimitedBufferSlicePool. | |
| public boolean |
| allocator | back to summary |
|---|---|
| private final BufferAllocator<ByteBuffer> allocator | |
| bufferSize | back to summary |
|---|---|
| private final int bufferSize | |
| buffersPerRegion | back to summary |
|---|---|
| private final int buffersPerRegion | |
| maxRegions | back to summary |
|---|---|
| private final int maxRegions | |
| regionsUsed | back to summary |
|---|---|
| private volatile int regionsUsed | |
| regionUpdater | back to summary |
|---|---|
| private static final AtomicIntegerFieldUpdater<T> regionUpdater | |
| sliceQueue | back to summary |
|---|---|
| private final Queue<LimitedBufferSlicePool. | |
| LimitedBufferSlicePool | back to summary |
|---|---|
| public LimitedBufferSlicePool(final BufferAllocator<ByteBuffer> allocator, final int bufferSize, final int maxRegionSize, final int maxRegions) Construct a new instance.
| |
| LimitedBufferSlicePool | back to summary |
|---|---|
| public LimitedBufferSlicePool(BufferAllocator<ByteBuffer> allocator, int bufferSize, int maxRegionSize) Construct a new instance.
| |
| LimitedBufferSlicePool | back to summary |
|---|---|
| public LimitedBufferSlicePool(final int bufferSize, final int maxRegionSize) Construct a new instance, using a direct buffer allocator.
| |
| allocate | back to summary |
|---|---|
| public LimitedBufferSlicePool. Allocates a new byte buffer if possible
| |
| canAllocate | back to summary |
|---|---|
| public boolean canAllocate(int slices) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv volatile ByteBuffer | |
| private static final AtomicReferenceFieldUpdater | |
| private final LimitedBufferSlicePool. | |
| private final Queue |
| Access | Constructor and Description |
|---|---|
| private | PooledByteBuffer(final LimitedBufferSlicePool.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public ByteBuffer | |
| public String |
| buffer | back to summary |
|---|---|
| pack-priv volatile ByteBuffer buffer | |
| bufferUpdater | back to summary |
|---|---|
| private static final AtomicReferenceFieldUpdater<LimitedBufferSlicePool. | |
| region | back to summary |
|---|---|
| private final LimitedBufferSlicePool. | |
| slices | back to summary |
|---|---|
| private final Queue<LimitedBufferSlicePool. | |
| PooledByteBuffer | back to summary |
|---|---|
| private PooledByteBuffer(final LimitedBufferSlicePool. | |
| free | back to summary |
|---|---|
| public void free() | |
| getBuffer | back to summary |
|---|---|
| public ByteBuffer getBuffer() | |
| 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 ByteBuffer | |
| private final int | |
| private final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv ByteBuffer |
| parent | back to summary |
|---|---|
| private final ByteBuffer parent | |
| size | back to summary |
|---|---|
| private final int size | |
| start | back to summary |
|---|---|
| private final int start | |
| Slice | back to summary |
|---|---|
| private Slice(final ByteBuffer parent, final int start, final int size) | |
| slice | back to summary |
|---|---|
| pack-priv ByteBuffer slice() | |