########################################################################################################
# Hekate Configuration
########################################################################################################
# Node name (alpha-numeric characters and non-repeating dots/hyphens).
hekate.node-name=

# Roles of this node.
# Roles are string identifiers that can be used for logical grouping of cluster nodes via the cluster service API.
hekate.roles=

# Map of custom user-defined properties of this node.
# Remote nodes will be able to see those properties through the cluster service API.
hekate.properties=

# Data serialization codec.
#
#   jdk - JDK default serialization.
#
hekate.codec=jdk

# Fatal error handling policy.
#
#   terminate - Terminate upon any fatal error by calling Hekate#terminate().
#   rejoin    - Rejoin upon any fatal error.
#   exit-jvm  - Call System#exit(250) upon any fatal error.
#
hekate.on-fatal-error=terminate

# Enables/disables printing of this node's configuration details.
hekate.config-report=false

# Enables/disables join the cluster during the Spring context initialization.
# If 'false' then Hekate node should be joined programmatically by calling Hekate#join() method.   
hekate.deferred-join=false

########################################################################################################
# Hekate JMX Configuration
########################################################################################################
# Enables/disables registration of Hekate components and services as JMX beans.
hekate.jmx.enable=false

# JMX domain name.
hekate.jmx.domain=io.hekate

########################################################################################################
# Hekate Network
########################################################################################################
# Host address.
# Can be an IP address, a host name, or an address selection pattern ('any-ip4', 'ip~regex', 'net~regex', etc).
#
#   any         - Any non-loopback address.
#   any-ip4     - Any IPv4 non-loopback address.
#   ip~regex    - Any address that matches the specified 'regex' regular expression.
#   ip4~regex   - Any IPv4 address that matches the specified 'regex' regular expression.
#   ip6~regex   - Any IPv6 address that matches the specified 'regex' regular expression.
#   !ip~regex   - Any address that that does NOT match the specified 'regex' regular expression.
#   !ip4~regex  - Any IPv4 address that does NOT that match the specified 'regex' regular expression.
#   !ip6~regex  - Any IPv6 address that does NOT that match the specified 'regex' regular expression.
#   net~regex   - Any IP address of a network interface whose name matches the specified regular expression.
#   net4~regex  - Any IPv4 address of a network interface whose name matches the specified regular expression.
#   net6~regex  - Any IPv6 address of a network interface whose name matches the specified regular expression.
#   !net~regex  - Any IP address of a network interface whose name does NOT match the specified regular expression.
#   !net4~regex - Any IPv4 address of a network interface whose name does NOT match the specified regular expression.
#   !net6~regex - Any IPv6 address of a network interface whose name does NOT match the specified regular expression.
#   
#   ...all other values will be treated as a directly specified address
#
hekate.network.host=any-ip4

# Network port to accept connections from other nodes (0 to use a randomly selected port).
hekate.network.port=10012

# Maximum value to use for port auto-incrementing if 'hekate.network.port' is busy (0 - no auto-increment).
hekate.network.port-range=100

# Transport type that controls which implementation of NIO API should be used.
#
#   auto  - Try to autodetect which implementation to use depending on the runtime environment.
#   epoll - Optimized Epoll-based transport (for Linux environments only).
#           Requires 'netty-transport-native-epoll' to be on the classpath.
#   nio   - Default NIO-based implementation that is provided by the JDK.
#
hekate.network.transport=auto

# Amount of threads for NIO event processing (defaults to the number of available CPUs).
hekate.network.nio-threads=

# Timeout in milliseconds for establishing a new TCP connections to a remote node.
hekate.network.connect-timeout=3000

# Time interval in milliseconds for sending heartbeats in order to keep TCP socket connections alive.
hekate.network.heartbeat-interval=1000

# Maximum number of lost heartbeats before considering a TCP connection to be failed.
hekate.network.heartbeat-loss-threshold=3

# Time in milliseconds to wait before trying to re-create a TCP socket acceptor in case of its failure.
hekate.network.accept-retry-interval=1000

# TCP_NODELAY socket option.
hekate.network.tcp-no-delay=true

# SO_RCVBUF socket option.
hekate.network.tcp-receive-buffer-size=

# SO_SNDBUF socket option.
hekate.network.tcp-send-buffer-size=

# SO_REUSEADDR socket option.
hekate.network.tcp-reuse-address=

# Size of TCP acceptor's backlog queue.
hekate.network.tcp-backlog=

