Package io.vertx.spi.cluster.ignite

## Class IgniteOptions

- java.lang.Object
- - io.vertx.spi.cluster.ignite.IgniteOptions

-     public class IgniteOptions
      extends Object

  Author:
    Lukas Prettenthaler

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `IgniteOptions()` | Default constructor
    `IgniteOptions​(JsonObject options)` | Constructor from JSON
    `IgniteOptions​(IgniteOptions options)` | Copy constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `List<IgniteCacheOptions>` | `getCacheConfiguration()` | Gets configuration (descriptors) for all caches.
    `long` | `getClientFailureDetectionTimeout()` |
    `int` | `getConnectionsPerNode()` | See `setConnectionsPerNode(int)`.
    `long` | `getConnectTimeout()` | See `setConnectTimeout(long)`.
    `String` | `getDataPageEvictionMode()` | Gets off-heap's Cache Data Page Eviction Policy.
    `long` | `getDefaultRegionInitialSize()` | Get default data region start size.
    `long` | `getDefaultRegionMaxSize()` | Get default data region maximum size.
    `long` | `getDelayAfterStart()` |
    `IgniteDiscoveryOptions` | `getDiscoverySpi()` | Should return fully configured discovery options.
    `long` | `getIdleConnectionTimeout()` | See `setIdleConnectionTimeout(long)`.
    `String` | `getLocalHost()` | Gets system-wide local address or host for all Ignite components to bind to.
    `int` | `getLocalPort()` | See `setLocalPort(int)`.
    `long` | `getMaxConnectTimeout()` | See `setConnectTimeout(long)`.
    `IgniteMetricExporterOptions` | `getMetricExporterSpi()` |
    `long` | `getMetricsExpireTime()` |
    `int` | `getMetricsHistorySize()` |
    `long` | `getMetricsLogFrequency()` | Gets frequency of metrics log print out.
    `long` | `getMetricsUpdateFrequency()` |
    `int` | `getPageSize()` |
    `int` | `getReconnectCount()` | Gets maximum number of reconnect attempts used when establishing connection with remote nodes.
    `IgniteSslOptions` | `getSslContextFactory()` |
    `boolean` | `isDefaultRegionMetricsEnabled()` |
    `boolean` | `isShutdownOnNodeStop()` |
    `boolean` | `isShutdownOnSegmentation()` |
    `IgniteOptions` | `setCacheConfiguration​(List<IgniteCacheOptions> cacheConfiguration)` | Sets cache configurations.
    `IgniteOptions` | `setClientFailureDetectionTimeout​(long clientFailureDetectionTimeout)` | Sets client failure detection timeout.
    `IgniteOptions` | `setConnectionsPerNode​(int connectionsPerNode)` | Sets number of connections to each remote node.
    `IgniteOptions` | `setConnectTimeout​(long connectTimeout)` | Sets connect timeout used when establishing connection with remote nodes.
    `IgniteOptions` | `setDataPageEvictionMode​(String dataPageEvictionMode)` | Sets off-heap's Cache Data Page Eviction Policy.
    `IgniteOptions` | `setDefaultRegionInitialSize​(long defaultRegionInitialSize)` | Sets default data region start size.
    `IgniteOptions` | `setDefaultRegionMaxSize​(long defaultRegionMaxSize)` | Sets default data region maximum size.
    `IgniteOptions` | `setDefaultRegionMetricsEnabled​(boolean defaultRegionMetricsEnabled)` | Sets default data region metrics enabled/disabled.
    `IgniteOptions` | `setDelayAfterStart​(long delayAfterStart)` | Sets delay in millisenconds after Ignite start.
    `IgniteOptions` | `setDiscoverySpi​(IgniteDiscoveryOptions discoveryOptions)` | Sets fully configured instance of `IgniteDiscoveryOptions`.
    `IgniteOptions` | `setIdleConnectionTimeout​(long idleConnectionTimeout)` | Sets maximum idle connection timeout upon which a connection to client will be closed.
    `IgniteOptions` | `setLocalHost​(String localHost)` | Sets system-wide local address or host for all Ignite components to bind to.
    `IgniteOptions` | `setLocalPort​(int localPort)` | Sets local port for socket binding.
    `IgniteOptions` | `setMaxConnectTimeout​(long maxConnectTimeout)` | Sets maximum connect timeout.
    `IgniteOptions` | `setMetricExporterSpi​(IgniteMetricExporterOptions metricExporterOptions)` | Sets fully configured instance of `IgniteMetricExporterOptions`.
    `IgniteOptions` | `setMetricsExpireTime​(long metricsExpireTime)` | Sets metrics expire time.
    `IgniteOptions` | `setMetricsHistorySize​(int metricsHistorySize)` | Sets metrics history size.
    `IgniteOptions` | `setMetricsLogFrequency​(long metricsLogFrequency)` | Sets frequency of metrics log print out.
    `IgniteOptions` | `setMetricsUpdateFrequency​(long metricsUpdateFrequency)` | Sets update frequency of metrics.
    `IgniteOptions` | `setPageSize​(int pageSize)` | Sets page size for all data regions.
    `IgniteOptions` | `setReconnectCount​(int reconnectCount)` | Sets maximum number of reconnect attempts used when establishing connection with remote nodes.
    `IgniteOptions` | `setShutdownOnNodeStop​(boolean shutdownOnNodeStop)` | Sets that vertx will be shutdown when the node stops.
    `IgniteOptions` | `setShutdownOnSegmentation​(boolean shutdownOnSegmentation)` | Sets that vertx will be shutdown when the cache goes into segmented state.
    `IgniteOptions` | `setSslContextFactory​(IgniteSslOptions sslOptions)` | Sets SSL options that will be used for creating a secure socket layer.
    `JsonObject` | `toJson()` | Convert to JSON

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### IgniteOptions

          public IgniteOptions()

      Default constructor

    - #### IgniteOptions

          public IgniteOptions​(IgniteOptions options)

      Copy constructor
      Parameters:
        `options` - the one to copy

    - #### IgniteOptions

          public IgniteOptions​(JsonObject options)

      Constructor from JSON
      Parameters:
        `options` - the JSON

  - ### Method Detail

    - #### getLocalHost

          public String getLocalHost()

      Gets system-wide local address or host for all Ignite components to bind to. If provided it will override all default local bind settings within Ignite or any of its SPIs.
      Returns:
        Local address or host to bind to.

    - #### setLocalHost

          public IgniteOptions setLocalHost​(String localHost)

      Sets system-wide local address or host for all Ignite components to bind to. If provided it will override all default local bind settings within Ignite or any of its SPIs.
      Parameters:
        `localHost` - Local IP address or host to bind to.
      Returns:
        reference to this, for fluency

    - #### getLocalPort

          public int getLocalPort()

      See `setLocalPort(int)`.
      Returns:
        Port number.

    - #### setLocalPort

          public IgniteOptions setLocalPort​(int localPort)

      Sets local port for socket binding.
      Parameters:
        `localPort` - Port number.
      Returns:
        reference to this, for fluency

    - #### getConnectionsPerNode

          public int getConnectionsPerNode()

      See `setConnectionsPerNode(int)`.
      Returns:
        Number of connections per node.

    - #### setConnectionsPerNode

          public IgniteOptions setConnectionsPerNode​(int connectionsPerNode)

      Sets number of connections to each remote node.
      Parameters:
        `connectionsPerNode` - Number of connections per node.
      Returns:
        reference to this, for fluency

    - #### getConnectTimeout

          public long getConnectTimeout()

      See `setConnectTimeout(long)`.
      Returns:
        Connect timeout.

    - #### setConnectTimeout

          public IgniteOptions setConnectTimeout​(long connectTimeout)

      Sets connect timeout used when establishing connection with remote nodes.
      Parameters:
        `connectTimeout` - Connect timeout.
      Returns:
        reference to this, for fluency

    - #### getIdleConnectionTimeout

          public long getIdleConnectionTimeout()

      See `setIdleConnectionTimeout(long)`.
      Returns:
        Maximum idle connection time.

    - #### setIdleConnectionTimeout

          public IgniteOptions setIdleConnectionTimeout​(long idleConnectionTimeout)

      Sets maximum idle connection timeout upon which a connection to client will be closed.
      Parameters:
        `idleConnectionTimeout` - Maximum idle connection time.
      Returns:
        reference to this, for fluency

    - #### getMaxConnectTimeout

          public long getMaxConnectTimeout()

      See `setConnectTimeout(long)`.
      Returns:
        Connect timeout.

    - #### setMaxConnectTimeout

          public IgniteOptions setMaxConnectTimeout​(long maxConnectTimeout)

      Sets maximum connect timeout. If handshake is not established within connect timeout, then SPI tries to repeat handshake procedure with increased connect timeout. Connect timeout can grow till maximum timeout value, if maximum timeout value is reached then the handshake is considered as failed.
      Parameters:
        `maxConnectTimeout` - Maximum connect timeout.
      Returns:
        reference to this, for fluency

    - #### getReconnectCount

          public int getReconnectCount()

      Gets maximum number of reconnect attempts used when establishing connection with remote nodes.
      Returns:
        Reconnects count.

    - #### setReconnectCount

          public IgniteOptions setReconnectCount​(int reconnectCount)

      Sets maximum number of reconnect attempts used when establishing connection with remote nodes.
      Parameters:
        `reconnectCount` - Maximum number of reconnection attempts.
      Returns:
        reference to this, for fluency

    - #### getMetricsLogFrequency

          public long getMetricsLogFrequency()

      Gets frequency of metrics log print out.
      Returns:
        Frequency of metrics log print out.

    - #### setMetricsLogFrequency

          public IgniteOptions setMetricsLogFrequency​(long metricsLogFrequency)

      Sets frequency of metrics log print out.
      Parameters:
        `metricsLogFrequency` - Frequency of metrics log print out.
      Returns:
        reference to this, for fluency

    - #### getDiscoverySpi

          public IgniteDiscoveryOptions getDiscoverySpi()

      Should return fully configured discovery options. If not provided, TcpDiscovery will be used by default.
      Returns:
        Grid discovery options `IgniteDiscoveryOptions`.

    - #### setDiscoverySpi

          public IgniteOptions setDiscoverySpi​(IgniteDiscoveryOptions discoveryOptions)

      Sets fully configured instance of `IgniteDiscoveryOptions`.
      Parameters:
        `discoveryOptions` - `IgniteDiscoveryOptions`.
      Returns:
        reference to this, for fluency

    - #### getCacheConfiguration

          public List<IgniteCacheOptions> getCacheConfiguration()

      Gets configuration (descriptors) for all caches.
      Returns:
        List of cache configurations.

    - #### setCacheConfiguration

          public IgniteOptions setCacheConfiguration​(List<IgniteCacheOptions> cacheConfiguration)

      Sets cache configurations.
      Parameters:
        `cacheConfiguration` - Cache configurations.
      Returns:
        reference to this, for fluency

    - #### getSslContextFactory

          public IgniteSslOptions getSslContextFactory()

    - #### setSslContextFactory

          public IgniteOptions setSslContextFactory​(IgniteSslOptions sslOptions)

      Sets SSL options that will be used for creating a secure socket layer.
      Parameters:
        `sslOptions` - Ssl options.
      Returns:
        reference to this, for fluency

    - #### isShutdownOnSegmentation

          public boolean isShutdownOnSegmentation()

    - #### setShutdownOnSegmentation

          public IgniteOptions setShutdownOnSegmentation​(boolean shutdownOnSegmentation)

      Sets that vertx will be shutdown when the cache goes into segmented state. Defaults to true
      Parameters:
        `shutdownOnSegmentation` - boolean flag.
      Returns:
        reference to this, for fluency

    - #### getPageSize

          public int getPageSize()

    - #### setPageSize

          public IgniteOptions setPageSize​(int pageSize)

      Sets page size for all data regions. Defaults to 4096 bytes
      Parameters:
        `pageSize` - size in bytes.
      Returns:
        reference to this, for fluency

    - #### getDefaultRegionInitialSize

          public long getDefaultRegionInitialSize()

      Get default data region start size. Default to 256 MB
      Returns:
        size in bytes.

    - #### setDefaultRegionInitialSize

          public IgniteOptions setDefaultRegionInitialSize​(long defaultRegionInitialSize)

      Sets default data region start size.
      Parameters:
        `defaultRegionInitialSize` - size in bytes.
      Returns:
        reference to this, for fluency

    - #### getDefaultRegionMaxSize

          public long getDefaultRegionMaxSize()

      Get default data region maximum size. Default to 20% of physical memory available
      Returns:
        size in bytes.

    - #### setDefaultRegionMaxSize

          public IgniteOptions setDefaultRegionMaxSize​(long defaultRegionMaxSize)

      Sets default data region maximum size.
      Parameters:
        `defaultRegionMaxSize` - size in bytes.
      Returns:
        reference to this, for fluency

    - #### isDefaultRegionMetricsEnabled

          public boolean isDefaultRegionMetricsEnabled()

    - #### setDefaultRegionMetricsEnabled

          public IgniteOptions setDefaultRegionMetricsEnabled​(boolean defaultRegionMetricsEnabled)

      Sets default data region metrics enabled/disabled. Defaults to false
      Parameters:
        `defaultRegionMetricsEnabled` - to set.
      Returns:
        reference to this, for fluency

    - #### isShutdownOnNodeStop

          public boolean isShutdownOnNodeStop()

    - #### setShutdownOnNodeStop

          public IgniteOptions setShutdownOnNodeStop​(boolean shutdownOnNodeStop)

      Sets that vertx will be shutdown when the node stops. Defaults to false
      Parameters:
        `shutdownOnNodeStop` - to set.
      Returns:
        reference to this, for fluency

    - #### getMetricsUpdateFrequency

          public long getMetricsUpdateFrequency()

    - #### setMetricsUpdateFrequency

          public IgniteOptions setMetricsUpdateFrequency​(long metricsUpdateFrequency)

      Sets update frequency of metrics. Defaults to 2 seconds
      Parameters:
        `metricsUpdateFrequency` - in milliseconds.
      Returns:
        reference to this, for fluency

    - #### getClientFailureDetectionTimeout

          public long getClientFailureDetectionTimeout()

    - #### setClientFailureDetectionTimeout

          public IgniteOptions setClientFailureDetectionTimeout​(long clientFailureDetectionTimeout)

      Sets client failure detection timeout. Defaults to 30 seconds
      Parameters:
        `clientFailureDetectionTimeout` - in milliseconds.
      Returns:
        reference to this, for fluency

    - #### getMetricsHistorySize

          public int getMetricsHistorySize()

    - #### setMetricsHistorySize

          public IgniteOptions setMetricsHistorySize​(int metricsHistorySize)

      Sets metrics history size. Defaults to 10000
      Parameters:
        `metricsHistorySize` - to set.
      Returns:
        reference to this, for fluency

    - #### getMetricsExpireTime

          public long getMetricsExpireTime()

    - #### setMetricsExpireTime

          public IgniteOptions setMetricsExpireTime​(long metricsExpireTime)

      Sets metrics expire time. Defaults to never expire
      Parameters:
        `metricsExpireTime` - in milliseconds.
      Returns:
        reference to this, for fluency

    - #### getMetricExporterSpi

          public IgniteMetricExporterOptions getMetricExporterSpi()

    - #### setMetricExporterSpi

          public IgniteOptions setMetricExporterSpi​(IgniteMetricExporterOptions metricExporterOptions)

      Sets fully configured instance of `IgniteMetricExporterOptions`.
      Parameters:
        `metricExporterOptions` - `IgniteMetricExporterOptions`.
      Returns:
        reference to this, for fluency

    - #### getDelayAfterStart

          public long getDelayAfterStart()

    - #### setDelayAfterStart

          public IgniteOptions setDelayAfterStart​(long delayAfterStart)

      Sets delay in millisenconds after Ignite start. Defaults to 100ms
      Parameters:
        `delayAfterStart` - in milliseconds.
      Returns:
        reference to this, for fluency

    - #### getDataPageEvictionMode

          public String getDataPageEvictionMode()

      Gets off-heap's Cache Data Page Eviction Policy.
      Returns:
        Data Page Cache eviction policy used in 'off-heap' Cache mode.

    - #### setDataPageEvictionMode

          public IgniteOptions setDataPageEvictionMode​(String dataPageEvictionMode)

      Sets off-heap's Cache Data Page Eviction Policy.
      Parameters:
        `dataPageEvictionMode` - DataPageEvictionMode to be set.
      Returns:
        reference to this, for fluency

    - #### toJson

          public JsonObject toJson()

      Convert to JSON
      Returns:
        the JSON