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.IOException;
13 import java.io.OutputStream;
14 import java.util.Optional;
15 import org.opendaylight.controller.cluster.raft.persisted.EmptyState;
16 import org.opendaylight.controller.cluster.raft.persisted.Snapshot.State;
19 * RaftActorSnapshotCohort implementation that does nothing.
21 * @author Thomas Pantelis
23 public final class NoopRaftActorSnapshotCohort implements RaftActorSnapshotCohort {
24 public static final NoopRaftActorSnapshotCohort INSTANCE = new NoopRaftActorSnapshotCohort();
26 private NoopRaftActorSnapshotCohort() {
30 public void createSnapshot(ActorRef actorRef, Optional<OutputStream> installSnapshotStream) {
34 public void applySnapshot(State snapshotState) {
38 public State deserializeSnapshot(ByteSource snapshotBytes) throws IOException {
39 return EmptyState.INSTANCE;