- java.lang.Object
-
- stormpot.BasePoolable
-
- stormpot.Pooled<T>
-
- All Implemented Interfaces:
java.lang.AutoCloseable,Poolable
public class Pooled<T> extends BasePoolable implements Poolable, java.lang.AutoCloseable
A reference to a pooled object.
-
-
Field Summary
Fields Modifier and Type Field Description TobjectThe object managed by this pooled instance.-
Fields inherited from class stormpot.BasePoolable
slot
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()PooledimplementsAutoCloseableas a convenient way to release claimed objects back to the pool, using the try-with-resources syntax.java.lang.StringtoString()-
Methods inherited from class stormpot.BasePoolable
expire, release
-
-
-
-
Field Detail
-
object
public final T object
The object managed by this pooled instance.
-
-
Method Detail
-
close
public void close()
PooledimplementsAutoCloseableas a convenient way to release claimed objects back to the pool, using the try-with-resources syntax.- Specified by:
closein interfacejava.lang.AutoCloseable
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-