########################################################################################################
# Hekate Network SSL/TLS Configuration
########################################################################################################
# Enables/disables SSL/TLS for all network communications.
hekate.network.ssl.enable=false

# SSL provider.
#
#   auto     - Automatically select provider depending on what is available on the classpath.
#   jdk      - JDK default SSL provider.
#   open_ssl - OpenSSL provider.
#
hekate.network.ssl.provider=auto

# Keystore file location.
hekate.network.ssl.key-store-path=

# Keystore password.
hekate.network.ssl.key-store-password=

# Keystore type.
hekate.network.ssl.key-store-type=

# Keystore algorithm.
hekate.network.ssl.key-store-algorithm=

# Trust store file location.
hekate.network.ssl.trust-store-path=

# Trust store password.
hekate.network.ssl.trust-store-password=

# Trust store algorithm.
hekate.network.ssl.trust-store-algorithm=

# Trust store type.
hekate.network.ssl.trust-store-type=

# Size of the cache used for storing SSL session objects (0 - use JDK defaults).
hekate.network.ssl.ssl-session-cache-size=

# Timeout in seconds for the cached SSL session objects.
hekate.network.ssl.ssl-session-cache-timeout=

########################################################################################################
# Hekate Cluster
########################################################################################################
# Cluster namespace (alpha-numeric characters and non-repeating dots/hyphens).
# Only those nodes that are configured with the same cluster namespace can form a cluster.
# Nodes that have different namespaces will form completely independent clusters.
hekate.cluster.namespace=default

# Time interval in milliseconds between gossip rounds.
hekate.cluster.gossip-interval=1000

# The maximum amount of nodes in the cluster for the gossip protocol to speed up by sending messages at a higher rate
# so that the cluster could converge faster (at the cost of higher network utilization).
hekate.cluster.speed-up-gossip-size=100

# Time interval in milliseconds for split-brain checks (0 - disable periodic checks).
hekate.cluster.split-brain-check-interval=0

# Time interval in milliseconds to send heartbeat messages to remote nodes.
hekate.cluster.health.heartbeat-interval=500

# Amount of heartbeats that can be lost before considering a node failure.
hekate.cluster.health.heartbeat-loss-threshold=6

# Amount of nodes that should agree on some particular node failure before removing such a suspected node from the cluster.
hekate.cluster.health.failure-detection-quorum=2

# If 'true' then node will be immediately treated as failed in case of a 'java.net.ConnectException' during health checks.
# Otherwise, such a node will be treated as alive unless 'hekate.cluster.health.heartbeat-loss-threshold' is reached.
hekate.cluster.health.fail-fast=true

# Error handling policy among seed node providers.
#
#   fail_on_first_error   - Fail if at least one of seed node providers fails.
#   ignore_partial_errors - Do not fail if at least one seed node providers succeeds.
#
hekate.cluster.seed.policy=fail_on_first_error

########################################################################################################
# Hekate Cluster: Known addresses
########################################################################################################
# Enables/disables discovery via a pre-configured list of seed node addresses.
hekate.cluster.seed.static.enable=false

# List of addresses (<host>:<port>)
hekate.cluster.seed.static.addresses=

########################################################################################################
# Hekate Cluster: Multicast Discovery
########################################################################################################
# Enables/disables IP multicast-based seed node discovery.
hekate.cluster.seed.multicast.enable=true

# Multicast group address.
hekate.cluster.seed.multicast.group=224.1.2.12

# Multicast port.
hekate.cluster.seed.multicast.port=45454

# Time to live (TTL) for multicast packets.
hekate.cluster.seed.multicast.ttl=3

# Time interval in milliseconds between discovery messages multicast rounds.
hekate.cluster.seed.multicast.interval=200

# Time in milliseconds to await for responses from remote nodes.
hekate.cluster.seed.multicast.wait-time=1000

# Enables/disables receiving of multicast messages on the loop back address.
hekate.cluster.seed.multicast.loop-back-disabled=false

########################################################################################################
# Hekate Cluster: File System Discovery
########################################################################################################
# Enables/disables file system-based seed node discovery.
hekate.cluster.seed.filesystem.enable=false

# Work directory to store the information about the seed nodes.
hekate.cluster.seed.filesystem.work-dir=

# Time interval in milliseconds to clean up information about stale seed nodes.
hekate.cluster.seed.filesystem.cleanup-interval=60000

