com.hazelcast.config

## Class CacheConfigReadOnly<K,V>

- java.lang.Object
- - com.hazelcast.config.AbstractCacheConfig<K,V>
  - - com.hazelcast.config.CacheConfig<K,V>
    - - com.hazelcast.config.CacheConfigReadOnly<K,V>

- Type Parameters:
    `K` - type of the key
    `V` - type of the value
  All Implemented Interfaces:
    CacheConfiguration<K,V>, DataSerializable, SplitBrainMergeTypeProvider, Serializable, javax.cache.configuration.CompleteConfiguration<K,V>, javax.cache.configuration.Configuration<K,V>

  Deprecated.
  this class will be removed in 4.0; it is meant for internal usage only.

      public class CacheConfigReadOnly<K,V>
      extends CacheConfig<K,V>

  Readonly version of `CacheConfig`
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class com.hazelcast.config.AbstractCacheConfig

      `cacheLoaderFactory, cacheWriterFactory, classLoader, expiryPolicyFactory, hotRestartConfig, isManagementEnabled, isReadThrough, isStatisticsEnabled, isStoreByValue, isWriteThrough, listenerConfigurations, serializationService`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `CacheConfig<K,V>` | `addCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)` Deprecated. Add a configuration for a `CacheEntryListener`.
    `Iterable<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>>` | `getCacheEntryListenerConfigurations()` Deprecated.
    `CacheEvictionConfig` | `getEvictionConfig()` Deprecated. Gets the `EvictionConfig` instance of the eviction configuration for this `ICache`.
    `String` | `getQuorumName()` Deprecated. Gets the name of the associated quorum if any.
    `WanReplicationRef` | `getWanReplicationRef()` Deprecated.
    `CacheConfig<K,V>` | `removeCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)` Deprecated. Remove a configuration for a `CacheEntryListener`.
    `CacheConfig<K,V>` | `setAsyncBackupCount(int asyncBackupCount)` Deprecated. Sets the number of asynchronous backups for this `ICache`.
    `CacheConfig<K,V>` | `setBackupCount(int backupCount)` Deprecated. Sets the number of synchronous backups.
    `CacheConfiguration<K,V>` | `setCacheLoaderFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheLoader<K,V>> cacheLoaderFactory)` Deprecated. Set the `CacheLoader` factory.
    `CacheConfiguration<K,V>` | `setCacheWriterFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheWriter<? super K,? super V>> cacheWriterFactory)` Deprecated. Set the `CacheWriter` factory.
    `void` | `setDisablePerEntryInvalidationEvents(boolean disablePerEntryInvalidationEvents)` Deprecated. Sets invalidation events disabled status for per entry.
    `CacheConfig<K,V>` | `setEvictionConfig(EvictionConfig evictionConfig)` Deprecated. Sets the `EvictionConfig` instance for eviction configuration for this `ICache`.
    `CacheConfiguration<K,V>` | `setExpiryPolicyFactory(javax.cache.configuration.Factory<? extends javax.cache.expiry.ExpiryPolicy> expiryPolicyFactory)` Deprecated. Set the `Factory` for the `ExpiryPolicy`.
    `CacheConfiguration<K,V>` | `setHotRestartConfig(HotRestartConfig hotRestartConfig)` Deprecated. Sets the `HotRestartConfig` for this `CacheConfiguration`
    `CacheConfig<K,V>` | `setInMemoryFormat(InMemoryFormat inMemoryFormat)` Deprecated. Data type that will be used to store records in this `ICache`.
    `CacheConfig<K,V>` | `setManagementEnabled(boolean enabled)` Deprecated. Sets whether or not management is enabled on this cache.
    `CacheConfig<K,V>` | `setManagerPrefix(String managerPrefix)` Deprecated. Sets the manager prefix of the `ICache`.
    `void` | `setMergePolicy(String mergePolicy)` Deprecated. Sets the class name of `CacheMergePolicy` implementation to this cache config.
    `CacheConfig<K,V>` | `setName(String name)` Deprecated. Sets the name of this `ICache`.
    `CacheConfig<K,V>` | `setPartitionLostListenerConfigs(List<CachePartitionLostListenerConfig> partitionLostListenerConfigs)` Deprecated. Sets the WAN target replication reference.
    `CacheConfig<K,V>` | `setQuorumName(String quorumName)` Deprecated. Associates this cache configuration to a quorum.
    `CacheConfiguration<K,V>` | `setReadThrough(boolean isReadThrough)` Deprecated. Set if read-through caching should be used.
    `CacheConfiguration<K,V>` | `setStatisticsEnabled(boolean enabled)` Deprecated. Sets whether or not statistics gathering is enabled on this cache.
    `CacheConfig<K,V>` | `setStoreByValue(boolean storeByValue)` Deprecated. Set if a configured cache should use store-by-value or store-by-reference semantics.
    `CacheConfig<K,V>` | `setTypes(Class<K> keyType, Class<V> valueType)` Deprecated. Sets the expected type of keys and values for a `Cache` configured with this `Configuration`.
    `CacheConfig<K,V>` | `setUriString(String uriString)` Deprecated. Sets the URI string, which is the global identifier of the `ICache`.
    `CacheConfig<K,V>` | `setWanReplicationRef(WanReplicationRef wanReplicationRef)` Deprecated.
    `CacheConfiguration<K,V>` | `setWriteThrough(boolean isWriteThrough)` Deprecated. Set if write-through caching should be used.

    - ### Methods inherited from class com.hazelcast.config.CacheConfig

      `copy, equals, getAsReadOnly, getAsyncBackupCount, getBackupCount, getInMemoryFormat, getManagerPrefix, getMergePolicy, getName, getNameWithPrefix, getPartitionLostListenerConfigs, getProvidedMergeTypes, getTotalBackupCount, getUriString, hashCode, isDisablePerEntryInvalidationEvents, readData, readFactories, readKeyValueTypes, readListenerConfigurations, readTenant, toString, writeData, writeFactories, writeKeyValueTypes, writeListenerConfigurations, writeTenant`

    - ### Methods inherited from class com.hazelcast.config.AbstractCacheConfig

      `createConcurrentSet, getCacheLoaderFactory, getCacheWriterFactory, getExpiryPolicyFactory, getHotRestartConfig, getKeyClassName, getKeyType, getListenerConfigurations, getValueClassName, getValueType, hasListenerConfiguration, isManagementEnabled, isReadThrough, isStatisticsEnabled, isStoreByValue, isWriteThrough, keyValueTypesEqual, setClassLoader, setKeyClassName, setKeyType, setListenerConfigurations, setListenerConfigurations, setValueClassName, setValueType`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### getEvictionConfig

          public CacheEvictionConfig getEvictionConfig()

      Deprecated.
      Description copied from class: `CacheConfig`
      Gets the `EvictionConfig` instance of the eviction configuration for this `ICache`.
      Overrides:
        `getEvictionConfig` in class `CacheConfig<K,V>`
      Returns:
        the `EvictionConfig` instance of the eviction configuration

    - #### getWanReplicationRef

          public WanReplicationRef getWanReplicationRef()

      Deprecated.
      Overrides:
        `getWanReplicationRef` in class `CacheConfig<K,V>`

    - #### getQuorumName

          public String getQuorumName()

      Deprecated.
      Description copied from class: `CacheConfig`
      Gets the name of the associated quorum if any.
      Overrides:
        `getQuorumName` in class `CacheConfig<K,V>`
      Returns:
        the name of the associated quorum if any

    - #### getCacheEntryListenerConfigurations

          public Iterable<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> getCacheEntryListenerConfigurations()

      Deprecated.
      Specified by:
        `getCacheEntryListenerConfigurations` in interface `javax.cache.configuration.CompleteConfiguration<K,V>`
      Overrides:
        `getCacheEntryListenerConfigurations` in class `AbstractCacheConfig<K,V>`

    - #### addCacheEntryListenerConfiguration

          public CacheConfig<K,V> addCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)

      Deprecated.
      Description copied from class: `AbstractCacheConfig`
      Add a configuration for a `CacheEntryListener`.
      Specified by:
        `addCacheEntryListenerConfiguration` in interface `CacheConfiguration<K,V>`
      Overrides:
        `addCacheEntryListenerConfiguration` in class `AbstractCacheConfig<K,V>`
      Parameters:
        `cacheEntryListenerConfiguration` - the `CacheEntryListenerConfiguration`
      Returns:
        the `CacheConfig`

    - #### removeCacheEntryListenerConfiguration

          public CacheConfig<K,V> removeCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)

      Deprecated.
      Description copied from class: `AbstractCacheConfig`
      Remove a configuration for a `CacheEntryListener`.
      Specified by:
        `removeCacheEntryListenerConfiguration` in interface `CacheConfiguration<K,V>`
      Overrides:
        `removeCacheEntryListenerConfiguration` in class `AbstractCacheConfig<K,V>`
      Parameters:
        `cacheEntryListenerConfiguration` - the `CacheEntryListenerConfiguration` to remove
      Returns:
        the `CacheConfig`

    - #### setName

          public CacheConfig<K,V> setName(String name)

      Deprecated.
      Description copied from class: `CacheConfig`
      Sets the name of this `ICache`.
      Overrides:
        `setName` in class `CacheConfig<K,V>`
      Parameters:
        `name` - the name to set for this `ICache`
      Returns:
        the current cache config instance

    - #### setManagerPrefix

          public CacheConfig<K,V> setManagerPrefix(String managerPrefix)

      Deprecated.
      Description copied from class: `CacheConfig`
      Sets the manager prefix of the `ICache`.
      Overrides:
        `setManagerPrefix` in class `CacheConfig<K,V>`
      Parameters:
        `managerPrefix` - the manager prefix to set for this `ICache`
      Returns:
        the current cache config instance

    - #### setUriString

          public CacheConfig<K,V> setUriString(String uriString)

      Deprecated.
      Description copied from class: `CacheConfig`
      Sets the URI string, which is the global identifier of the `ICache`.
      Overrides:
        `setUriString` in class `CacheConfig<K,V>`
      Parameters:
        `uriString` - the URI string to set for this `ICache`
      Returns:
        the current cache config instance

    - #### setBackupCount

          public CacheConfig<K,V> setBackupCount(int backupCount)

      Deprecated.
      Description copied from class: `CacheConfig`
      Sets the number of synchronous backups. For example, if 1 is set as the backup count, then all entries of the map will be copied to another JVM for fail-safety. 0 means no synchronous backup.
      Overrides:
        `setBackupCount` in class `CacheConfig<K,V>`
      Parameters:
        `backupCount` - the number of synchronous backups to set for this `ICache`
      Returns:
        the current cache config instance
      See Also:
        `CacheConfig.setAsyncBackupCount(int)`

    - #### setAsyncBackupCount

          public CacheConfig<K,V> setAsyncBackupCount(int asyncBackupCount)

      Deprecated.
      Description copied from class: `CacheConfig`
      Sets the number of asynchronous backups for this `ICache`.
      Overrides:
        `setAsyncBackupCount` in class `CacheConfig<K,V>`
      Parameters:
        `asyncBackupCount` - the number of asynchronous backups to set for this `ICache`
      Returns:
        the updated CacheConfig
      See Also:
        `CacheConfig.setBackupCount(int)`, `CacheConfig.getAsyncBackupCount()`

    - #### setEvictionConfig

          public CacheConfig<K,V> setEvictionConfig(EvictionConfig evictionConfig)

      Deprecated.
      Description copied from class: `CacheConfig`
      Sets the `EvictionConfig` instance for eviction configuration for this `ICache`.
      Overrides:
        `setEvictionConfig` in class `CacheConfig<K,V>`
      Parameters:
        `evictionConfig` - the `EvictionConfig` instance to set for the eviction configuration
      Returns:
        the current cache config instance

    - #### setInMemoryFormat

          public CacheConfig<K,V> setInMemoryFormat(InMemoryFormat inMemoryFormat)

      Deprecated.
      Description copied from class: `CacheConfig`
      Data type that will be used to store records in this `ICache`. Possible values:
      - BINARY (default): keys and values will be stored as binary data
      - OBJECT: values will be stored in their object forms
      Overrides:
        `setInMemoryFormat` in class `CacheConfig<K,V>`
      Parameters:
        `inMemoryFormat` - the record type to set
      Returns:
        current cache config instance

    - #### setManagementEnabled

          public CacheConfig<K,V> setManagementEnabled(boolean enabled)

      Deprecated.
      Description copied from class: `AbstractCacheConfig`
      Sets whether or not management is enabled on this cache.

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

      Specified by:
        `setManagementEnabled` in interface `CacheConfiguration<K,V>`
      Overrides:
        `setManagementEnabled` in class `AbstractCacheConfig<K,V>`
      Parameters:
        `enabled` - `true` to enable statistics, `false` to disable
      Returns:
        the `CacheConfig`

    - #### setStatisticsEnabled

          public CacheConfiguration<K,V> setStatisticsEnabled(boolean enabled)

      Deprecated.
      Description copied from class: `AbstractCacheConfig`
      Sets whether or not statistics gathering is enabled on this cache.

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

      Specified by:
        `setStatisticsEnabled` in interface `CacheConfiguration<K,V>`
      Overrides:
        `setStatisticsEnabled` in class `AbstractCacheConfig<K,V>`
      Parameters:
        `enabled` - `true` to enable statistics, `false` to disable
      Returns:
        the `CacheConfig`

    - #### setTypes

          public CacheConfig<K,V> setTypes(Class<K> keyType,
                                           Class<V> valueType)

      Deprecated.
      Description copied from class: `AbstractCacheConfig`
      Sets the expected type of keys and values for a `Cache` configured with this `Configuration`. Setting both to `Object.class` means type-safety checks are not required.

      This is used by `CacheManager` to ensure that the key and value types are the same as those configured for the `Cache` prior to returning a requested cache from this method.

      Implementations may further perform type checking on mutative cache operations and throw a `ClassCastException` if these checks fail.

      Specified by:
        `setTypes` in interface `CacheConfiguration<K,V>`
      Overrides:
        `setTypes` in class `AbstractCacheConfig<K,V>`
      Parameters:
        `keyType` - the expected key type
        `valueType` - the expected value type
      Returns:
        the `CacheConfig`
      See Also:
        `CacheManager.getCache(String, Class, Class)`

    - #### setStoreByValue

          public CacheConfig<K,V> setStoreByValue(boolean storeByValue)

      Deprecated.
      Description copied from class: `AbstractCacheConfig`
      Set if a configured cache should use store-by-value or store-by-reference semantics.
      Specified by:
        `setStoreByValue` in interface `CacheConfiguration<K,V>`
      Overrides:
        `setStoreByValue` in class `AbstractCacheConfig<K,V>`
      Parameters:
        `storeByValue` - `true` if store-by-value is required, `false` for store-by-reference
      Returns:
        the `CacheConfig`

    - #### setWanReplicationRef

          public CacheConfig<K,V> setWanReplicationRef(WanReplicationRef wanReplicationRef)

      Deprecated.
      Overrides:
        `setWanReplicationRef` in class `CacheConfig<K,V>`

    - #### setQuorumName

          public CacheConfig<K,V> setQuorumName(String quorumName)

      Deprecated.
      Description copied from class: `CacheConfig`
      Associates this cache configuration to a quorum.
      Overrides:
        `setQuorumName` in class `CacheConfig<K,V>`
      Parameters:
        `quorumName` - name of the desired quorum
      Returns:
        the updated CacheConfig

    - #### setHotRestartConfig

          public CacheConfiguration<K,V> setHotRestartConfig(HotRestartConfig hotRestartConfig)

      Deprecated.
      Description copied from class: `AbstractCacheConfig`
      Sets the `HotRestartConfig` for this `CacheConfiguration`
      Overrides:
        `setHotRestartConfig` in class `AbstractCacheConfig<K,V>`
      Parameters:
        `hotRestartConfig` - hot restart config
      Returns:
        this `CacheConfiguration` instance

    - #### setPartitionLostListenerConfigs

          public CacheConfig<K,V> setPartitionLostListenerConfigs(List<CachePartitionLostListenerConfig> partitionLostListenerConfigs)

      Deprecated.
      Description copied from class: `CacheConfig`
      Sets the WAN target replication reference.
      Overrides:
        `setPartitionLostListenerConfigs` in class `CacheConfig<K,V>`
      Parameters:
        `partitionLostListenerConfigs` - CachePartitionLostListenerConfig list

    - #### setMergePolicy

          public void setMergePolicy(String mergePolicy)

      Deprecated.
      Description copied from class: `CacheConfig`
      Sets the class name of `CacheMergePolicy` implementation to this cache config.
      Overrides:
        `setMergePolicy` in class `CacheConfig<K,V>`
      Parameters:
        `mergePolicy` - the class name of `CacheMergePolicy` implementation to be set to this cache config

    - #### setExpiryPolicyFactory

          public CacheConfiguration<K,V> setExpiryPolicyFactory(javax.cache.configuration.Factory<? extends javax.cache.expiry.ExpiryPolicy> expiryPolicyFactory)

      Deprecated.
      Description copied from interface: `CacheConfiguration`
      Set the `Factory` for the `ExpiryPolicy`. If `null` is specified the default `ExpiryPolicy` is used.
      Specified by:
        `setExpiryPolicyFactory` in interface `CacheConfiguration<K,V>`
      Overrides:
        `setExpiryPolicyFactory` in class `AbstractCacheConfig<K,V>`
      Parameters:
        `expiryPolicyFactory` - the `ExpiryPolicy` `Factory`
      Returns:
        the `CacheConfiguration` to permit fluent-style method calls

    - #### setCacheLoaderFactory

          public CacheConfiguration<K,V> setCacheLoaderFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheLoader<K,V>> cacheLoaderFactory)

      Deprecated.
      Description copied from interface: `CacheConfiguration`
      Set the `CacheLoader` factory.
      Specified by:
        `setCacheLoaderFactory` in interface `CacheConfiguration<K,V>`
      Overrides:
        `setCacheLoaderFactory` in class `AbstractCacheConfig<K,V>`
      Parameters:
        `cacheLoaderFactory` - the `CacheLoader` `Factory`
      Returns:
        the `CacheConfiguration` to permit fluent-style method calls

    - #### setCacheWriterFactory

          public CacheConfiguration<K,V> setCacheWriterFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheWriter<? super K,? super V>> cacheWriterFactory)

      Deprecated.
      Description copied from interface: `CacheConfiguration`
      Set the `CacheWriter` factory.
      Specified by:
        `setCacheWriterFactory` in interface `CacheConfiguration<K,V>`
      Overrides:
        `setCacheWriterFactory` in class `AbstractCacheConfig<K,V>`
      Parameters:
        `cacheWriterFactory` - the `CacheWriter` `Factory`
      Returns:
        the `CacheConfiguration` to permit fluent-style method calls

    - #### setWriteThrough

          public CacheConfiguration<K,V> setWriteThrough(boolean isWriteThrough)

      Deprecated.
      Description copied from interface: `CacheConfiguration`
      Set if write-through caching should be used.

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

      Specified by:
        `setWriteThrough` in interface `CacheConfiguration<K,V>`
      Overrides:
        `setWriteThrough` in class `AbstractCacheConfig<K,V>`
      Parameters:
        `isWriteThrough` - `true` if write-through is required, `false` otherwise
      Returns:
        the `CacheConfiguration` to permit fluent-style method calls

    - #### setReadThrough

          public CacheConfiguration<K,V> setReadThrough(boolean isReadThrough)

      Deprecated.
      Description copied from interface: `CacheConfiguration`
      Set if read-through caching should be used.

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

      Specified by:
        `setReadThrough` in interface `CacheConfiguration<K,V>`
      Overrides:
        `setReadThrough` in class `AbstractCacheConfig<K,V>`
      Parameters:
        `isReadThrough` - `true` if read-through is required, `false` otherwise
      Returns:
        the `CacheConfiguration` to permit fluent-style method calls

    - #### setDisablePerEntryInvalidationEvents

          public void setDisablePerEntryInvalidationEvents(boolean disablePerEntryInvalidationEvents)

      Deprecated.
      Description copied from class: `CacheConfig`
      Sets invalidation events disabled status for per entry.
      Overrides:
        `setDisablePerEntryInvalidationEvents` in class `CacheConfig<K,V>`
      Parameters:
        `disablePerEntryInvalidationEvents` - disables invalidation event sending behaviour if it is `true`, otherwise enables it

Copyright © 2019. All rights reserved.