private final Queue<ClientRequestTracker> trackers = new LinkedList<>();
private Cancellable heartbeatSchedule = null;
- private Optional<SnapshotHolder> snapshot = Optional.absent();;
+ private Optional<SnapshotHolder> snapshot = Optional.absent();
private int minReplicationCount;
protected AbstractLeader(RaftActorContext context, RaftState state,
if(snapshotTracker.addChunk(installSnapshot.getChunkIndex(), installSnapshot.getData(),
installSnapshot.getLastChunkHashCode())){
Snapshot snapshot = Snapshot.create(snapshotTracker.getSnapshot(),
- new ArrayList<ReplicatedLogEntry>(),
+ new ArrayList<>(),
installSnapshot.getLastIncludedIndex(),
installSnapshot.getLastIncludedTerm(),
installSnapshot.getLastIncludedIndex(),
}
public MockRaftActorContext(){
- super(null, null, "test", newElectionTerm(), -1, -1, new HashMap<String, String>(),
+ super(null, null, "test", newElectionTerm(), -1, -1, new HashMap<>(),
new DefaultConfigParamsImpl(), new NonPersistentDataProvider(), LOG);
setReplicatedLog(new MockReplicatedLogBuilder().build());
}
public MockRaftActorContext(String id, ActorSystem system, ActorRef actor){
- super(actor, null, id, newElectionTerm(), -1, -1, new HashMap<String, String>(),
+ super(actor, null, id, newElectionTerm(), -1, -1, new HashMap<>(),
new DefaultConfigParamsImpl(), new NonPersistentDataProvider(), LOG);
this.system = system;