Class IgniteOptions


  • public class IgniteOptions
    extends Object
    Author:
    Lukas Prettenthaler
    • 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()
        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()
        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
      • 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
      • 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
      • 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.
      • 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
      • 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
      • 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
      • toJson

        public JsonObject toJson()
        Convert to JSON
        Returns:
        the JSON