Interface CoherenceBasedCompleteConfiguration<K,​V>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addCacheEntryListenerConfiguration​(javax.cache.configuration.CacheEntryListenerConfiguration<K,​V> cfgListener)
      Add a configuration for a CacheEntryListener.
      void setCacheLoaderFactory​(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheLoader<K,​V>> factory)
      Set the CacheLoader factory.
      void setCacheWriterFactory​(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheWriter<? super K,​? super V>> factory)
      Set the CacheWriter factory.
      void setExpiryPolicyFactory​(javax.cache.configuration.Factory<? extends javax.cache.expiry.ExpiryPolicy> factory)
      Set the Factory for the ExpiryPolicy.
      void setManagementEnabled​(boolean fManagementEnabled)
      Set if JMX management is enabled for a configuration.
      void setReadThrough​(boolean fReadThrough)
      Set if read-through caching should be used.
      void setStatisticsEnabled​(boolean fStatisticsEnabled)
      Set if statistics gathering is enabled for a configuration.
      void setStoreByValue​(boolean fStoreByValue)
      Set if a configured cache should use store-by-value or store-by-reference semantics.
      void setTypes​(Class<K> clzKey, Class<V> clzValue)
      Sets the expected type of keys and values for a CoherenceBasedCache.
      void setWriteThrough​(boolean fWriteThrough)
      Set if write-through caching should be used.
      • Methods inherited from interface javax.cache.configuration.CompleteConfiguration

        getCacheEntryListenerConfigurations, getCacheLoaderFactory, getCacheWriterFactory, getExpiryPolicyFactory, isManagementEnabled, isReadThrough, isStatisticsEnabled, isWriteThrough
      • Methods inherited from interface javax.cache.configuration.Configuration

        getKeyType, getValueType, isStoreByValue
    • Method Detail

      • setTypes

        void setTypes​(Class<K> clzKey,
                      Class<V> clzValue)
        Sets the expected type of keys and values for a CoherenceBasedCache.

        Setting both to Object.class means type-safety checks are not required.

        Parameters:
        clzKey - the expected key type
        clzValue - the expected value type
        Throws:
        NullPointerException - should the key or value type be null
      • addCacheEntryListenerConfiguration

        void addCacheEntryListenerConfiguration​(javax.cache.configuration.CacheEntryListenerConfiguration<K,​V> cfgListener)
        Add a configuration for a CacheEntryListener.
        Parameters:
        cfgListener - the CacheEntryListenerConfiguration
        Throws:
        IllegalArgumentException - if the same CacheEntryListenerConfiguration is used more than once
      • setCacheLoaderFactory

        void setCacheLoaderFactory​(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheLoader<K,​V>> factory)
        Set the CacheLoader factory.
        Parameters:
        factory - the CacheLoader Factory
      • setCacheWriterFactory

        void setCacheWriterFactory​(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheWriter<? super K,​? super V>> factory)
        Set the CacheWriter factory.
        Parameters:
        factory - the CacheWriter Factory
      • setExpiryPolicyFactory

        void setExpiryPolicyFactory​(javax.cache.configuration.Factory<? extends javax.cache.expiry.ExpiryPolicy> factory)
        Set the Factory for the ExpiryPolicy.

        If null is specified the default ExpiryPolicy is used.

        Parameters:
        factory - the ExpiryPolicy Factory
      • setReadThrough

        void setReadThrough​(boolean fReadThrough)
        Set if read-through caching should be used.

        It is an invalid configuration to set this to true without specifying a CacheLoader Factory.

        Parameters:
        fReadThrough - true if read-through is required
      • setWriteThrough

        void setWriteThrough​(boolean fWriteThrough)
        Set if write-through caching should be used.

        It is an invalid configuration to set this to true without specifying a CacheWriter Factory.

        Parameters:
        fWriteThrough - true if write-through is required
      • setStoreByValue

        void setStoreByValue​(boolean fStoreByValue)
        Set if a configured cache should use store-by-value or store-by-reference semantics.
        Parameters:
        fStoreByValue - true for store-by-value semantics, false for store-by-reference semantics
      • setStatisticsEnabled

        void setStatisticsEnabled​(boolean fStatisticsEnabled)
        Set if statistics gathering is enabled for a configuration.

        Statistics may be enabled or disabled at runtime via CacheManager.enableStatistics(String, boolean).

        Parameters:
        fStatisticsEnabled - true to enable statistics gathering, false to disable
      • setManagementEnabled

        void setManagementEnabled​(boolean fManagementEnabled)
        Set if JMX management is enabled for a configuration.

        Management may be enabled or disabled at runtime via CacheManager.enableManagement(String, boolean).

        Parameters:
        fManagementEnabled - true to enable statistics, false to disable