|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openejb.core.stateful.SimpleCache<K,V>
public class SimpleCache<K,V>
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.openejb.core.stateful.Cache |
|---|
Cache.CacheFilter<V>, Cache.CacheListener<V>, Cache.TimeOut |
| 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,
boolean loadEntryIfNotFound)
Marks the entry checked-out, so this entry can not be accessed until checked-in. |
void |
destroy()
Destroy the cache. |
int |
getBulkPassivate()
|
int |
getCapacity()
|
long |
getFrequency()
|
Cache.CacheListener<V> |
getListener()
Gets the listener for cache events. |
PassivationStrategy |
getPassivator()
|
ScheduledExecutorService |
getScheduledExecutorService()
|
long |
getTimeOut()
|
void |
init()
Initialize the cache. |
void |
processLRU()
|
V |
remove(K key)
Removes the entry from the cache. |
void |
removeAll(Cache.CacheFilter<V> filter)
Removes all of the entries that match the specified filter. |
void |
setBulkPassivate(int bulkPassivate)
|
void |
setCapacity(int capacity)
|
void |
setFrequency(String frequency)
|
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 |
setScheduledExecutorService(ScheduledExecutorService executor)
|
void |
setTimeOut(String 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 void init()
Cache
init in interface Cache<K,V>public void destroy()
Cache
destroy in interface Cache<K,V>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
Exceptionpublic 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(String timeOut)
public void setScheduledExecutorService(ScheduledExecutorService executor)
public ScheduledExecutorService getScheduledExecutorService()
public void setFrequency(String frequency)
public long getFrequency()
public void add(K key,
V value)
Cache
add in interface Cache<K,V>
public V checkOut(K key,
boolean loadEntryIfNotFound)
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 | |||||||||