public class ImmediatePooled<T> extends Object implements Pooled<T>
Constructor and Description |
---|
ImmediatePooled(T value) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Delegates to
Pooled.free() . |
void |
discard()
Discard this resource.
|
void |
free()
Free this resource for immediate re-use.
|
T |
getResource()
Get the pooled resource.
|
public ImmediatePooled(T value)
public void discard()
Pooled
public void free()
Pooled
Pooled.discard()
instead.public T getResource() throws IllegalStateException
Pooled
getResource
in interface Pooled<T>
IllegalStateException
- if the resource has been freed or discarded alreadypublic void close()
Pooled
Pooled.free()
.close
in interface AutoCloseable
close
in interface Pooled<T>
Copyright © 2017 JBoss by Red Hat. All rights reserved.