Package io.netty.util.internal
Class ObjectPool<T>
- java.lang.Object
-
- io.netty.util.internal.ObjectPool<T>
-
- Type Parameters:
T- the type of the pooled object
public abstract class ObjectPool<T> extends java.lang.ObjectLight-weight object pool.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceObjectPool.Handle<T>Handle for an pooledObjectthat will be used to notify theObjectPoolonce it can reuse the pooledObjectagain.static interfaceObjectPool.ObjectCreator<T>Deprecated.For removal.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract Tget()Deprecated.For removal.static <T> ObjectPool<T>newPool(ObjectPool.ObjectCreator<T> creator)Deprecated.For removal.
-
-
-
Method Detail
-
get
@Deprecated public abstract T get()
Deprecated.For removal. Please useRecycler.get()instead.Get aObjectfrom theObjectPool. The returnedObjectmay be created viaObjectPool.ObjectCreator.newObject(Handle)if no pooledObjectis ready to be reused.
-
newPool
@Deprecated public static <T> ObjectPool<T> newPool(ObjectPool.ObjectCreator<T> creator)
Deprecated.For removal. Please useRecycler()instead.Creates a newObjectPoolwhich will use the givenObjectPool.ObjectCreatorto create theObjectthat should be pooled.
-
-