Interface RemoteCacheContainer

All Superinterfaces:
BasicCacheContainer, Lifecycle
All Known Implementing Classes:
RemoteCacheManager

public interface RemoteCacheContainer extends BasicCacheContainer
  • Method Details

    • 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 interface BasicCacheContainer
      Returns:
      the default cache.
      See Also:
    • 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 interface BasicCacheContainer
      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
    • 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 returns true, otherwise it returns false.
      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 the default cluster, previously declared via configuration. If the switch was completed successfully, this method returns true, otherwise it returns false.
      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

      boolean isTransactional(String cacheName)
      Returns:
      true if the cache with name cacheName can participate in transactions.