|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.websphere.objectgrid.spring.ObjectGridCache
public final class ObjectGridCache
This class is a WebSphere eXtreme Scale implementation of the Spring Framework's Cache
interface.
Users must provide a name and a ObjectGridClientBean to configure this cache. The ObjectMap name
is optional when using the provided XML configuration files.
This implementation allows for the storage of null values and does not support null keys.
The following Spring Inversion of Control (IoC) container configuration snippet creates two caches, named default and books hosted by the catalog service domain with connection end-points of host1:2809,host2:2809.
<bean id="wxsCSDomain" class="com.ibm.websphere.objectgrid.spring.ObjectGridCatalogServiceDomainBean"
p:catalog-service-endpoints="host1:2809,host2:2809" />
<bean id="wxsGridClient" class="com.ibm.websphere.objectgrid.spring.ObjectGridClientBean"
p:catalog-service-domain-ref="wxsCSDomain" />
<bean id="cacheManager" class="org.springframework.cache.support.SimpleCacheManager">
<property name="caches">
<set>
<bean class="com.ibm.websphere.objectgrid.spring.ObjectGridCache"
p:name="default"
p:object-grid-client-ref="wxsGridClient" />
<bean class="com.ibm.websphere.objectgrid.spring.ObjectGridCache"
p:name="books"
p:object-grid-client-ref="wxsGridClient" />
</set>
</property>
</bean>
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.springframework.cache.Cache |
|---|
Cache.ValueWrapper |
| Constructor Summary | |
|---|---|
ObjectGridCache()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
Initializes this cache. |
void |
clear()
Clears all entries from the cache. |
void |
evict(Object key)
Evicts the entry at the given key. |
Cache.ValueWrapper |
get(Object key)
Retrieves the object from the cache at the given key. |
String |
getName()
Returns the name of the cache. |
Object |
getNativeCache()
This implementation returns null. |
void |
put(Object key,
Object value)
Creates an entry in the cache. |
void |
setMapName(String mapName)
Sets the ObjectMap name. |
void |
setName(String name)
Sets the cache name. |
void |
setObjectGridClient(ObjectGridClientBean objectGridClient)
Sets the ObjectGridClientBean to use. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectGridCache()
| Method Detail |
|---|
public void afterPropertiesSet()
throws Exception
IllegalArgumentException if setObjectGridClient(ObjectGridClientBean) or
setName(String) have not been called prior.
afterPropertiesSet in interface InitializingBeanException - if setObjectGridClient(ObjectGridClientBean) or setName(String)
have not been called prior or an error occurs initializing the cache.InitializingBean.afterPropertiesSet()public String getName()
getName in interface CacheCache.getName()public void setName(String name)
name - The cache name.getName()public void setMapName(String mapName)
mapName - The name of the ObjectMappublic void setObjectGridClient(ObjectGridClientBean objectGridClient)
ObjectGridClientBean to use.
objectGridClient - The ObjectGridClientBean to usepublic Object getNativeCache()
null.
getNativeCache in interface Cachenull.Cache.getNativeCache()public Cache.ValueWrapper get(Object key)
null if there is no mapping for the
key or if the key is null
get in interface Cachenull if there is no mapping or the key
is nullCache.get(java.lang.Object)public void put(Object key,
Object value)
null.
put in interface CacheCache.put(java.lang.Object, java.lang.Object)public void evict(Object key)
null this method does not evict any entries.
evict in interface CacheCache.evict(java.lang.Object)public void clear()
clear in interface CacheCache.clear()
|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||