Package org.xnio
Interface Pooled<T>
- Type Parameters:
T
- the pooled resource type
- All Superinterfaces:
AutoCloseable
Deprecated.
A resource which is pooled.
- Author:
- David M. Lloyd
-
Method Summary
-
Method Details
-
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
Deprecated.Get the pooled resource.- Returns:
- the pooled resource
- Throws:
IllegalStateException
- if the resource has been freed or discarded already
-
close
void close()Deprecated.Delegates tofree()
.- Specified by:
close
in interfaceAutoCloseable
-
ByteBufferPool
.