|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.castor.cache.AbstractBaseCache
org.castor.cache.distributed.AbstractDistributedCache
org.castor.cache.distributed.GigaspacesCache
public final class GigaspacesCache
Gigaspaces implementation of Castor JDO Cache.
Gigaspaces supports a wide variety of cache topologies, allowing the user
to distribute and/or replicate application data as needed. This cache instance
replicates this flexibility by allowing you to configure it (and thus the
underlying Gigaspaces instance) as follows.
<cache-type type="gigaspaces"> <cacheUrl>/./</cacheURL> <cacheProperties>schema=cache</cacheProperties> </cache-type>As mentioned briefly above, the main issue is the cache topology usage. Per definition, Gigaspaces caches can be started in various modes:
instance 1:
"/./myCache?schema=cache&cluster_schema=replicated&total_members=2&id=1"
instance 2:
"/./myCache?schema=cache&cluster_schema=replicated&total_members=2&id=2"
instance 1:
"/./myCache?schema=cache&cluster_schema=partitioned&total_members=2&id=1"
instance 2:
"/./myCache?schema=cache&cluster_schema=partitioned&total_members=2&id=2"
When running the cache in server or in embedded mode, you must have the cache schema to be used, i.e. 'schema=cache'.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary | |
---|---|
static java.lang.String |
IMPLEMENTATION
The classname of the implementations factory class. |
static java.lang.String |
TYPE
The type of the cache. |
Fields inherited from interface org.castor.cache.Cache |
---|
DEFAULT_DEBUG, DEFAULT_NAME, DEFAULT_TYPE, PARAM_DEBUG, PARAM_NAME, PARAM_TYPE |
Constructor Summary | |
---|---|
GigaspacesCache()
|
Method Summary | |
---|---|
java.lang.String |
getType()
Indicates the type of this cache. |
void |
initialize(java.util.Properties params)
Lyfe-cycle method to allow custom initialization of cache implementations. |
void |
initialize(java.lang.String implementation,
java.util.Properties params)
Normally called to initialize CoherenceCache. |
Methods inherited from class org.castor.cache.distributed.AbstractDistributedCache |
---|
clear, containsKey, containsValue, entrySet, get, getCache, isEmpty, keySet, put, putAll, remove, setCache, size, values |
Methods inherited from class org.castor.cache.AbstractBaseCache |
---|
close, expire, expireAll, getName, invokeMethod, invokeStaticMethod |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Field Detail |
---|
public static final java.lang.String TYPE
public static final java.lang.String IMPLEMENTATION
Constructor Detail |
---|
public GigaspacesCache()
Method Detail |
---|
public void initialize(java.util.Properties params) throws CacheAcquireException
initialize
in interface Cache
initialize
in class AbstractBaseCache
params
- Parameters to initialize the cache (e.g. name, capacity).
CacheAcquireException
- If cache can not be initialized.public void initialize(java.lang.String implementation, java.util.Properties params) throws CacheAcquireException
com.tangosol.net.CacheFactory
implementation,
it can also be called with a test implementations classname.
implementation
- Cache implementation classname to initialize.params
- Parameters to initialize the cache (e.g. name, capacity).
CacheAcquireException
- If cache can not be initialized.public java.lang.String getType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |