Package io.aeron.cluster.client
Class AeronCluster.Configuration
java.lang.Object
io.aeron.cluster.client.AeronCluster.Configuration
- Enclosing class:
- AeronCluster
Configuration options for cluster client.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSystem property to name Cluster client.static final StringChannel for receiving response messages from a cluster.static final StringChannel for receiving response messages from a cluster.static final intDefault stream id within a channel for receiving messages from a cluster.static final StringStream id within a channel for receiving messages from a cluster.static final StringChannel for sending messages to a cluster.static final StringChannel for sending messages to a cluster.static final StringDefault comma separated list of cluster ingress endpoints.static final StringProperty name for the comma separated map of cluster memberId to ingress endpoint for use with unicast.static final intDefault stream id within a channel for sending messages to a cluster.static final StringStream id within a channel for sending messages to a cluster.static final longDefault timeout when waiting on a message to be sent or received.static final StringTimeout when waiting on a message to be sent or received.static final intMajor version of the network protocol from client to consensus module.static final intMinor version of the network protocol from client to consensus module.static final intPatch version of the network protocol from client to consensus module.static final intCombined semantic version for the client to consensus module protocol. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGet the configured client name.static StringThe valueEGRESS_CHANNEL_DEFAULTor system propertyEGRESS_CHANNEL_PROP_NAMEif set.static intThe valueEGRESS_STREAM_ID_DEFAULTor system propertyEGRESS_STREAM_ID_PROP_NAMEif set.static StringThe valueINGRESS_CHANNEL_DEFAULTor system propertyINGRESS_CHANNEL_PROP_NAMEif set.static StringThe valueINGRESS_ENDPOINTS_DEFAULTor system propertyINGRESS_ENDPOINTS_PROP_NAMEif set.static intThe valueINGRESS_STREAM_ID_DEFAULTor system propertyINGRESS_STREAM_ID_PROP_NAMEif set.static longThe timeout in nanoseconds to wait for a message.
-
Field Details
-
PROTOCOL_MAJOR_VERSION
public static final int PROTOCOL_MAJOR_VERSIONMajor version of the network protocol from client to consensus module. If these don't match then client and consensus module are not compatible.- See Also:
-
PROTOCOL_MINOR_VERSION
public static final int PROTOCOL_MINOR_VERSIONMinor version of the network protocol from client to consensus module. If these don't match then some features may not be available.- See Also:
-
PROTOCOL_PATCH_VERSION
public static final int PROTOCOL_PATCH_VERSIONPatch version of the network protocol from client to consensus module. If these don't match then bug fixes may not have been applied.- See Also:
-
PROTOCOL_SEMANTIC_VERSION
public static final int PROTOCOL_SEMANTIC_VERSIONCombined semantic version for the client to consensus module protocol.- See Also:
-
MESSAGE_TIMEOUT_PROP_NAME
Timeout when waiting on a message to be sent or received.- See Also:
-
MESSAGE_TIMEOUT_DEFAULT_NS
public static final long MESSAGE_TIMEOUT_DEFAULT_NSDefault timeout when waiting on a message to be sent or received. -
INGRESS_ENDPOINTS_PROP_NAME
Property name for the comma separated map of cluster memberId to ingress endpoint for use with unicast. This is the endpoint values which get substituted into theINGRESS_CHANNEL_PROP_NAMEwhen using UDP unicast."0=endpoint,1=endpoint,2=endpoint"Each member of the list will be substituted for the endpoint in the
INGRESS_CHANNEL_PROP_NAMEvalue.- See Also:
-
INGRESS_ENDPOINTS_DEFAULT
Default comma separated list of cluster ingress endpoints. -
INGRESS_CHANNEL_PROP_NAME
Channel for sending messages to a cluster. Ideally this will be a multicast address otherwise unicast will be required and theINGRESS_ENDPOINTS_PROP_NAMEis used to substitute the endpoints from theINGRESS_ENDPOINTS_PROP_NAMElist.- See Also:
-
INGRESS_CHANNEL_DEFAULT
Channel for sending messages to a cluster. -
INGRESS_STREAM_ID_PROP_NAME
Stream id within a channel for sending messages to a cluster.- See Also:
-
INGRESS_STREAM_ID_DEFAULT
public static final int INGRESS_STREAM_ID_DEFAULTDefault stream id within a channel for sending messages to a cluster.- See Also:
-
EGRESS_CHANNEL_PROP_NAME
Channel for receiving response messages from a cluster.Channel's endpoint can be specified explicitly (i.e. by providing address and port pair) or by using zero as a port number. Here is an example of valid response channels:
aeron:udp?endpoint=localhost:9020- listen on port9020on localhost.aeron:udp?endpoint=192.168.10.10:9020- listen on port9020on192.168.10.10.aeron:udp?endpoint=localhost:0- in this case the port is unspecified and the OS will assign a free port from the ephemeral port range.
- See Also:
-
EGRESS_CHANNEL_DEFAULT
Channel for receiving response messages from a cluster. -
EGRESS_STREAM_ID_PROP_NAME
Stream id within a channel for receiving messages from a cluster.- See Also:
-
EGRESS_STREAM_ID_DEFAULT
public static final int EGRESS_STREAM_ID_DEFAULTDefault stream id within a channel for receiving messages from a cluster.- See Also:
-
CLIENT_NAME_PROP_NAME
System property to name Cluster client. Defaults to empty string.- Since:
- 1.49.0
- See Also:
-
-
Constructor Details
-
Configuration
public Configuration()
-
-
Method Details
-
messageTimeoutNs
public static long messageTimeoutNs()The timeout in nanoseconds to wait for a message.- Returns:
- timeout in nanoseconds to wait for a message.
- See Also:
-
ingressEndpoints
The valueINGRESS_ENDPOINTS_DEFAULTor system propertyINGRESS_ENDPOINTS_PROP_NAMEif set.- Returns:
INGRESS_ENDPOINTS_DEFAULTor system propertyINGRESS_ENDPOINTS_PROP_NAMEif set.
-
ingressChannel
The valueINGRESS_CHANNEL_DEFAULTor system propertyINGRESS_CHANNEL_PROP_NAMEif set.- Returns:
INGRESS_CHANNEL_DEFAULTor system propertyINGRESS_CHANNEL_PROP_NAMEif set.
-
ingressStreamId
public static int ingressStreamId()The valueINGRESS_STREAM_ID_DEFAULTor system propertyINGRESS_STREAM_ID_PROP_NAMEif set.- Returns:
INGRESS_STREAM_ID_DEFAULTor system propertyINGRESS_STREAM_ID_PROP_NAMEif set.
-
egressChannel
The valueEGRESS_CHANNEL_DEFAULTor system propertyEGRESS_CHANNEL_PROP_NAMEif set.- Returns:
EGRESS_CHANNEL_DEFAULTor system propertyEGRESS_CHANNEL_PROP_NAMEif set.
-
egressStreamId
public static int egressStreamId()The valueEGRESS_STREAM_ID_DEFAULTor system propertyEGRESS_STREAM_ID_PROP_NAMEif set.- Returns:
EGRESS_STREAM_ID_DEFAULTor system propertyEGRESS_STREAM_ID_PROP_NAMEif set.
-
clientName
Get the configured client name.- Returns:
- specified client name or empty string if not set.
- Since:
- 1.49.0
- See Also:
-