- java.lang.Object
-
- org.redkale.util.ObjectPool<T>
-
-
字段概要
字段 修饰符和类型 字段 说明 protected LongAdder
creatCounter
protected Creator<T>
creator
protected LongAdder
cycleCounter
protected boolean
debug
protected static Logger
logger
protected int
max
protected ObjectPool<T>
parent
protected Consumer<T>
prepare
protected Queue<T>
queue
protected Predicate<T>
recycler
protected boolean
safeCombine
protected boolean
unsafeDequeable
protected Thread
unsafeThread
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 void
accept(T e)
static <T> ObjectPool<T>
createSafePool(int max, Class<T> clazz, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createSafePool(int max, Supplier<T> creator, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createSafePool(int max, Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createSafePool(Class<T> clazz, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createSafePool(LongAdder creatCounter, LongAdder cycleCounter, int max, Supplier<T> creator, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createSafePool(LongAdder creatCounter, LongAdder cycleCounter, int max, Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createSafePool(Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createUnsafePool(int max, Class<T> clazz, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createUnsafePool(int max, Supplier<T> creator, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createUnsafePool(int max, Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createUnsafePool(Class<T> clazz, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createUnsafePool(Thread unsafeThread, int max, ObjectPool<T> safePool)
static <T> ObjectPool<T>
createUnsafePool(LongAdder creatCounter, LongAdder cycleCounter, int max, Supplier<T> creator, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createUnsafePool(LongAdder creatCounter, LongAdder cycleCounter, int max, Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createUnsafePool(Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createUnsafePool(ObjectPool<T> parent, int max, Class<T> clazz, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createUnsafePool(ObjectPool<T> parent, int max, Supplier<T> creator, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createUnsafePool(ObjectPool<T> parent, int max, Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createUnsafePool(ObjectPool<T> parent, Class<T> clazz, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createUnsafePool(ObjectPool<T> parent, LongAdder creatCounter, LongAdder cycleCounter, int max, Supplier<T> creator, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createUnsafePool(ObjectPool<T> parent, LongAdder creatCounter, LongAdder cycleCounter, int max, Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createUnsafePool(ObjectPool<T> parent, LongAdder creatCounter, LongAdder cycleCounter, Thread unsafeThread, int max, Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
static <T> ObjectPool<T>
createUnsafePool(ObjectPool<T> parent, Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
T
get()
long
getCreatCount()
LongAdder
getCreatCounter()
Creator<T>
getCreator()
long
getCycleCount()
LongAdder
getCycleCounter()
int
getMax()
Consumer<T>
getPrepare()
Predicate<T>
getRecycler()
void
setCreator(Creator<T> creator)
-
-
-
字段详细资料
-
logger
protected static final Logger logger
-
debug
protected final boolean debug
-
max
protected int max
-
creatCounter
protected final LongAdder creatCounter
-
cycleCounter
protected final LongAdder cycleCounter
-
unsafeDequeable
protected final boolean unsafeDequeable
-
parent
protected final ObjectPool<T> parent
-
unsafeThread
protected Thread unsafeThread
-
safeCombine
protected final boolean safeCombine
-
-
方法详细资料
-
createUnsafePool
public static <T> ObjectPool<T> createUnsafePool(Class<T> clazz, Consumer<T> prepare, Predicate<T> recycler)
-
createUnsafePool
public static <T> ObjectPool<T> createUnsafePool(int max, Class<T> clazz, Consumer<T> prepare, Predicate<T> recycler)
-
createUnsafePool
public static <T> ObjectPool<T> createUnsafePool(Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
-
createUnsafePool
public static <T> ObjectPool<T> createUnsafePool(int max, Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
-
createUnsafePool
public static <T> ObjectPool<T> createUnsafePool(int max, Supplier<T> creator, Consumer<T> prepare, Predicate<T> recycler)
-
createUnsafePool
public static <T> ObjectPool<T> createUnsafePool(LongAdder creatCounter, LongAdder cycleCounter, int max, Supplier<T> creator, Consumer<T> prepare, Predicate<T> recycler)
-
createUnsafePool
public static <T> ObjectPool<T> createUnsafePool(LongAdder creatCounter, LongAdder cycleCounter, int max, Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
-
createUnsafePool
public static <T> ObjectPool<T> createUnsafePool(ObjectPool<T> parent, Class<T> clazz, Consumer<T> prepare, Predicate<T> recycler)
-
createUnsafePool
public static <T> ObjectPool<T> createUnsafePool(ObjectPool<T> parent, int max, Class<T> clazz, Consumer<T> prepare, Predicate<T> recycler)
-
createUnsafePool
public static <T> ObjectPool<T> createUnsafePool(ObjectPool<T> parent, Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
-
createUnsafePool
public static <T> ObjectPool<T> createUnsafePool(ObjectPool<T> parent, int max, Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
-
createUnsafePool
public static <T> ObjectPool<T> createUnsafePool(ObjectPool<T> parent, int max, Supplier<T> creator, Consumer<T> prepare, Predicate<T> recycler)
-
createUnsafePool
public static <T> ObjectPool<T> createUnsafePool(ObjectPool<T> parent, LongAdder creatCounter, LongAdder cycleCounter, int max, Supplier<T> creator, Consumer<T> prepare, Predicate<T> recycler)
-
createUnsafePool
public static <T> ObjectPool<T> createUnsafePool(ObjectPool<T> parent, LongAdder creatCounter, LongAdder cycleCounter, int max, Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
-
createUnsafePool
public static <T> ObjectPool<T> createUnsafePool(ObjectPool<T> parent, LongAdder creatCounter, LongAdder cycleCounter, Thread unsafeThread, int max, Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
-
createUnsafePool
public static <T> ObjectPool<T> createUnsafePool(Thread unsafeThread, int max, ObjectPool<T> safePool)
-
createSafePool
public static <T> ObjectPool<T> createSafePool(Class<T> clazz, Consumer<T> prepare, Predicate<T> recycler)
-
createSafePool
public static <T> ObjectPool<T> createSafePool(int max, Class<T> clazz, Consumer<T> prepare, Predicate<T> recycler)
-
createSafePool
public static <T> ObjectPool<T> createSafePool(Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
-
createSafePool
public static <T> ObjectPool<T> createSafePool(int max, Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
-
createSafePool
public static <T> ObjectPool<T> createSafePool(int max, Supplier<T> creator, Consumer<T> prepare, Predicate<T> recycler)
-
createSafePool
public static <T> ObjectPool<T> createSafePool(LongAdder creatCounter, LongAdder cycleCounter, int max, Supplier<T> creator, Consumer<T> prepare, Predicate<T> recycler)
-
createSafePool
public static <T> ObjectPool<T> createSafePool(LongAdder creatCounter, LongAdder cycleCounter, int max, Creator<T> creator, Consumer<T> prepare, Predicate<T> recycler)
-
getMax
public int getMax()
-
getCreatCounter
public LongAdder getCreatCounter()
-
getCycleCounter
public LongAdder getCycleCounter()
-
getCreatCount
public long getCreatCount()
-
getCycleCount
public long getCycleCount()
-
-