Top Description Fields Constructors Methods
stormpot

public Class Pooled<T>

extends BasePoolable
implements Poolable, AutoCloseable
Class Inheritance
All Implemented Interfaces
java.lang.AutoCloseable, stormpot.Poolable

A reference to a pooled object.

Field Summary

Modifier and TypeField and Description
public final T
object

The object managed by this pooled instance.

Inherited from stormpot.BasePoolable:
slot

Constructor Summary

AccessConstructor and Description
public
Pooled(Slot
The slot an object is being allocated for.
slot
,
T
The object this pooled instance represents.
object
)

Create a pooled object for the given slot and object to be pooled.

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.lang.AutoCloseable.close.

`Pooled` implements AutoCloseable as a convenient way to release claimed objects back to the pool, using the try-with-resources syntax.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from stormpot.BasePoolable:
expirerelease

Field Detail

objectback to summary
public final T object

The object managed by this pooled instance.

Constructor Detail

Pooledback to summary
public Pooled(Slot slot, T object)

Create a pooled object for the given slot and object to be pooled.

Parameters
slot:Slot

The slot an object is being allocated for.

object:T

The object this pooled instance represents.

Method Detail

closeback to summary
public void close()

Implements java.lang.AutoCloseable.close.

`Pooled` implements AutoCloseable as a convenient way to release claimed objects back to the pool, using the try-with-resources syntax.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override