Package org.apache.pekko.cluster.client
Class ClusterClientSettings
java.lang.Object
org.apache.pekko.cluster.client.ClusterClientSettings
- All Implemented Interfaces:
NoSerializationVerificationNeeded
public final class ClusterClientSettings
extends Object
implements NoSerializationVerificationNeeded
Deprecated.
Use Apache Pekko gRPC instead, see https://pekko.apache.org/docs/pekko/current/cluster-client.html#migration-to-pekko-grpc. Since Akka 2.6.0.
param: initialContacts Actor paths of the
ClusterReceptionist
actors on
the servers (cluster nodes) that the client will try to contact initially.
It is mandatory to specify at least one initial contact. The path of the
default receptionist is
"pekko://system@hostname:port/system/receptionist"
param: establishingGetContactsInterval Interval at which the client retries
to establish contact with one of ClusterReceptionist on the servers (cluster nodes)
param: refreshContactsInterval Interval at which the client will ask the
ClusterReceptionist
for new contact points to be used for next reconnect.
param: heartbeatInterval How often failure detection heartbeat messages for detection
of failed connections should be sent.
param: acceptableHeartbeatPause Number of potentially lost/delayed heartbeats that will
be accepted before considering it to be an anomaly. The ClusterClient is using the
pekko.remote.DeadlineFailureDetector
, which will trigger if there are no heartbeats
within the duration heartbeatInterval + acceptableHeartbeatPause
.
param: bufferSize If connection to the receptionist is not established the client
will buffer this number of messages and deliver them the connection is established.
When the buffer is full old messages will be dropped when new messages are sent via the
client. Use 0 to disable buffering, i.e. messages will be dropped immediately if the
location of the receptionist is unavailable.
param: reconnectTimeout If the connection to the receptionist is lost and cannot
be re-established within this duration the cluster client will be stopped. This makes it possible
to watch it from another actor and possibly acquire a new list of initialContacts from some
external service registry-
Constructor Summary
ConstructorsConstructorDescriptionClusterClientSettings
(scala.collection.immutable.Set<ActorPath> initialContacts, scala.concurrent.duration.FiniteDuration establishingGetContactsInterval, scala.concurrent.duration.FiniteDuration refreshContactsInterval, scala.concurrent.duration.FiniteDuration heartbeatInterval, scala.concurrent.duration.FiniteDuration acceptableHeartbeatPause, int bufferSize) Deprecated.For binary/source compatibilityClusterClientSettings
(scala.collection.immutable.Set<ActorPath> initialContacts, scala.concurrent.duration.FiniteDuration establishingGetContactsInterval, scala.concurrent.duration.FiniteDuration refreshContactsInterval, scala.concurrent.duration.FiniteDuration heartbeatInterval, scala.concurrent.duration.FiniteDuration acceptableHeartbeatPause, int bufferSize, scala.Option<scala.concurrent.duration.FiniteDuration> reconnectTimeout) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionscala.concurrent.duration.FiniteDuration
Deprecated.static ClusterClientSettings
apply
(com.typesafe.config.Config config) Deprecated.Create settings from a configuration with the same layout as the default configurationpekko.cluster.client
.static ClusterClientSettings
apply
(ActorSystem system) Deprecated.Create settings from the default configurationpekko.cluster.client
.int
Deprecated.static ClusterClientSettings
create
(com.typesafe.config.Config config) Deprecated.Java API: Create settings from a configuration with the same layout as the default configurationpekko.cluster.client
.static ClusterClientSettings
create
(ActorSystem system) Deprecated.Java API: Create settings from the default configurationpekko.cluster.client
.scala.concurrent.duration.FiniteDuration
Deprecated.scala.concurrent.duration.FiniteDuration
Deprecated.scala.collection.immutable.Set<ActorPath>
Deprecated.scala.Option<scala.concurrent.duration.FiniteDuration>
Deprecated.scala.concurrent.duration.FiniteDuration
Deprecated.withBufferSize
(int bufferSize) Deprecated.withEstablishingGetContactsInterval
(scala.concurrent.duration.FiniteDuration establishingGetContactsInterval) Deprecated.withHeartbeat
(scala.concurrent.duration.FiniteDuration heartbeatInterval, scala.concurrent.duration.FiniteDuration acceptableHeartbeatPause) Deprecated.withInitialContacts
(Set<ActorPath> initialContacts) Deprecated.Java APIwithInitialContacts
(scala.collection.immutable.Set<ActorPath> initialContacts) Deprecated.Scala APIwithReconnectTimeout
(scala.Option<scala.concurrent.duration.FiniteDuration> reconnectTimeout) Deprecated.withRefreshContactsInterval
(scala.concurrent.duration.FiniteDuration refreshContactsInterval) Deprecated.
-
Constructor Details
-
ClusterClientSettings
public ClusterClientSettings(scala.collection.immutable.Set<ActorPath> initialContacts, scala.concurrent.duration.FiniteDuration establishingGetContactsInterval, scala.concurrent.duration.FiniteDuration refreshContactsInterval, scala.concurrent.duration.FiniteDuration heartbeatInterval, scala.concurrent.duration.FiniteDuration acceptableHeartbeatPause, int bufferSize, scala.Option<scala.concurrent.duration.FiniteDuration> reconnectTimeout) Deprecated. -
ClusterClientSettings
public ClusterClientSettings(scala.collection.immutable.Set<ActorPath> initialContacts, scala.concurrent.duration.FiniteDuration establishingGetContactsInterval, scala.concurrent.duration.FiniteDuration refreshContactsInterval, scala.concurrent.duration.FiniteDuration heartbeatInterval, scala.concurrent.duration.FiniteDuration acceptableHeartbeatPause, int bufferSize) Deprecated.For binary/source compatibility
-
-
Method Details
-
apply
Deprecated.Create settings from the default configurationpekko.cluster.client
. -
apply
Deprecated.Create settings from a configuration with the same layout as the default configurationpekko.cluster.client
. -
create
Deprecated.Java API: Create settings from the default configurationpekko.cluster.client
. -
create
Deprecated.Java API: Create settings from a configuration with the same layout as the default configurationpekko.cluster.client
. -
initialContacts
Deprecated. -
establishingGetContactsInterval
public scala.concurrent.duration.FiniteDuration establishingGetContactsInterval()Deprecated. -
refreshContactsInterval
public scala.concurrent.duration.FiniteDuration refreshContactsInterval()Deprecated. -
heartbeatInterval
public scala.concurrent.duration.FiniteDuration heartbeatInterval()Deprecated. -
acceptableHeartbeatPause
public scala.concurrent.duration.FiniteDuration acceptableHeartbeatPause()Deprecated. -
bufferSize
public int bufferSize()Deprecated. -
reconnectTimeout
public scala.Option<scala.concurrent.duration.FiniteDuration> reconnectTimeout()Deprecated. -
withInitialContacts
public ClusterClientSettings withInitialContacts(scala.collection.immutable.Set<ActorPath> initialContacts) Deprecated.Scala API -
withInitialContacts
Deprecated.Java API -
withEstablishingGetContactsInterval
public ClusterClientSettings withEstablishingGetContactsInterval(scala.concurrent.duration.FiniteDuration establishingGetContactsInterval) Deprecated. -
withRefreshContactsInterval
public ClusterClientSettings withRefreshContactsInterval(scala.concurrent.duration.FiniteDuration refreshContactsInterval) Deprecated. -
withHeartbeat
public ClusterClientSettings withHeartbeat(scala.concurrent.duration.FiniteDuration heartbeatInterval, scala.concurrent.duration.FiniteDuration acceptableHeartbeatPause) Deprecated. -
withBufferSize
Deprecated. -
withReconnectTimeout
public ClusterClientSettings withReconnectTimeout(scala.Option<scala.concurrent.duration.FiniteDuration> reconnectTimeout) Deprecated.
-