Package org.infinispan.client.hotrod
Interface RemoteCacheContainer
-
- All Superinterfaces:
BasicCacheContainer
,Lifecycle
- All Known Implementing Classes:
RemoteCacheManager
public interface RemoteCacheContainer extends BasicCacheContainer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description <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.since 11.0.<K,V>
RemoteCache<K,V>getCache(String cacheName)
Retrieves a cache by name.default <K,V>
RemoteCache<K,V>getCache(String cacheName, boolean forceReturnValue)
Deprecated.since 11.0.default <K,V>
RemoteCache<K,V>getCache(String cacheName, boolean forceReturnValue, 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, TransactionManager transactionManager)
Deprecated.since 11.0.default <K,V>
RemoteCache<K,V>getCache(String cacheName, TransactionManager transactionManager)
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, TransactionManager transactionManager)
Deprecated.since 11.0.Configuration
getConfiguration()
Retrieves the configuration currently in use.Marshaller
getMarshaller()
boolean
isStarted()
boolean
isTransactional(String cacheName)
boolean
switchToCluster(String clusterName)
Switch remote cache manager to a different cluster, previously declared via configuration.boolean
switchToDefaultCluster()
Switch remote cache manager to a the default cluster, previously declared via configuration.-
Methods inherited from interface org.infinispan.commons.api.BasicCacheContainer
getCacheNames
-
-
-
-
Method Detail
-
getCache
<K,V> RemoteCache<K,V> 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:
BasicCacheContainer.getCache()
-
getCache
<K,V> RemoteCache<K,V> getCache(String cacheName)
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:
BasicCacheContainer.getCache(String)
-
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 default <K,V> RemoteCache<K,V> getCache(String cacheName, boolean forceReturnValue)
Deprecated.since 11.0. UseConfigurationBuilder.remoteCache(String)
to configure the cache and thengetCache(String)
to obtain it.Same asgetCache(cacheName, forceReturnValue, null, null)
-
getCache
@Deprecated default <K,V> RemoteCache<K,V> getCache(boolean forceReturnValue)
Deprecated.since 11.0. UseConfigurationBuilder.remoteCache(String)
to configure the cache and thengetCache(String)
to obtain it.Same asgetCache("", forceReturnValue, null, null)
-
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)
-
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)
-
getCache
@Deprecated default <K,V> RemoteCache<K,V> getCache(String cacheName, TransactionManager transactionManager)
Deprecated.since 11.0. UseConfigurationBuilder.remoteCache(String)
to configure the cache and thengetCache(String)
to obtain it.Same asgetCache(cacheName, null, transactionManager)
-
getCache
@Deprecated default <K,V> RemoteCache<K,V> getCache(String cacheName, boolean forceReturnValue, 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)
-
getCache
@Deprecated <K,V> RemoteCache<K,V> getCache(String cacheName, TransactionMode transactionMode, 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
- 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 <K,V> RemoteCache<K,V> getCache(String cacheName, boolean forceReturnValue, TransactionMode transactionMode, 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
-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
boolean switchToCluster(String clusterName)
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
-
getMarshaller
Marshaller getMarshaller()
-
isTransactional
boolean isTransactional(String cacheName)
- Returns:
true
if the cache with namecacheName
can participate in transactions.
-
-