Interface RemoteCacheContainer
- All Superinterfaces:
org.infinispan.commons.api.BasicCacheContainer, org.infinispan.commons.api.Lifecycle
- All Known Implementing Classes:
RemoteCacheManager
public interface RemoteCacheContainer
extends org.infinispan.commons.api.BasicCacheContainer
-
Method Summary
Modifier and TypeMethodDescription<K,V> RemoteCache <K, V> getCache()<K,V> RemoteCache <K, V> Retrieves the configuration currently in use.Returns the name of the currently active cluster.org.infinispan.commons.marshall.MarshallerbooleanbooleanisTransactional(String cacheName) booleanswitchToCluster(String clusterName) Switch remote cache manager to a different cluster, previously declared via configuration.booleanSwitch remote cache manager to the default cluster, previously declared via configuration.Methods inherited from interface org.infinispan.commons.api.BasicCacheContainer
getCacheNames, stopCacheMethods inherited from interface org.infinispan.commons.api.Lifecycle
start, stop
-
Method Details
-
getCache
- Specified by:
getCachein interfaceorg.infinispan.commons.api.BasicCacheContainer- See Also:
-
getCache
- Specified by:
getCachein interfaceorg.infinispan.commons.api.BasicCacheContainer- See Also:
-
getConfiguration
Configuration getConfiguration()Retrieves the configuration currently in use. The configuration object is immutable. If you wish to change configuration, you should use the following pattern:ConfigurationBuilder builder = new ConfigurationBuilder(); builder.read(remoteCacheManager.getConfiguration()); // modify builder remoteCacheManager.stop(); remoteCacheManager = new RemoteCacheManager(builder.build());- Returns:
- The configuration of this RemoteCacheManager
-
isStarted
boolean isStarted() -
switchToCluster
Switch remote cache manager to a different cluster, previously declared via configuration. If the switch was completed successfully, this method returnstrue, otherwise it returnsfalse.- Parameters:
clusterName- name of the cluster to which to switch to- Returns:
trueif the cluster was switched,falseotherwise
-
switchToDefaultCluster
boolean switchToDefaultCluster()Switch remote cache manager to the default cluster, previously declared via configuration. If the switch was completed successfully, this method returnstrue, otherwise it returnsfalse.- Returns:
trueif the cluster was switched,falseotherwise
-
getCurrentClusterName
String getCurrentClusterName()Returns the name of the currently active cluster.- Returns:
- the name of the active cluster
-
getMarshaller
org.infinispan.commons.marshall.Marshaller getMarshaller() -
isTransactional
- Returns:
trueif the cache with namecacheNamecan participate in transactions.
-
administration
RemoteCacheManagerAdmin administration()
-