2 * Copyright (c) 2015 Brocade Communications 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
8 package org.opendaylight.controller.cluster.raft;
10 import akka.actor.ActorRef;
13 * Interface for a class that participates in raft actor snapshotting.
15 * @author Thomas Pantelis
17 public interface RaftActorSnapshotCohort {
20 * This method is called by the RaftActor when a snapshot needs to be
21 * created. The implementation should send a CaptureSnapshotReply to the given actor.
23 * @param actorRef the actor to which to respond
25 void createSnapshot(ActorRef actorRef);
28 * This method is called to apply a snapshot installed by the leader.
30 * @param snapshotBytes a snapshot of the state of the actor
32 void applySnapshot(byte[] snapshotBytes);