DefaultPooledObject to wrap pooled soft references.
This class is intended to be thread-safe.
| Modifier and Type | Field and Description |
|---|---|
| private volatile SoftReference | reference
SoftReference wrapped by this object |
| Access | Constructor and Description |
|---|---|
| public | PooledSoftReference(final SoftReference<T>
SoftReference to be managed by the pool reference)Creates a new PooledSoftReference wrapping the provided reference. |
| Modifier and Type | Method and Description |
|---|---|
| public T | Returns: Object referred to by the SoftReferenceOverrides org. Implements org. |
| public synchronized SoftReference | |
| public synchronized void | |
| public String | toString()
Overrides org. Implements org. |
| reference | back to summary |
|---|---|
| private volatile SoftReference<T> reference SoftReference wrapped by this object | |
| PooledSoftReference | back to summary |
|---|---|
| public PooledSoftReference(final SoftReference<T> reference) Creates a new PooledSoftReference wrapping the provided reference.
| |
| getObject | back to summary |
|---|---|
| public T getObject() Overrides org. Implements org. Gets the object that the wrapped SoftReference refers to. Note that if the reference has been cleared, this method will return null.
| |
| getReference | back to summary |
|---|---|
| public synchronized SoftReference Gets the SoftReference wrapped by this object.
| |
| setReference | back to summary |
|---|---|
| public synchronized void setReference(final SoftReference<T> reference) Sets the wrapped reference. This method exists to allow a new, non-registered reference to be
held by the pool to track objects that have been checked out of the pool.
The actual parameter should be a reference to the same
object that
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Implements org. Doc from org. Gets a String form of the wrapper for debug purposes. The format is not fixed and may change at any time.
| |