Raft implementation in java