2 * Copyright (c) 2017 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;
11 import com.google.common.io.ByteSource;
12 import java.io.OutputStream;
13 import java.util.Optional;
14 import org.opendaylight.controller.cluster.raft.persisted.EmptyState;
15 import org.opendaylight.controller.cluster.raft.persisted.Snapshot.State;
18 * RaftActorSnapshotCohort implementation that does nothing.
20 * @author Thomas Pantelis
22 public final class NoopRaftActorSnapshotCohort implements RaftActorSnapshotCohort {
23 public static final NoopRaftActorSnapshotCohort INSTANCE = new NoopRaftActorSnapshotCohort();
25 private NoopRaftActorSnapshotCohort() {
29 public void createSnapshot(ActorRef actorRef, Optional<OutputStream> installSnapshotStream) {
33 public void applySnapshot(State snapshotState) {
37 public State deserializeSnapshot(ByteSource snapshotBytes) {
38 return EmptyState.INSTANCE;