* @param matchIndex the initial match index.
* @param context the RaftActorContext.
*/
- public FollowerLogInformationImpl(PeerInfo peerInfo, long matchIndex, RaftActorContext context) {
+ public FollowerLogInformationImpl(final PeerInfo peerInfo, final long matchIndex, final RaftActorContext context) {
this.nextIndex = context.getCommitIndex();
this.matchIndex = matchIndex;
this.context = context;
}
@Override
- public boolean setNextIndex(long nextIndex) {
+ @SuppressWarnings("checkstyle:hiddenField")
+ public boolean setNextIndex(final long nextIndex) {
if (this.nextIndex != nextIndex) {
this.nextIndex = nextIndex;
return true;
}
@Override
- public boolean setMatchIndex(long matchIndex) {
+ @SuppressWarnings("checkstyle:hiddenField")
+ public boolean setMatchIndex(final long matchIndex) {
// If the new match index is the index of the entry currently being sliced, then we know slicing is complete
// and the follower received the entry and responded so clear the slicedLogEntryIndex
if (isLogEntrySlicingInProgress() && slicedLogEntryIndex == matchIndex) {
}
@Override
- public void setPayloadVersion(short payloadVersion) {
+ public void setPayloadVersion(final short payloadVersion) {
this.payloadVersion = payloadVersion;
}
}
@Override
- public void setRaftVersion(short raftVersion) {
+ public void setRaftVersion(final short raftVersion) {
this.raftVersion = raftVersion;
}
}
@Override
- public void setLeaderInstallSnapshotState(@Nonnull LeaderInstallSnapshotState state) {
+ public void setLeaderInstallSnapshotState(@Nonnull final LeaderInstallSnapshotState state) {
if (this.installSnapshotState == null) {
this.installSnapshotState = Preconditions.checkNotNull(state);
}
}
@Override
- public void setSlicedLogEntryIndex(long index) {
+ public void setSlicedLogEntryIndex(final long index) {
slicedLogEntryIndex = index;
}