Class ClusterClientSettings

  • All Implemented Interfaces:
    NoSerializationVerificationNeeded

    public final class ClusterClientSettings
    extends java.lang.Object
    implements NoSerializationVerificationNeeded
    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 "akka.tcp://[email protected]: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 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 Detail

      • 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)
      • 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)
        For binary/source compatibility
        Parameters:
        initialContacts - (undocumented)
        establishingGetContactsInterval - (undocumented)
        refreshContactsInterval - (undocumented)
        heartbeatInterval - (undocumented)
        acceptableHeartbeatPause - (undocumented)
        bufferSize - (undocumented)
    • Method Detail

      • apply

        public static ClusterClientSettings apply​(ActorSystem system)
        Create settings from the default configuration akka.cluster.client.
        Parameters:
        system - (undocumented)
        Returns:
        (undocumented)
      • apply

        public static ClusterClientSettings apply​(com.typesafe.config.Config config)
        Create settings from a configuration with the same layout as the default configuration akka.cluster.client.
        Parameters:
        config - (undocumented)
        Returns:
        (undocumented)
      • create

        public static ClusterClientSettings create​(ActorSystem system)
        Java API: Create settings from the default configuration akka.cluster.client.
        Parameters:
        system - (undocumented)
        Returns:
        (undocumented)
      • create

        public static ClusterClientSettings create​(com.typesafe.config.Config config)
        Java API: Create settings from a configuration with the same layout as the default configuration akka.cluster.client.
        Parameters:
        config - (undocumented)
        Returns:
        (undocumented)
      • initialContacts

        public scala.collection.immutable.Set<ActorPath> initialContacts()
      • establishingGetContactsInterval

        public scala.concurrent.duration.FiniteDuration establishingGetContactsInterval()
      • refreshContactsInterval

        public scala.concurrent.duration.FiniteDuration refreshContactsInterval()
      • heartbeatInterval

        public scala.concurrent.duration.FiniteDuration heartbeatInterval()
      • acceptableHeartbeatPause

        public scala.concurrent.duration.FiniteDuration acceptableHeartbeatPause()
      • bufferSize

        public int bufferSize()
      • reconnectTimeout

        public scala.Option<scala.concurrent.duration.FiniteDuration> reconnectTimeout()
      • withInitialContacts

        public ClusterClientSettings withInitialContacts​(scala.collection.immutable.Set<ActorPath> initialContacts)
        Scala API
        Parameters:
        initialContacts - (undocumented)
        Returns:
        (undocumented)
      • withInitialContacts

        public ClusterClientSettings withInitialContacts​(java.util.Set<ActorPath> initialContacts)
        Java API
        Parameters:
        initialContacts - (undocumented)
        Returns:
        (undocumented)
      • withEstablishingGetContactsInterval

        public ClusterClientSettings withEstablishingGetContactsInterval​(scala.concurrent.duration.FiniteDuration establishingGetContactsInterval)
      • withRefreshContactsInterval

        public ClusterClientSettings withRefreshContactsInterval​(scala.concurrent.duration.FiniteDuration refreshContactsInterval)
      • withHeartbeat

        public ClusterClientSettings withHeartbeat​(scala.concurrent.duration.FiniteDuration heartbeatInterval,
                                                   scala.concurrent.duration.FiniteDuration acceptableHeartbeatPause)
      • withReconnectTimeout

        public ClusterClientSettings withReconnectTimeout​(scala.Option<scala.concurrent.duration.FiniteDuration> reconnectTimeout)