Package org.eclipse.jetty.io
Class MappedByteBufferPool.Tagged
java.lang.Object
org.eclipse.jetty.io.MappedByteBufferPool
org.eclipse.jetty.io.MappedByteBufferPool.Tagged
- All Implemented Interfaces:
ByteBufferPool
,Dumpable
- Enclosing class:
- MappedByteBufferPool
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.io.MappedByteBufferPool
MappedByteBufferPool.Retained, MappedByteBufferPool.Tagged
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.ByteBufferPool
ByteBufferPool.Lease
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet this pool as aRetainableByteBufferPool
, which supports reference counting of the buffers and possibly a more efficient lookup mechanism based on thePool
class.protected void
decrementMemory
(ByteBuffer buffer) Deprecated.protected int
long
long
protected int
protected int
long
long
long
getMemory
(boolean direct) protected void
incrementMemory
(ByteBuffer buffer) Deprecated.newByteBuffer
(int capacity, boolean direct) Creates a new ByteBuffer of the given capacity and the given directness.protected void
releaseExcessMemory
(boolean direct, Consumer<Boolean> clearFn) Methods inherited from class org.eclipse.jetty.io.MappedByteBufferPool
acquire, bucketFor, capacityFor, clear, dump, getDirectByteBufferCount, getHeapByteBufferCount, isDetailedDump, newRetainableByteBufferPool, release, releaseMemory, setDetailedDump, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.io.ByteBufferPool
remove
-
Field Details
-
DEFAULT_FACTOR
public static final int DEFAULT_FACTOR- See Also:
-
DEFAULT_MAX_CAPACITY_BY_FACTOR
public static final int DEFAULT_MAX_CAPACITY_BY_FACTOR- See Also:
-
-
Constructor Details
-
Tagged
public Tagged()
-
-
Method Details
-
newByteBuffer
Description copied from interface:ByteBufferPool
Creates a new ByteBuffer of the given capacity and the given directness.
- Parameters:
capacity
- the ByteBuffer capacitydirect
- the ByteBuffer directness- Returns:
- a newly allocated ByteBuffer
-
asRetainableByteBufferPool
Description copied from interface:ByteBufferPool
Get this pool as aRetainableByteBufferPool
, which supports reference counting of the buffers and possibly a more efficient lookup mechanism based on thePool
class.- Specified by:
asRetainableByteBufferPool
in interfaceByteBufferPool
- Returns:
- This pool as a RetainableByteBufferPool. The same instance is always returned by multiple calls to this method.
-
getCapacityFactor
protected int getCapacityFactor() -
getMaxCapacity
protected int getMaxCapacity() -
getMaxBucketSize
protected int getMaxBucketSize() -
decrementMemory
Deprecated. -
incrementMemory
Deprecated. -
releaseExcessMemory
-
getDirectMemory
-
getHeapMemory
-
getMaxDirectMemory
@ManagedAttribute("The max num of bytes that can be retained from direct ByteBuffers") public long getMaxDirectMemory() -
getMaxHeapMemory
@ManagedAttribute("The max num of bytes that can be retained from heap ByteBuffers") public long getMaxHeapMemory() -
getMemory
public long getMemory(boolean direct)
-