public interface ICacheAccess
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Deprecated.
|
void |
destroy(java.lang.Object name)
Deprecated.
|
int |
freeMemoryElements(int numberToFree)
This instructs the memory cache to remove the numberToFree
according to its eviction policy.
|
java.lang.Object |
get(java.lang.Object name)
Basic get method.
|
ICompositeCacheAttributes |
getCacheAttributes()
Gets the ICompositeCacheAttributes of the cache region
|
ICacheElement |
getCacheElement(java.lang.Object name)
This method returns the ICacheElement wrapper which provides access to element info and other
attributes.
|
java.util.Map |
getCacheElements(java.util.Set names)
Get multiple elements from the cache based on a set of cache keys.
|
IElementAttributes |
getElementAttributes()
GetElementAttributes will return an attribute object describing the
current attributes associated with the object name.
|
IElementAttributes |
getElementAttributes(java.lang.Object name)
Gets the elementAttributes attribute of the ICacheAccess object
|
java.util.HashMap |
getMatching(java.lang.String pattern)
Retrieve matching objects from the cache region this instance provides access to.
|
java.util.Map |
getMatchingCacheElements(java.lang.String pattern)
Get multiple elements from the cache based on a set of cache keys.
|
void |
put(java.lang.Object name,
java.lang.Object obj)
Puts and/or overides an element with the name in that region.
|
void |
put(java.lang.Object name,
java.lang.Object obj,
IElementAttributes attr)
Description of the Method
|
void |
putSafe(java.lang.Object name,
java.lang.Object obj)
Puts in cache if an item does not exist with the name in that region.
|
void |
remove()
Old remove all method.
|
void |
remove(java.lang.Object name)
Remove an object for this key if one exists, else do nothing.
|
void |
resetElementAttributes(IElementAttributes attributes)
ResetAttributes allows for some of the attributes of a region to be reset
in particular expiration time attriubtes, time to live, default time to
live and idle time, and event handlers.
|
void |
resetElementAttributes(java.lang.Object name,
IElementAttributes attributes)
Reset the attributes on the object matching this key name.
|
void |
setCacheAttributes(ICompositeCacheAttributes cattr)
Sets the ICompositeCacheAttributes of the cache region
|
java.lang.Object get(java.lang.Object name)
name
- java.util.HashMap getMatching(java.lang.String pattern)
pattern
- - a key pattern for the objects storedvoid putSafe(java.lang.Object name, java.lang.Object obj) throws CacheException
name
- obj
- CacheException
void put(java.lang.Object name, java.lang.Object obj) throws CacheException
name
- obj
- CacheException
void put(java.lang.Object name, java.lang.Object obj, IElementAttributes attr) throws CacheException
name
- obj
- attr
- CacheException
ICacheElement getCacheElement(java.lang.Object name)
This returns a reference to the wrapper. Any modifications will be reflected in the cache. No defensive copy is made.
This method is most useful if you want to determine things such as the how long the element has been in the cache.
The last access time in the ElementAttributes should be current.
name
- Key the object is stored asjava.util.Map getCacheElements(java.util.Set names)
This method returns the ICacheElement wrapper which provides access to element info and other attributes.
This returns a reference to the wrapper. Any modifications will be reflected in the cache. No defensive copy is made.
This method is most useful if you want to determine things such as the how long the element has been in the cache.
The last access time in the ElementAttributes should be current.
names
- set of Object cache keysjava.util.Map getMatchingCacheElements(java.lang.String pattern)
This method returns the ICacheElement wrapper which provides access to element info and other attributes.
This returns a reference to the wrapper. Any modifications will be reflected in the cache. No defensive copy is made.
This method is most useful if you want to determine things such as the how long the element has been in the cache.
The last access time in the ElementAttributes should be current.
pattern
- key search paternvoid destroy() throws CacheException
CacheException
remove()
void remove() throws CacheException
CacheException
void destroy(java.lang.Object name) throws CacheException
name
- CacheException
remove(Object)
void remove(java.lang.Object name) throws CacheException
name
- CacheException
void resetElementAttributes(IElementAttributes attributes) throws CacheException
attributes
- CacheException
void resetElementAttributes(java.lang.Object name, IElementAttributes attributes) throws CacheException
name
- attributes
- CacheException
IElementAttributes getElementAttributes() throws CacheException
CacheException
IElementAttributes getElementAttributes(java.lang.Object name) throws CacheException
name
- CacheException
ICompositeCacheAttributes getCacheAttributes()
void setCacheAttributes(ICompositeCacheAttributes cattr)
cattr
- The new ICompositeCacheAttribute valueint freeMemoryElements(int numberToFree) throws CacheException
numberToFree
- CacheException
Copyright © 2002-2013 Apache Software Foundation. All Rights Reserved.