com.hazelcast.config

## Class DiscoveryConfig

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

- Direct Known Subclasses:
    DiscoveryConfigReadOnly

      public class DiscoveryConfig
      extends Object

  This configuration class describes the top-level config of the discovery SPI and its discovery strategies.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `DiscoveryConfig()`
    `protected` | `DiscoveryConfig(DiscoveryServiceProvider discoveryServiceProvider, NodeFilter nodeFilter, String nodeFilterClass, Collection<DiscoveryStrategyConfig> discoveryStrategyConfigs)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addDiscoveryStrategyConfig(DiscoveryStrategyConfig discoveryStrategyConfig)` Adds an enabled `DiscoveryStrategy` configuration.
    `DiscoveryConfig` | `getAsReadOnly()` Deprecated. this method will be removed in 4.0; it is meant for internal usage only
    `DiscoveryServiceProvider` | `getDiscoveryServiceProvider()`
    `Collection<DiscoveryStrategyConfig>` | `getDiscoveryStrategyConfigs()` Returns the defined `DiscoveryStrategy` configurations.
    `NodeFilter` | `getNodeFilter()`
    `String` | `getNodeFilterClass()`
    `boolean` | `isEnabled()`
    `void` | `setDiscoveryServiceProvider(DiscoveryServiceProvider discoveryServiceProvider)`
    `void` | `setDiscoveryStrategyConfigs(List<DiscoveryStrategyConfig> discoveryStrategyConfigs)`
    `void` | `setNodeFilter(NodeFilter nodeFilter)`
    `void` | `setNodeFilterClass(String nodeFilterClass)`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### DiscoveryConfig

          public DiscoveryConfig()

    - #### DiscoveryConfig

          protected DiscoveryConfig(DiscoveryServiceProvider discoveryServiceProvider,
                                    NodeFilter nodeFilter,
                                    String nodeFilterClass,
                                    Collection<DiscoveryStrategyConfig> discoveryStrategyConfigs)

  - ### Method Detail

    - #### getAsReadOnly

          public DiscoveryConfig getAsReadOnly()

      Deprecated. this method will be removed in 4.0; it is meant for internal usage only
      Gets immutable version of this configuration.
      Returns:
        immutable version of this configuration

    - #### setDiscoveryServiceProvider

          public void setDiscoveryServiceProvider(DiscoveryServiceProvider discoveryServiceProvider)

    - #### getDiscoveryServiceProvider

          public DiscoveryServiceProvider getDiscoveryServiceProvider()

    - #### getNodeFilter

          public NodeFilter getNodeFilter()

    - #### setNodeFilter

          public void setNodeFilter(NodeFilter nodeFilter)

    - #### getNodeFilterClass

          public String getNodeFilterClass()

    - #### setNodeFilterClass

          public void setNodeFilterClass(String nodeFilterClass)

    - #### isEnabled

          public boolean isEnabled()

    - #### getDiscoveryStrategyConfigs

          public Collection<DiscoveryStrategyConfig> getDiscoveryStrategyConfigs()

      Returns the defined `DiscoveryStrategy` configurations. This collection does not include deactivated configurations since those are automatically skipped while reading the configuration file.

      All returned configurations are expected to be active, this is to remember when building custom `Config` instances.

      Returns:
        all enabled `DiscoveryStrategy` configurations

    - #### setDiscoveryStrategyConfigs

          public void setDiscoveryStrategyConfigs(List<DiscoveryStrategyConfig> discoveryStrategyConfigs)

    - #### addDiscoveryStrategyConfig

          public void addDiscoveryStrategyConfig(DiscoveryStrategyConfig discoveryStrategyConfig)

      Adds an enabled `DiscoveryStrategy` configuration.

      All added configurations are strictly meant to be enabled, this is to remember when building custom `Config` instances.

      Parameters:
        `discoveryStrategyConfig` - the `DiscoveryStrategyConfig` to add

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2018. All rights reserved.