|
||||||||||
| PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.util.SynchronizedCachePolicy
A synchronized cache policy wrapper.
CachePolicy (src) | Constructor Summary | |
SynchronizedCachePolicy(CachePolicy (src) delegate)
|
|
| Method Summary | |
void |
create()
create the service, do expensive operations etc |
void |
destroy()
destroy the service, tear down |
void |
flush()
Flushes the cached objects from the cache. |
java.lang.Object |
get(java.lang.Object key)
Returns the object paired with the specified key if it's present in the cache, otherwise must return null. |
void |
insert(java.lang.Object key,
java.lang.Object object)
Inserts the specified object into the cache following the implemented policy. |
java.lang.Object |
peek(java.lang.Object key)
Returns the object paired with the specified key if it's present in the cache, otherwise must return null. |
void |
remove(java.lang.Object key)
Remove the cached object paired with the specified key. |
int |
size()
Get the size of the cache. |
void |
start()
start the service, create is already called |
void |
stop()
stop the service |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SynchronizedCachePolicy(CachePolicy (src) delegate)
| Method Detail |
public java.lang.Object get(java.lang.Object key)
CachePolicy (src) CachePolicy.peek(java.lang.Object) this method not only return whether
the object is present in the cache or not, but also
applies the implemented policy that will "refresh" the cached
object in the cache, because this cached object
was really requested.
get in interface CachePolicy (src) key - the key paired with the objectCachePolicy.peek(java.lang.Object)public java.lang.Object peek(java.lang.Object key)
CachePolicy (src) CachePolicy.get(java.lang.Object).
peek in interface CachePolicy (src) key - the key paired with the objectCachePolicy.get(java.lang.Object)
public void insert(java.lang.Object key,
java.lang.Object object)
CachePolicy (src)
insert in interface CachePolicy (src) key - the key paired with the objectobject - the object to cacheCachePolicy.remove(java.lang.Object)public void remove(java.lang.Object key)
CachePolicy (src)
remove in interface CachePolicy (src) key - the key paired with the objectCachePolicy.insert(java.lang.Object, java.lang.Object)public void flush()
CachePolicy (src)
flush in interface CachePolicy (src) public int size()
CachePolicy (src)
size in interface CachePolicy (src)
public void create()
throws java.lang.Exception
CachePolicy (src)
create in interface CachePolicy (src) java.lang.Exception
public void start()
throws java.lang.Exception
CachePolicy (src)
start in interface CachePolicy (src) java.lang.Exceptionpublic void stop()
CachePolicy (src)
stop in interface CachePolicy (src) public void destroy()
CachePolicy (src)
destroy in interface CachePolicy (src)
|
||||||||||
| PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||