Package org.infinispan.client.hotrod
Interface RemoteCacheContainer
- All Superinterfaces:
BasicCacheContainer
,Lifecycle
- All Known Implementing Classes:
RemoteCacheManager
-
Method Summary
Modifier and TypeMethodDescription<K,
V> RemoteCache<K, V> getCache()
Retrieves the default cache associated with this cache container.default <K,
V> RemoteCache<K, V> getCache
(boolean forceReturnValue) Deprecated, for removal: This API element is subject to removal in a future version.since 11.0.<K,
V> RemoteCache<K, V> Retrieves a cache by name.default <K,
V> RemoteCache<K, V> Deprecated, for removal: This API element is subject to removal in a future version.since 11.0.default <K,
V> RemoteCache<K, V> getCache
(String cacheName, boolean forceReturnValue, javax.transaction.TransactionManager transactionManager) Deprecated, for removal: This API element is subject to removal in a future version.since 11.0.default <K,
V> RemoteCache<K, V> getCache
(String cacheName, boolean forceReturnValue, TransactionMode transactionMode) Deprecated, for removal: This API element is subject to removal in a future version.since 11.0.<K,
V> RemoteCache<K, V> getCache
(String cacheName, boolean forceReturnValue, TransactionMode transactionMode, javax.transaction.TransactionManager transactionManager) Deprecated, for removal: This API element is subject to removal in a future version.since 11.0.default <K,
V> RemoteCache<K, V> Deprecated, for removal: This API element is subject to removal in a future version.since 11.0.default <K,
V> RemoteCache<K, V> getCache
(String cacheName, TransactionMode transactionMode) Deprecated, for removal: This API element is subject to removal in a future version.since 11.0.<K,
V> RemoteCache<K, V> getCache
(String cacheName, TransactionMode transactionMode, javax.transaction.TransactionManager transactionManager) Deprecated, for removal: This API element is subject to removal in a future version.since 11.0.Retrieves the configuration currently in use.Returns the name of the currently active cluster.boolean
boolean
isTransactional
(String cacheName) boolean
switchToCluster
(String clusterName) Switch remote cache manager to a different cluster, previously declared via configuration.boolean
Switch remote cache manager to a the default cluster, previously declared via configuration.Methods inherited from interface org.infinispan.commons.api.BasicCacheContainer
getCacheNames
-
Method Details
-
getCache
Description copied from interface:BasicCacheContainer
Retrieves the default cache associated with this cache container.- Specified by:
getCache
in interfaceBasicCacheContainer
- Returns:
- the default cache.
- See Also:
-
getCache
Description copied from interface:BasicCacheContainer
Retrieves a cache by name. If the cache has been previously created with the same name, the running cache instance is returned. Otherwise, this method attempts to create the cache first.- Specified by:
getCache
in interfaceBasicCacheContainer
- Parameters:
cacheName
- name of cache to retrieve- Returns:
- a cache instance identified by cacheName
- 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(forRemoval=true) default <K,V> RemoteCache<K,V> getCache(String cacheName, boolean forceReturnValue) Deprecated, for removal: This API element is subject to removal in a future version.since 11.0. UseConfigurationBuilder.remoteCache(String)
to configure the cache and thengetCache(String)
to obtain it.Same asgetCache(cacheName, forceReturnValue, null, null)
-
getCache
Deprecated, for removal: This API element is subject to removal in a future version.since 11.0. UseConfigurationBuilder.remoteCache(String)
to configure the cache and thengetCache(String)
to obtain it.Same asgetCache("", forceReturnValue, null, null)
-
getCache
@Deprecated(forRemoval=true) default <K,V> RemoteCache<K,V> getCache(String cacheName, TransactionMode transactionMode) Deprecated, for removal: This API element is subject to removal in a future version.since 11.0. UseConfigurationBuilder.remoteCache(String)
to configure the cache and thengetCache(String)
to obtain it.Same asgetCache(cacheName, transactionMode, null)
-
getCache
@Deprecated(forRemoval=true) default <K,V> RemoteCache<K,V> getCache(String cacheName, boolean forceReturnValue, TransactionMode transactionMode) Deprecated, for removal: This API element is subject to removal in a future version.since 11.0. UseConfigurationBuilder.remoteCache(String)
to configure the cache and thengetCache(String)
to obtain it.Same asgetCache(cacheName, forceReturnValue, transactionMode, null)
-
getCache
@Deprecated(forRemoval=true) default <K,V> RemoteCache<K,V> getCache(String cacheName, javax.transaction.TransactionManager transactionManager) Deprecated, for removal: This API element is subject to removal in a future version.since 11.0. UseConfigurationBuilder.remoteCache(String)
to configure the cache and thengetCache(String)
to obtain it.Same asgetCache(cacheName, null, transactionManager)
-
getCache
@Deprecated(forRemoval=true) default <K,V> RemoteCache<K,V> getCache(String cacheName, boolean forceReturnValue, javax.transaction.TransactionManager transactionManager) Deprecated, for removal: This API element is subject to removal in a future version.since 11.0. UseConfigurationBuilder.remoteCache(String)
to configure the cache and thengetCache(String)
to obtain it.Same asgetCache(cacheName, forceReturnValue, null, transactionManager)
-
getCache
@Deprecated(forRemoval=true) <K,V> RemoteCache<K,V> getCache(String cacheName, TransactionMode transactionMode, javax.transaction.TransactionManager transactionManager) Deprecated, for removal: This API element is subject to removal in a future version.since 11.0. UseConfigurationBuilder.remoteCache(String)
to configure the cache and thengetCache(String)
to obtain it.- Parameters:
cacheName
- The cache's name.transactionMode
- TheTransactionMode
to override. Ifnull
, it uses the configured value.transactionManager
- TheTransactionManager
to override. Ifnull
, it uses the configured value.- Returns:
- the
RemoteCache
implementation.
-
getCache
@Deprecated(forRemoval=true) <K,V> RemoteCache<K,V> getCache(String cacheName, boolean forceReturnValue, TransactionMode transactionMode, javax.transaction.TransactionManager transactionManager) Deprecated, for removal: This API element is subject to removal in a future version.since 11.0. UseConfigurationBuilder.remoteCache(String)
to configure the cache and thengetCache(String)
to obtain it.- Parameters:
cacheName
- The cache's name.forceReturnValue
-true
to force a return value when it is not needed.transactionMode
- TheTransactionMode
to override. Ifnull
, it uses the configured value.transactionManager
- TheTransactionManager
to override. Ifnull
, it uses the configured value.- Returns:
- the
RemoteCache
implementation.
-
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:
true
if the cluster was switched,false
otherwise
-
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:
true
if the cluster was switched,false
otherwise
-
getCurrentClusterName
String getCurrentClusterName()Returns the name of the currently active cluster.- Returns:
- the name of the active cluster
-
getMarshaller
Marshaller getMarshaller() -
isTransactional
- Returns:
true
if the cache with namecacheName
can participate in transactions.
-