public abstract class ObjectCacheBase<E> extends java.lang.Object implements ObjectCache<E>
| Constructor and Description |
|---|
ObjectCacheBase(ObjectFactory<E> factory) |
| Modifier and Type | Method and Description |
|---|---|
E |
acquire()
Acquire an object from the object-cache.
|
CacheStats |
getCacheStats() |
void |
release(E e)
Release an object to the object-cache.
|
protected abstract E |
tryAcquire() |
protected abstract boolean |
tryRelease(E e) |
public ObjectCacheBase(ObjectFactory<E> factory)
public final E acquire()
ObjectCacheacquire in interface ObjectCache<E>public final void release(E e)
ObjectCacherelease in interface ObjectCache<E>e - The object to be released.public final CacheStats getCacheStats()
getCacheStats in interface ObjectCache<E>protected abstract E tryAcquire()
protected abstract boolean tryRelease(E e)
Copyright © 2012. All Rights Reserved.