- 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 T
object
The 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 void
close()
Pooled
implementsAutoCloseable
as a convenient way to release claimed objects back to the pool, using the try-with-resources syntax.java.lang.String
toString()
-
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()
Pooled
implementsAutoCloseable
as a convenient way to release claimed objects back to the pool, using the try-with-resources syntax.- Specified by:
close
in interfacejava.lang.AutoCloseable
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-