- java.lang.Object
-
- org.redkale.util.ObjectPool<ByteBuffer>
-
- org.redkale.util.ByteBufferPool
-
- 所有已实现的接口:
Consumer<ByteBuffer>
,Supplier<ByteBuffer>
public class ByteBufferPool extends ObjectPool<ByteBuffer>
ByteBuffer的对象池
详情见: https://redkale.org
- 从以下版本开始:
- 2.8.0
- 作者:
- zhangjx
-
-
字段概要
字段 修饰符和类型 字段 说明 static int
DEFAULT_BUFFER_POOL_SIZE
static int
DEFAULT_BUFFER_TCP_CAPACITY
static int
DEFAULT_BUFFER_UDP_CAPACITY
-
从类继承的字段 org.redkale.util.ObjectPool
creatCounter, creator, cycleCounter, debug, logger, max, parent, prepare, queue, recycler, safeCombine, unsafeDequeable, unsafeThread
-
-
构造器概要
构造器 限定符 构造器 说明 protected
ByteBufferPool(ObjectPool<ByteBuffer> parent, LongAdder creatCounter, LongAdder cycleCounter, Thread unsafeThread, int max, int bufferCapacity, Queue<ByteBuffer> queue)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static ByteBufferPool
createSafePool(int bufferCapacity)
static ByteBufferPool
createSafePool(int max, int bufferCapacity)
static ByteBufferPool
createSafePool(LongAdder creatCounter, LongAdder cycleCounter, int max, int bufferCapacity)
static ByteBufferPool
createUnsafePool(int max, int bufferCapacity)
static ByteBufferPool
createUnsafePool(Thread unsafeThread, int max, ByteBufferPool safePool)
static ByteBufferPool
createUnsafePool(LongAdder creatCounter, LongAdder cycleCounter, int max, int bufferCapacity)
static ByteBufferPool
createUnsafePool(ByteBufferPool parent, int bufferCapacity)
static ByteBufferPool
createUnsafePool(ByteBufferPool parent, int max, int bufferCapacity)
static ByteBufferPool
createUnsafePool(ByteBufferPool parent, LongAdder creatCounter, LongAdder cycleCounter, int max, int bufferCapacity)
static ByteBufferPool
createUnsafePool(ByteBufferPool parent, LongAdder creatCounter, LongAdder cycleCounter, Thread unsafeThread, int max, int bufferCapacity)
int
getBufferCapacity()
-
从类继承的方法 org.redkale.util.ObjectPool
accept, createSafePool, createSafePool, createSafePool, createSafePool, createSafePool, createSafePool, createSafePool, createUnsafePool, createUnsafePool, createUnsafePool, createUnsafePool, createUnsafePool, createUnsafePool, createUnsafePool, createUnsafePool, createUnsafePool, createUnsafePool, createUnsafePool, createUnsafePool, createUnsafePool, createUnsafePool, createUnsafePool, createUnsafePool, get, getCreatCount, getCreatCounter, getCreator, getCycleCount, getCycleCounter, getMax, getPrepare, getRecycler, setCreator
-
-
-
-
构造器详细资料
-
ByteBufferPool
protected ByteBufferPool(ObjectPool<ByteBuffer> parent, LongAdder creatCounter, LongAdder cycleCounter, Thread unsafeThread, int max, int bufferCapacity, Queue<ByteBuffer> queue)
-
-
方法详细资料
-
createUnsafePool
public static ByteBufferPool createUnsafePool(int max, int bufferCapacity)
-
createUnsafePool
public static ByteBufferPool createUnsafePool(LongAdder creatCounter, LongAdder cycleCounter, int max, int bufferCapacity)
-
createUnsafePool
public static ByteBufferPool createUnsafePool(ByteBufferPool parent, int bufferCapacity)
-
createUnsafePool
public static ByteBufferPool createUnsafePool(ByteBufferPool parent, int max, int bufferCapacity)
-
createUnsafePool
public static ByteBufferPool createUnsafePool(ByteBufferPool parent, LongAdder creatCounter, LongAdder cycleCounter, int max, int bufferCapacity)
-
createUnsafePool
public static ByteBufferPool createUnsafePool(Thread unsafeThread, int max, ByteBufferPool safePool)
-
createUnsafePool
public static ByteBufferPool createUnsafePool(ByteBufferPool parent, LongAdder creatCounter, LongAdder cycleCounter, Thread unsafeThread, int max, int bufferCapacity)
-
createSafePool
public static ByteBufferPool createSafePool(int bufferCapacity)
-
createSafePool
public static ByteBufferPool createSafePool(int max, int bufferCapacity)
-
createSafePool
public static ByteBufferPool createSafePool(LongAdder creatCounter, LongAdder cycleCounter, int max, int bufferCapacity)
-
getBufferCapacity
public int getBufferCapacity()
-
-