2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.cluster.raft;
11 import java.util.concurrent.atomic.AtomicLong;
14 * The state of the followers log as known by the Leader
16 public interface FollowerLogInformation {
19 * Increment the value of the nextIndex
22 public long incrNextIndex();
25 * Decrement the value of the nextIndex
28 public long decrNextIndex();
34 void setNextIndex(long nextIndex);
37 * Increment the value of the matchIndex
40 public long incrMatchIndex();
42 public void setMatchIndex(long matchIndex);
45 * The identifier of the follower
46 * This could simply be the url of the remote actor
48 public String getId();
51 * for each server, index of the next log entry
52 * to send to that server (initialized to leader
55 public AtomicLong getNextIndex();
58 * for each server, index of highest log entry
59 * known to be replicated on server
60 * (initialized to 0, increases monotonically)
62 public AtomicLong getMatchIndex();