public final class ClusterConfig extends Object implements Cloneable
MembershipConfig,
FailureDetectorConfig,
GossipConfig,
TransportConfig| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_LOCAL_METADATA_TIMEOUT |
static int |
DEFAULT_METADATA_TIMEOUT |
static int |
DEFAULT_WAN_METADATA_TIMEOUT |
| Constructor and Description |
|---|
ClusterConfig() |
public static final int DEFAULT_METADATA_TIMEOUT
public static final int DEFAULT_WAN_METADATA_TIMEOUT
public static final int DEFAULT_LOCAL_METADATA_TIMEOUT
public static ClusterConfig defaultConfig()
public static ClusterConfig defaultLanConfig()
ClusterConfig with default settings for cluster on LAN network.ClusterConfigpublic static ClusterConfig defaultWanConfig()
ClusterConfig with default settings for cluster on WAN network.ClusterConfigpublic static ClusterConfig defaultLocalConfig()
MembershipConfig with default settings for cluster on local loopback interface.MembershipConfigpublic <T> T metadata()
public ClusterConfig metadata(Object metadata)
metadata - metadataClusterConfig instancepublic int metadataTimeout()
public ClusterConfig metadataTimeout(int metadataTimeout)
metadataTimeout - metadata timeoutClusterConfig instancepublic MetadataCodec metadataCodec()
public ClusterConfig metadataCodec(MetadataCodec metadataCodec)
metadataCodec - metadata codecClusterConfig instancepublic String externalHost()
externalHost is a config property for container environments,
it's being set for advertising to scalecube cluster some connectable hostname which maps to
scalecube transport's hostname on which scalecube transport is listening.public ClusterConfig externalHost(String externalHost)
externalHost is a config property for container environments,
it's being set for advertising to scalecube cluster some connectable hostname which maps to
scalecube transport's hostname on which scalecube transport is listening.externalHost - external hostClusterConfig instancepublic String memberAlias()
memberAlias is a config property which facilitates Member.toString().public ClusterConfig memberAlias(String memberAlias)
memberAlias is a config property which facilitates Member.toString().memberAlias - member aliasClusterConfig instancepublic Integer externalPort()
externalPort is a config property for container environments,
it's being set for advertising to scalecube cluster a port which mapped to scalecube
transport's listening port.public ClusterConfig externalPort(Integer externalPort)
externalPort is a config property for container environments,
it's being set for advertising to scalecube cluster a port which mapped to scalecube
transport's listening port.externalPort - external portClusterConfig instancepublic ClusterConfig transport(UnaryOperator<TransportConfig> op)
TransportConfig settings.op - operator to apply TransportConfig settingsClusterConfig instancepublic TransportConfig transportConfig()
public ClusterConfig failureDetector(UnaryOperator<FailureDetectorConfig> op)
FailureDetectorConfig settings.op - operator to apply FailureDetectorConfig settingsClusterConfig instancepublic FailureDetectorConfig failureDetectorConfig()
public ClusterConfig gossip(UnaryOperator<GossipConfig> op)
GossipConfig settings.op - operator to apply GossipConfig settingsClusterConfig instancepublic GossipConfig gossipConfig()
public ClusterConfig membership(UnaryOperator<MembershipConfig> op)
MembershipConfig settings.op - operator to apply MembershipConfig settingsClusterConfig instancepublic MembershipConfig membershipConfig()
public ClusterConfig clone()
Copyright © 2015–2021. All rights reserved.