/** * Configure a replica representation. * * @param leader * instance this replica follows. * @param name * unique-ish name identifying this replica for debugging. * @param cfg * how Ketch should treat the replica. */ protected KetchReplica(KetchLeader leader, String name, ReplicaConfig cfg) { this.leader = leader; this.replicaName = name; this.participation = cfg.getParticipation(); this.commitMethod = cfg.getCommitMethod(); this.commitSpeed = cfg.getCommitSpeed(); this.minRetryMillis = cfg.getMinRetry(MILLISECONDS); this.maxRetryMillis = cfg.getMaxRetry(MILLISECONDS); this.staged = new HashMap<>(); this.running = new HashMap<>(); this.waiting = new HashMap<>(); this.queued = new ArrayList<>(4); }
/** * Configure a replica representation. * * @param leader * instance this replica follows. * @param name * unique-ish name identifying this replica for debugging. * @param cfg * how Ketch should treat the replica. */ protected KetchReplica(KetchLeader leader, String name, ReplicaConfig cfg) { this.leader = leader; this.replicaName = name; this.participation = cfg.getParticipation(); this.commitMethod = cfg.getCommitMethod(); this.commitSpeed = cfg.getCommitSpeed(); this.minRetryMillis = cfg.getMinRetry(MILLISECONDS); this.maxRetryMillis = cfg.getMaxRetry(MILLISECONDS); this.staged = new HashMap<>(); this.running = new HashMap<>(); this.waiting = new HashMap<>(); this.queued = new ArrayList<>(4); }
/** * Configure a replica representation. * * @param leader * instance this replica follows. * @param name * unique-ish name identifying this replica for debugging. * @param cfg * how Ketch should treat the replica. */ protected KetchReplica(KetchLeader leader, String name, ReplicaConfig cfg) { this.leader = leader; this.replicaName = name; this.participation = cfg.getParticipation(); this.commitMethod = cfg.getCommitMethod(); this.commitSpeed = cfg.getCommitSpeed(); this.minRetryMillis = cfg.getMinRetry(MILLISECONDS); this.maxRetryMillis = cfg.getMaxRetry(MILLISECONDS); this.staged = new HashMap<>(); this.running = new HashMap<>(); this.waiting = new HashMap<>(); this.queued = new ArrayList<>(4); }