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;
13 public class FollowerLogInformationImpl implements FollowerLogInformation{
15 private final String id;
17 private final AtomicLong nextIndex;
19 private final AtomicLong matchIndex;
21 public FollowerLogInformationImpl(String id, AtomicLong nextIndex,
22 AtomicLong matchIndex) {
24 this.nextIndex = nextIndex;
25 this.matchIndex = matchIndex;
28 public long incrNextIndex(){
29 return nextIndex.incrementAndGet();
32 public long incrMatchIndex(){
33 return matchIndex.incrementAndGet();
36 public String getId() {
40 public AtomicLong getNextIndex() {
44 public AtomicLong getMatchIndex() {