Class ReplicaConfig

    • Constructor Detail

      • ReplicaConfig

        public ReplicaConfig()
    • Method Detail

      • newFromConfig

        public static ReplicaConfig newFromConfig​(Config cfg,
                                                  String name)
        Read a configuration from a config block.
        Parameters:
        cfg - configuration to read.
        name - of the replica being configured.
        Returns:
        replica configuration for name.
      • getParticipation

        public KetchReplica.Participation getParticipation()
        Get participation of the replica in the system.
        Returns:
        participation of the replica in the system.
      • getCommitMethod

        public KetchReplica.CommitMethod getCommitMethod()
        Get how Ketch should apply committed changes.
        Returns:
        how Ketch should apply committed changes.
      • getCommitSpeed

        public KetchReplica.CommitSpeed getCommitSpeed()
        Get how quickly should Ketch commit.
        Returns:
        how quickly should Ketch commit.
      • getMinRetry

        public long getMinRetry​(TimeUnit unit)
        Returns the minimum wait delay before retrying a failure.
        Parameters:
        unit - to get retry delay in.
        Returns:
        minimum delay before retrying a failure.
      • getMaxRetry

        public long getMaxRetry​(TimeUnit unit)
        Returns the maximum wait delay before retrying a failure.
        Parameters:
        unit - to get retry delay in.
        Returns:
        maximum delay before retrying a failure.
      • fromConfig

        public ReplicaConfig fromConfig​(Config cfg,
                                        String name)
        Update the configuration from a config block.
        Parameters:
        cfg - configuration to read.
        name - of the replica being configured.
        Returns:
        this