Interface RemoteCacheContainer

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default <K,​V>
      RemoteCache<K,​V>
      getCache​(boolean forceReturnValue)
      Same as getCache("", forceReturnValue, null, null)
      default <K,​V>
      RemoteCache<K,​V>
      getCache​(java.lang.String cacheName, boolean forceReturnValue)
      Same as getCache(cacheName, forceReturnValue, null, null)
      default <K,​V>
      RemoteCache<K,​V>
      getCache​(java.lang.String cacheName, boolean forceReturnValue, javax.transaction.TransactionManager transactionManager)
      Same as getCache(cacheName, forceReturnValue, null, transactionManager)
      default <K,​V>
      RemoteCache<K,​V>
      getCache​(java.lang.String cacheName, boolean forceReturnValue, TransactionMode transactionMode)
      Same as getCache(cacheName, forceReturnValue, transactionMode, null)
      <K,​V>
      RemoteCache<K,​V>
      getCache​(java.lang.String cacheName, boolean forceReturnValue, TransactionMode transactionMode, javax.transaction.TransactionManager transactionManager)  
      default <K,​V>
      RemoteCache<K,​V>
      getCache​(java.lang.String cacheName, javax.transaction.TransactionManager transactionManager)
      Same as getCache(cacheName, null, transactionManager)
      default <K,​V>
      RemoteCache<K,​V>
      getCache​(java.lang.String cacheName, TransactionMode transactionMode)
      Same as getCache(cacheName, transactionMode, null)
      <K,​V>
      RemoteCache<K,​V>
      getCache​(java.lang.String cacheName, TransactionMode transactionMode, javax.transaction.TransactionManager transactionManager)  
      Configuration getConfiguration()
      Retrieves the configuration currently in use.
      Marshaller getMarshaller()  
      boolean isStarted()  
      boolean isTransactional​(java.lang.String cacheName)  
      boolean switchToCluster​(java.lang.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.
    • Method Detail

      • 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

        <K,​V> RemoteCache<K,​V> getCache​(java.lang.String cacheName,
                                                    TransactionMode transactionMode,
                                                    javax.transaction.TransactionManager transactionManager)
        Parameters:
        cacheName - The cache's name.
        transactionMode - The TransactionMode to override. If null, it uses the configured value.
        transactionManager - The TransactionManager to override. If null, it uses the configured value.
        Returns:
        the RemoteCache implementation.
      • getCache

        <K,​V> RemoteCache<K,​V> getCache​(java.lang.String cacheName,
                                                    boolean forceReturnValue,
                                                    TransactionMode transactionMode,
                                                    javax.transaction.TransactionManager transactionManager)
        Parameters:
        cacheName - The cache's name.
        forceReturnValue - true to force a return value when it is not needed.
        transactionMode - The TransactionMode to override. If null, it uses the configured value.
        transactionManager - The TransactionManager to override. If null, it uses the configured value.
        Returns:
        the RemoteCache implementation.
      • isStarted

        boolean isStarted()
      • switchToCluster

        boolean switchToCluster​(java.lang.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 a 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
      • isTransactional

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