Class CoordinationProcessConfig

    • Constructor Detail

      • CoordinationProcessConfig

        public CoordinationProcessConfig()
        Default constructor.
      • CoordinationProcessConfig

        public CoordinationProcessConfig​(String name)
        Constructs new instance.
        Parameters:
        name - Process name (see setName(String)).
    • Method Detail

      • getName

        public String getName()
        Returns the coordination process name (see setName(String)).
        Returns:
        Coordination process name.
      • setName

        public void setName​(String name)
        Sets the coordination process name. Can contain only alpha-numeric characters and non-repeatable dots/hyphens

        This name must be the same on all of the cluster nodes that participate in this coordination process.

        Parameters:
        name - Process name.
        See Also:
        CoordinationService.process(String)
      • isAsyncInit

        public boolean isAsyncInit()
        Returns the flag that controls the timing of initial coordination (see setAsyncInit(boolean)).
        Returns:
        true if Hekate.join() will be blocked until the initial coordination is complete.
      • setAsyncInit

        public void setAsyncInit​(boolean asyncInit)
        Sets the flag that controls the timing of initial coordination.
        • If set to true then initial coordination will be performed asynchronously and will not block Hekate.join()
        • If set to false then Hekate.join() will be blocked until the initial coordination is complete

        Default value of this parameter is true (i.e. Hekate.join() will not wait for the initial coordination).

        Parameters:
        asyncInit - true to block Hekate.join() until initial coordination is complete.
      • setHandler

        public void setHandler​(CoordinationHandler handler)
        Sets the coordination process handler.
        Parameters:
        handler - Coordination process handler.
      • setMessageCodec

        public void setMessageCodec​(CodecFactory<Object> messageCodec)
        Sets the codec that should be used for messages serialization.

        This parameter is optional and if not specified then default codec will be used.

        Parameters:
        messageCodec - Codec.