X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2Fbase%2Fmessages%2FApplyLogEntries.java;fp=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2Fbase%2Fmessages%2FApplyLogEntries.java;h=af3c4fd87d6e01d2f455833185ef9c98451be8cf;hb=b9cc9136fe3970ea12dfa3f0fedc803dc3cc101b;hp=0000000000000000000000000000000000000000;hpb=05636effb1e63ca1356c814db6807653fa8575fd;p=controller.git diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/ApplyLogEntries.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/ApplyLogEntries.java new file mode 100644 index 0000000000..af3c4fd87d --- /dev/null +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/ApplyLogEntries.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.controller.cluster.raft.base.messages; + +import java.io.Serializable; + +/** + * ApplyLogEntries serves as a message which is stored in the akka's persistent + * journal. + * During recovery if this message is found, then all in-mem journal entries from + * context.lastApplied to ApplyLogEntries.toIndex are applied to the state + * + * This class is also used as a internal message sent from Behaviour to + * RaftActor to persist the ApplyLogEntries + * + */ +public class ApplyLogEntries implements Serializable { + private final int toIndex; + + public ApplyLogEntries(int toIndex) { + this.toIndex = toIndex; + } + + public int getToIndex() { + return toIndex; + } +}