Top Description Fields Constructors Methods
io.undertow.util

public Class ImmediatePooled<T>

extends Object
implements Pooled<T>
Class Inheritance
All Implemented Interfaces
org.xnio.Pooled, java.lang.AutoCloseable
Imports
org.xnio.Pooled

References Deprecated

Pooled is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Wrapper that allows you to use a non-pooed item as a pooled value
Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
private final T

Constructor Summary

AccessConstructor and Description
public
ImmediatePooled(T value)

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements org.xnio.Pooled.close.

Delegates to free().

public void
discard()

Implements org.xnio.Pooled.discard.

Discard this resource.

public void
free()

Implements org.xnio.Pooled.free.

Free this resource for immediate re-use.

public T
getResource()

Implements org.xnio.Pooled.getResource.

Get the pooled resource.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

valueback to summary
private final T value

Constructor Detail

ImmediatePooledback to summary
public ImmediatePooled(T value)

Method Detail

closeback to summary
public void close()

Implements org.xnio.Pooled.close.

Doc from org.xnio.Pooled.close.

Delegates to free().

Annotations
@Override
discardback to summary
public void discard()

Implements org.xnio.Pooled.discard.

Doc from org.xnio.Pooled.discard.

Discard this resource. Any backing resources corresponding to this pooled resource will be rendered unavailable until the pooled resource has been garbage-collected.

Annotations
@Override
freeback to summary
public void free()

Implements org.xnio.Pooled.free.

Doc from org.xnio.Pooled.free.

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 call discard() instead.

Annotations
@Override
getResourceback to summary
public T getResource() throws IllegalStateException

Implements org.xnio.Pooled.getResource.

Doc from org.xnio.Pooled.getResource.

Get the pooled resource.

Returns:T

the pooled resource

Annotations
@Override
Exceptions
IllegalStateException:
if the resource has been freed or discarded already