public class HazelcastConfiguration extends Object
Modifier and Type | Class and Description |
---|---|
static class |
HazelcastConfiguration.LoggingType
Logging type.
|
Modifier and Type | Method and Description |
---|---|
void |
disableUsePingWhenHeartbeatFails()
Disable ICMP ping to verify the nodes in the cluster are reachable, when
heartbeat times out due to high CPU usage or garbage collection.
|
void |
enableUsePingWhenHeartbeatFails()
Enable ICMP ping to verify the nodes in the cluster are reachable, when
heartbeat times out due to high CPU usage or garbage collection.
|
static HazelcastConfiguration |
forTcpIpDiscovery(PortNumber port,
Collection<Host> cluster)
Creates a connection configuration where TCP/IP is used to discover peers.
|
static HazelcastConfiguration |
forTcpIpDiscovery(PortNumber port,
Host... cluster)
Creates a connection configuration where TCP/IP is used to discover peers.
|
Set<Host> |
getCluster() |
PortNumber |
getPort() |
void |
setAsyncReplicationFactor(int asyncReplicationFactor)
Sets the default asynchronous replication factor: number of backup
copies among nodes.
|
void |
setGracefulShutdownMaxWait(int seconds)
Sets the seconds to wait for a graceful shutdown to occur.
|
void |
setInstanceName(String name)
Sets a friendly name for the hazelcast instance.
|
void |
setJoinMaxWait(int seconds)
Sets the maximum seconds to wait for the node to join the cluster.
|
void |
setLoggingType(HazelcastConfiguration.LoggingType loggingType)
Sets the logging type.
|
void |
setMaxWaitForAllToConnect(int seconds)
Sets the maximum seconds to wait for all nodes in the cluster to connect.
|
void |
setMaxWaitToConfirmNoPartitionMaster(int seconds)
Sets the maximum seconds to wait to confirm there is no partition master.
|
void |
setMergeFirstRunDelay(int seconds)
Sets the seconds to wait before running the first merge.
|
void |
setMergeNextRunDelay(int seconds)
Sets the seconds to wait before running all merges after the first one.
|
void |
setNoHeartbeatMaxWait(int seconds)
Sets the maximum seconds to wait without getting a heartbeat.
|
void |
setPartitionBackupSyncInterval(int seconds)
Sets the interval for partition backup synchronization.
|
void |
setPartitionMasterConfirmationInterval(int seconds)
Sets the interval to confirm who is the partition master.
|
void |
setPartitionMigrationTimeout(int seconds)
Sets the maximum seconds to wait for the partition migration to timeout.
|
void |
setPort(PortNumber port)
Sets the port.
|
void |
setPublishPartitionMemberListInterval(int seconds)
Sets the interval to publish the partition member list.
|
void |
setReplicationFactor(int replicationFactor)
Sets the default replication factor: number of backup copies among
nodes.
|
String |
toString() |
public static HazelcastConfiguration forTcpIpDiscovery(PortNumber port, Host... cluster)
port
- local portcluster
- hosts that form the cluster. The entire cluster may be defined or just the
other peers.public static HazelcastConfiguration forTcpIpDiscovery(PortNumber port, Collection<Host> cluster)
port
- local portcluster
- hosts that form the cluster. The entire cluster may be defined or just the
other peers.public void setInstanceName(String name)
name
- friendly namepublic PortNumber getPort()
public void setPort(PortNumber port)
port
- the port, null
to let the underlying implementation to choose onepublic void enableUsePingWhenHeartbeatFails()
public void disableUsePingWhenHeartbeatFails()
public void setNoHeartbeatMaxWait(int seconds)
seconds
- time to waitpublic void setGracefulShutdownMaxWait(int seconds)
seconds
- time to waitpublic void setMergeFirstRunDelay(int seconds)
seconds
- time to waitpublic void setMergeNextRunDelay(int seconds)
seconds
- time to waitpublic void setMaxWaitForAllToConnect(int seconds)
seconds
- time to waitpublic void setJoinMaxWait(int seconds)
seconds
- time to waitpublic void setPartitionMigrationTimeout(int seconds)
seconds
- time to waitpublic void setPartitionBackupSyncInterval(int seconds)
seconds
- the synchronization intervalpublic void setPartitionMasterConfirmationInterval(int seconds)
seconds
- the confirmation intervalpublic void setMaxWaitToConfirmNoPartitionMaster(int seconds)
seconds
- time to waitpublic void setPublishPartitionMemberListInterval(int seconds)
seconds
- the publish intervalpublic void setReplicationFactor(int replicationFactor)
1
for multicast discovery.quorum -1
for TCP discovery.
QuorumCalculator
is used to calculate a
quorum from the cluster provided at
forTcpIpDiscovery(PortNumber, Host...)
or
forTcpIpDiscovery(PortNumber, Collection)
.replicationFactor
- the replication factorpublic void setAsyncReplicationFactor(int asyncReplicationFactor)
asyncReplicationFactor
- the asynchronous replication factorpublic void setLoggingType(HazelcastConfiguration.LoggingType loggingType)
loggingType
- logging typeCopyright © 2015. All Rights Reserved.