Package org.eclipse.jgit.internal.ketch
Class ReplicaConfig
- java.lang.Object
-
- org.eclipse.jgit.internal.ketch.ReplicaConfig
-
public class ReplicaConfig extends Object
Configures aKetchReplica
.
-
-
Constructor Summary
Constructors Constructor Description ReplicaConfig()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ReplicaConfig
fromConfig(Config cfg, String name)
Update the configuration from a config block.KetchReplica.CommitMethod
getCommitMethod()
Get how Ketch should apply committed changes.KetchReplica.CommitSpeed
getCommitSpeed()
Get how quickly should Ketch commit.long
getMaxRetry(TimeUnit unit)
Returns the maximum wait delay before retrying a failure.long
getMinRetry(TimeUnit unit)
Returns the minimum wait delay before retrying a failure.KetchReplica.Participation
getParticipation()
Get participation of the replica in the system.static ReplicaConfig
newFromConfig(Config cfg, String name)
Read a configuration from a config block.
-
-
-
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
-
-