Package org.infinispan.client.hotrod
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()default <K,V> RemoteCache <K, V> getCache(boolean forceReturnValue) Deprecated.since 11.0.<K,V> RemoteCache <K, V> default <K,V> RemoteCache <K, V> Deprecated.since 11.0.default <K,V> RemoteCache <K, V> getCache(String cacheName, boolean forceReturnValue, jakarta.transaction.TransactionManager transactionManager) Deprecated.since 11.0.default <K,V> RemoteCache <K, V> getCache(String cacheName, boolean forceReturnValue, TransactionMode transactionMode) Deprecated.since 11.0.<K,V> RemoteCache <K, V> getCache(String cacheName, boolean forceReturnValue, TransactionMode transactionMode, jakarta.transaction.TransactionManager transactionManager) Deprecated.since 11.0.default <K,V> RemoteCache <K, V> Deprecated.since 11.0.default <K,V> RemoteCache <K, V> getCache(String cacheName, TransactionMode transactionMode) Deprecated.since 11.0.<K,V> RemoteCache <K, V> getCache(String cacheName, TransactionMode transactionMode, jakarta.transaction.TransactionManager transactionManager) Deprecated.since 11.0.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 a the default cluster, previously declared via configuration.Methods inherited from interface org.infinispan.commons.api.BasicCacheContainer
getCacheNamesMethods 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
-
getCache
Deprecated.since 11.0. UseConfigurationBuilder.remoteCache(String)to configure the cache and thengetCache(String)to obtain it.Same asgetCache(cacheName, forceReturnValue, null, null)- See Also:
-
getCache
Deprecated.since 11.0. UseConfigurationBuilder.remoteCache(String)to configure the cache and thengetCache(String)to obtain it.Same asgetCache("", forceReturnValue, null, null)- See Also:
-
getCache
@Deprecated default <K,V> RemoteCache<K,V> getCache(String cacheName, TransactionMode transactionMode) Deprecated.since 11.0. UseConfigurationBuilder.remoteCache(String)to configure the cache and thengetCache(String)to obtain it.Same asgetCache(cacheName, transactionMode, null)- See Also:
-
getCache
@Deprecated default <K,V> RemoteCache<K,V> getCache(String cacheName, boolean forceReturnValue, TransactionMode transactionMode) Deprecated.since 11.0. UseConfigurationBuilder.remoteCache(String)to configure the cache and thengetCache(String)to obtain it.Same asgetCache(cacheName, forceReturnValue, transactionMode, null)- See Also:
-
getCache
@Deprecated default <K,V> RemoteCache<K,V> getCache(String cacheName, jakarta.transaction.TransactionManager transactionManager) Deprecated.since 11.0. UseConfigurationBuilder.remoteCache(String)to configure the cache and thengetCache(String)to obtain it.Same asgetCache(cacheName, null, transactionManager)- See Also:
-
getCache
@Deprecated default <K,V> RemoteCache<K,V> getCache(String cacheName, boolean forceReturnValue, jakarta.transaction.TransactionManager transactionManager) Deprecated.since 11.0. UseConfigurationBuilder.remoteCache(String)to configure the cache and thengetCache(String)to obtain it.Same asgetCache(cacheName, forceReturnValue, null, transactionManager)- See Also:
-
getCache
@Deprecated <K,V> RemoteCache<K,V> getCache(String cacheName, TransactionMode transactionMode, jakarta.transaction.TransactionManager transactionManager) Deprecated.since 11.0. UseConfigurationBuilder.remoteCache(String)to configure the cache and thengetCache(String)to obtain it.- Parameters:
cacheName- The cache's name.transactionMode- TheTransactionModeto override. Ifnull, it uses the configured value.transactionManager- TheTransactionManagerto override. Ifnull, it uses the configured value.- Returns:
- the
RemoteCacheimplementation.
-
getCache
@Deprecated <K,V> RemoteCache<K,V> getCache(String cacheName, boolean forceReturnValue, TransactionMode transactionMode, jakarta.transaction.TransactionManager transactionManager) Deprecated.since 11.0. UseConfigurationBuilder.remoteCache(String)to configure the cache and thengetCache(String)to obtain it.- Parameters:
cacheName- The cache's name.forceReturnValue-trueto force a return value when it is not needed.transactionMode- TheTransactionModeto override. Ifnull, it uses the configured value.transactionManager- TheTransactionManagerto override. Ifnull, it uses the configured value.- Returns:
- the
RemoteCacheimplementation.
-
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 a 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.
-