-
- Type Parameters:
T- the pooled resource type
- All Superinterfaces:
java.lang.AutoCloseable
public interface Pooled<T> extends java.lang.AutoCloseableDeprecated.SeeByteBufferPool.A resource which is pooled.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidclose()Deprecated.Delegates tofree().voiddiscard()Deprecated.Discard this resource.voidfree()Deprecated.Free this resource for immediate re-use.TgetResource()Deprecated.Get the pooled resource.
-
-
-
Method Detail
-
discard
void discard()
Deprecated.Discard this resource. Any backing resources corresponding to this pooled resource will be rendered unavailable until the pooled resource has been garbage-collected.
-
free
void free()
Deprecated.Free this resource for immediate re-use. The resource must not be accessed again after calling this method; if it is possible that an instance is still in use, you must calldiscard()instead.
-
getResource
T getResource() throws java.lang.IllegalStateException
Deprecated.Get the pooled resource.- Returns:
- the pooled resource
- Throws:
java.lang.IllegalStateException- if the resource has been freed or discarded already
-
close
void close()
Deprecated.Delegates tofree().- Specified by:
closein interfacejava.lang.AutoCloseable
-
-