########################################################################################################
# Hekate Cluster: JDBC Discovery
########################################################################################################
# Enables/disables JDBC-based seed node discovery.
hekate.cluster.seed.jdbc.enable=false

# Time interval in milliseconds to clean up information about stale seed nodes.
hekate.cluster.seed.jdbc.cleanup-interval=60000

# Table name.
hekate.cluster.seed.jdbc.table=cluster_nodes

# Column to store the cluster namespace.
hekate.cluster.seed.jdbc.cluster-column=cluster_namespace

# Column to store the host address of a seed node.
hekate.cluster.seed.jdbc.host-column=host

# Column to store the port number of a seed node.
hekate.cluster.seed.jdbc.port-column=port

# JDBC query timeout in seconds (0 - no timeout).
hekate.cluster.seed.jdbc.query-timeout=0

########################################################################################################
# Hekate Cluster: Zookeeper Discovery
########################################################################################################
# Enables/disables Zookeeper-based discovery of seed nodes.
# Requires 'hekate.io:hekate-zookeeper' to be on the classpath.
hekate.cluster.seed.zookeeper.enable=false

# Comma-separated list of Zookeeper addresses (f.e. '127.0.1:2181,127.0.01:2182')
hekate.cluster.seed.zookeeper.connection-string=

# Base path to store the information about the seed nodes in ZooKeeper.
hekate.cluster.seed.zookeeper.base-path=/hekate/cluster

# ZooKeeper connection timeout in milliseconds.
hekate.cluster.seed.zookeeper.connect-timeout=5000

# ZooKeeper session timeout in milliseconds.
hekate.cluster.seed.zookeeper.session-timeout=10000

########################################################################################################
# Hekate Cluster: Etcd Discovery
########################################################################################################
# Enables/disables Etcd-based discovery of seed nodes.
# Requires 'hekate.io:hekate-etcd' to be on the classpath.
hekate.cluster.seed.etcd.enable=false

# List of Etcd endpoint addresses (URLs).
hekate.cluster.seed.etcd.endpoints=

# Etcd username.
hekate.cluster.seed.etcd.username=

# Etcd password.
hekate.cluster.seed.etcd.password=

# Base path to store the information about the seed nodes in Etcd.
hekate.cluster.seed.etcd.base-path=/hekate/cluster

# Time interval in milliseconds to clean up information about stale seed nodes.
hekate.cluster.seed.etcd.cleanup-interval=60000

########################################################################################################
# Hekate Cluster: Consul Discovery
########################################################################################################
# Enables/disables Consul-based discovery of seed nodes.
# Requires 'hekate.io:hekate-consul' to be on the classpath.
hekate.cluster.seed.consul.enable=false

# Consul endpoint address (URL).
hekate.cluster.seed.consul.url=

# Base path to store the information about the seed nodes in Consul.
hekate.cluster.seed.consul.base-path=/hekate/cluster

# Consul ACL token.
hekate.cluster.seed.consul.acl-token=

# Consul connect timeout in milliseconds.
hekate.cluster.seed.consul.connect-timeout=

# Consul read timeout in milliseconds.
hekate.cluster.seed.consul.read-timeout=

# Consul write timeout in milliseconds.
hekate.cluster.seed.consul.write-timeout=

# Time interval in milliseconds to clean up information about stale seed nodes.
hekate.cluster.seed.consul.cleanup-interval=60000

########################################################################################################
# Hekate Cluster: Kubernetes Discovery
########################################################################################################
# Enables/disables Kubernetes-based discovery of seed nodes.
# Requires 'hekate.io:hekate-kubernetes' to be on the classpath.
hekate.cluster.seed.kubernetes.enable=false

# Port name of a Pod's container.
hekate.cluster.seed.kubernetes.container-port-name=hekate

# URL of Kubernetes API server.
hekate.cluster.seed.kubernetes.master-url=

# Kubernetes namespace.
hekate.cluster.seed.kubernetes.namespace=

# Flag indicating that Kubernetes API must have a trusted certificate.
hekate.cluster.seed.kubernetes.trust-certificates=

########################################################################################################
# Hekate Cluster: Cloud Discovery
########################################################################################################
# Enables/disables cloud-based seed node discovery.
# Requires 'hekate.io:hekate-jclouds-core' to be on the classpath.
hekate.cluster.seed.cloud.enable=false

