|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.openejb.core.managed.SimpleCache<K,V>
public class SimpleCache<K,V>
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.openejb.core.managed.Cache |
---|
Cache.CacheFilter<V>, Cache.CacheListener<V> |
Field Summary | |
---|---|
static Logger |
logger
|
Constructor Summary | |
---|---|
SimpleCache()
|
|
SimpleCache(Cache.CacheListener<V> listener,
PassivationStrategy passivator,
int capacity,
int bulkPassivate,
Duration timeOut)
|
Method Summary | |
---|---|
void |
add(K key,
V value)
Add a new entry to the cache. |
void |
checkIn(K key)
Marks the entry available, so it can be accessed again. |
V |
checkOut(K key)
Marks the entry checked-out, so this entry can not be accessed until checked-in. |
int |
getBulkPassivate()
|
int |
getCapacity()
|
Cache.CacheListener<V> |
getListener()
Gets the listener for cache events. |
PassivationStrategy |
getPassivator()
|
long |
getTimeOut()
|
void |
processLRU()
|
V |
remove(K key)
Removes the entry from the cache. |
void |
removeAll(Cache.CacheFilter<V> filter)
Removes all of th entries that match the specified filter. |
void |
setBulkPassivate(int bulkPassivate)
|
void |
setCapacity(int capacity)
|
void |
setListener(Cache.CacheListener<V> listener)
Sets the listener for cache events. |
void |
setPassivator(Class<? extends PassivationStrategy> passivatorClass)
|
void |
setPassivator(PassivationStrategy passivator)
|
void |
setPoolSize(int capacity)
|
void |
setTimeOut(long timeOut)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Logger logger
Constructor Detail |
---|
public SimpleCache()
public SimpleCache(Cache.CacheListener<V> listener, PassivationStrategy passivator, int capacity, int bulkPassivate, Duration timeOut)
Method Detail |
---|
public Cache.CacheListener<V> getListener()
Cache
getListener
in interface Cache<K,V>
public void setListener(Cache.CacheListener<V> listener)
Cache
setListener
in interface Cache<K,V>
public PassivationStrategy getPassivator()
public void setPassivator(PassivationStrategy passivator)
public void setPassivator(Class<? extends PassivationStrategy> passivatorClass) throws Exception
Exception
public int getCapacity()
public void setCapacity(int capacity)
public void setPoolSize(int capacity)
public int getBulkPassivate()
public void setBulkPassivate(int bulkPassivate)
public long getTimeOut()
public void setTimeOut(long timeOut)
public void add(K key, V value)
Cache
add
in interface Cache<K,V>
public V checkOut(K key) throws Exception
Cache
checkOut
in interface Cache<K,V>
IllegalStateException
- if the entry is already checked out.
Exception
- if an entry is loaded and the afterLoad method threw an
exceptionpublic void checkIn(K key)
Cache
checkIn
in interface Cache<K,V>
public V remove(K key)
Cache
remove
in interface Cache<K,V>
public void removeAll(Cache.CacheFilter<V> filter)
Cache
removeAll
in interface Cache<K,V>
public void processLRU()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |