Implementation of Raft consensus algorithm in Java