public class DiscoveryConfig extends Object implements IdentifiedDataSerializable
Modifier | Constructor and Description |
---|---|
|
DiscoveryConfig() |
|
DiscoveryConfig(DiscoveryConfig discoveryConfig) |
protected |
DiscoveryConfig(DiscoveryServiceProvider discoveryServiceProvider,
NodeFilter nodeFilter,
String nodeFilterClass,
Collection<DiscoveryStrategyConfig> discoveryStrategyConfigs) |
Modifier and Type | Method and Description |
---|---|
void |
addDiscoveryStrategyConfig(DiscoveryStrategyConfig discoveryStrategyConfig)
Adds an enabled
DiscoveryStrategy configuration. |
boolean |
equals(Object o) |
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. |
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
NodeFilter |
getNodeFilter() |
String |
getNodeFilterClass() |
int |
hashCode() |
boolean |
isEnabled() |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
void |
setDiscoveryServiceProvider(DiscoveryServiceProvider discoveryServiceProvider) |
void |
setDiscoveryStrategyConfigs(List<DiscoveryStrategyConfig> discoveryStrategyConfigs)
Sets the strategy configurations for this discovery config.
|
void |
setNodeFilter(NodeFilter nodeFilter) |
void |
setNodeFilterClass(String nodeFilterClass) |
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public DiscoveryConfig()
protected DiscoveryConfig(DiscoveryServiceProvider discoveryServiceProvider, NodeFilter nodeFilter, String nodeFilterClass, Collection<DiscoveryStrategyConfig> discoveryStrategyConfigs)
public DiscoveryConfig(DiscoveryConfig discoveryConfig)
public DiscoveryConfig getAsReadOnly()
public void setDiscoveryServiceProvider(DiscoveryServiceProvider discoveryServiceProvider)
public DiscoveryServiceProvider getDiscoveryServiceProvider()
public NodeFilter getNodeFilter()
public void setNodeFilter(NodeFilter nodeFilter)
public String getNodeFilterClass()
public void setNodeFilterClass(String nodeFilterClass)
public boolean isEnabled()
public Collection<DiscoveryStrategyConfig> getDiscoveryStrategyConfigs()
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.
DiscoveryStrategy
configurationspublic void setDiscoveryStrategyConfigs(List<DiscoveryStrategyConfig> discoveryStrategyConfigs)
discoveryStrategyConfigs
- the strategy configurationspublic void addDiscoveryStrategyConfig(DiscoveryStrategyConfig discoveryStrategyConfig)
DiscoveryStrategy
configuration.
All added configurations are strictly meant to be enabled, this is to
remember when building custom Config
instances.
discoveryStrategyConfig
- the DiscoveryStrategyConfig
to addpublic int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.