com.hazelcast.config

## Class NearCachePreloaderConfig

- java.lang.Object
- - com.hazelcast.config.NearCachePreloaderConfig

- All Implemented Interfaces:
    DataSerializable, IdentifiedDataSerializable, Serializable

      public class NearCachePreloaderConfig
      extends Object
      implements IdentifiedDataSerializable, Serializable

  Configuration for storing and pre-loading Near Cache keys. Preloader re-populates Near Cache after client/server restart to provide fast access.
  Since:
    3.8
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_STORE_INITIAL_DELAY_SECONDS` Default initial delay for the Near Cache key storage.
    `static int` | `DEFAULT_STORE_INTERVAL_SECONDS` Default interval for the Near Cache key storage (in seconds).

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NearCachePreloaderConfig()`
    `NearCachePreloaderConfig(boolean enabled, String directory)`
    `NearCachePreloaderConfig(NearCachePreloaderConfig nearCachePreloaderConfig)`
    `NearCachePreloaderConfig(String directory)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `String` | `getDirectory()`
    `int` | `getFactoryId()` Returns DataSerializableFactory factory ID for this class.
    `int` | `getId()` Returns type identifier for this class.
    `int` | `getStoreInitialDelaySeconds()`
    `int` | `getStoreIntervalSeconds()`
    `int` | `hashCode()`
    `boolean` | `isEnabled()`
    `void` | `readData(ObjectDataInput in)` Reads fields from the input stream
    `NearCachePreloaderConfig` | `setDirectory(String directory)`
    `NearCachePreloaderConfig` | `setEnabled(boolean isEnabled)`
    `NearCachePreloaderConfig` | `setStoreInitialDelaySeconds(int storeInitialDelaySeconds)`
    `NearCachePreloaderConfig` | `setStoreIntervalSeconds(int storeIntervalSeconds)`
    `String` | `toString()`
    `void` | `writeData(ObjectDataOutput out)` Writes object fields to output stream

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

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

- - ### Field Detail

    - #### DEFAULT_STORE_INITIAL_DELAY_SECONDS

          public static final int DEFAULT_STORE_INITIAL_DELAY_SECONDS

      Default initial delay for the Near Cache key storage.
      See Also:
        Constant Field Values

    - #### DEFAULT_STORE_INTERVAL_SECONDS

          public static final int DEFAULT_STORE_INTERVAL_SECONDS

      Default interval for the Near Cache key storage (in seconds).
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### NearCachePreloaderConfig

          public NearCachePreloaderConfig()

    - #### NearCachePreloaderConfig

          public NearCachePreloaderConfig(NearCachePreloaderConfig nearCachePreloaderConfig)

    - #### NearCachePreloaderConfig

          public NearCachePreloaderConfig(String directory)

    - #### NearCachePreloaderConfig

          public NearCachePreloaderConfig(boolean enabled,
                                          String directory)

  - ### Method Detail

    - #### isEnabled

          public boolean isEnabled()

    - #### setEnabled

          public NearCachePreloaderConfig setEnabled(boolean isEnabled)

    - #### setDirectory

          public NearCachePreloaderConfig setDirectory(String directory)

    - #### getDirectory

          public String getDirectory()

    - #### getStoreInitialDelaySeconds

          public int getStoreInitialDelaySeconds()

    - #### setStoreInitialDelaySeconds

          public NearCachePreloaderConfig setStoreInitialDelaySeconds(int storeInitialDelaySeconds)

    - #### getStoreIntervalSeconds

          public int getStoreIntervalSeconds()

    - #### setStoreIntervalSeconds

          public NearCachePreloaderConfig setStoreIntervalSeconds(int storeIntervalSeconds)

    - #### getFactoryId

          public int getFactoryId()

      Description copied from interface: `IdentifiedDataSerializable`
      Returns DataSerializableFactory factory ID for this class.
      Specified by:
        `getFactoryId` in interface `IdentifiedDataSerializable`
      Returns:
        factory ID

    - #### getId

          public int getId()

      Description copied from interface: `IdentifiedDataSerializable`
      Returns type identifier for this class. It should be unique per DataSerializableFactory.
      Specified by:
        `getId` in interface `IdentifiedDataSerializable`
      Returns:
        type ID

    - #### writeData

          public void writeData(ObjectDataOutput out)
                         throws IOException

      Description copied from interface: `DataSerializable`
      Writes object fields to output stream
      Specified by:
        `writeData` in interface `DataSerializable`
      Parameters:
        `out` - output
      Throws:
        `IOException` - if an I/O error occurs. In particular, an `IOException` may be thrown if the output stream has been closed.

    - #### readData

          public void readData(ObjectDataInput in)
                        throws IOException

      Description copied from interface: `DataSerializable`
      Reads fields from the input stream
      Specified by:
        `readData` in interface `DataSerializable`
      Parameters:
        `in` - input
      Throws:
        `IOException` - if an I/O error occurs. In particular, an `IOException` may be thrown if the input stream has been closed.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2019. All rights reserved.