# Cloud services provider.
#
#   aws-ec2               - Amazon EC2.
#                           Requires 'hekate.io:hekate.io:hekate-jclouds-aws' to be on the classpath.
#   google-compute-engine - Google Compute Engine.
#                           Requires 'org.apache.jclouds.provider:google-compute-engine' to be on the classpath.
#   
#   Please see the Apache JClouds documentation for the complete list of all available providers.
#
hekate.cluster.seed.cloud.provider=

# Cloud provider identity (f.e. AWS access key).
hekate.cluster.seed.cloud.identity=

# Cloud provider credential (f.e. AWS secret key).
hekate.cluster.seed.cloud.credential=

# Cloud regions to scan for seed nodes. If not specified then all regions will be scanned.
hekate.cluster.seed.cloud.regions=

# Custom endpoint address to access the cloud provider's APIs.
hekate.cluster.seed.cloud.endpoint=

########################################################################################################
# Hekate Cluster: Cloud Store Siscovery
########################################################################################################
# Enables/disables cloud store-based seed node discovery. Requires 'hekate.io:hekate-jclouds-core' to be on the classpath.
hekate.cluster.seed.cloudstore.enable=false

# Cloud store provider
#
#   aws-s3               - Amazon S3.
#                          Rrequires 'hekate.io:hekate.io:hekate-jclouds-aws' to be on the classpath.
#   google-cloud-storage - Google Cloud Storage.
#                          Requires 'org.apache.jclouds.provider:google-cloud-storage' to be on the classpath.
#   
#   Please see the Apache JClouds documentation for the complete list of all available providers.
#
hekate.cluster.seed.cloudstore.provider=

# Cloud provider identity (f.e. AWS access key).
hekate.cluster.seed.cloudstore.identity=

# Cloud provider credential (f.e. AWS secret key).
hekate.cluster.seed.cloudstore.credential=

# Container to store the information about the seed nodes (f.e. Amazon S3 bucket name).
hekate.cluster.seed.cloudstore.container=

# Time interval in milliseconds to clean up information about stale seed nodes.
hekate.cluster.seed.cloudstore.cleanup-interval=60000

########################################################################################################
# Hekate Coordination
########################################################################################################
# Size of a dedicated thread pool for coordination-related NIO events handling (0 - do not use a dedicated thread pool).
hekate.coordination.nio-threads=0

# Time interval in milliseconds between retry attempts in case of network communication failures or cluster collisions.
hekate.coordination.retry-interval=50

# Time in milliseconds to keep idle socket connections before closing.
hekate.coordination.idle-socket-timeout=60000

########################################################################################################
# Hekate Locks
########################################################################################################
# Size of a dedicated thread pool for locks-related NIO events handling (0 - do not use a dedicated thread pool).
hekate.locks.nio-threads=0

# Thread pool size for handling locks-related operations.
hekate.locks.worker-threads=1

# Time interval in milliseconds between retry attempts in case of network communication failures or cluster collisions.
hekate.locks.retry-interval=50

########################################################################################################
# Hekate RPC
########################################################################################################
# Size of a dedicated thread pool for RPC-related NIO events handling (0 - do not use a dedicated thread pool).
hekate.rpc.nio-threads=0

# Thread pool size for RPC requests handling (defaults to the number of available CPUs).
hekate.rpc.worker-threads=

# Time in milliseconds to keep idle socket connections before closing (0 - do not close idle connections).
hekate.rpc.idle-socket-timeout=0

# Low watermark of inbound (receiving) queue size.
# Value must be within the [0..'hekate.rpc.back-pressure.in-high-watermark') range.
hekate.rpc.back-pressure.in-low-watermark=0

# High watermark of inbound (receiving) queue size (0 - no limit).
hekate.rpc.back-pressure.in-high-watermark=0

# Low watermark of outbound (sending) queue size.
# Value must be within the [0..'hekate.rpc.back-pressure.out-high-watermark') range.
hekate.rpc.back-pressure.out-low-watermark=0

# High watermark of outbound (sending) queue size (0 - no limit).
hekate.rpc.back-pressure.out-high-watermark=0

# Policy that should be applied when outbound (sending) queue size exceeds the 'hekate.rpc.back-pressure.out-high-watermark' value.
#
#   block                 - Block the caller thread unless the outbound queue goes down to its low watermark.
#   block_uninterruptedly - Uninterruptedly block the caller thread unless the outbound queue goes down to its low watermark.
#   fail                  - Rejects operation with queue overflow error.
#   ignore                - Completely ignore the queue size restrictions.
#
hekate.rpc.back-pressure.out-overflow-policy=IGNORE
