Fixup comparison formatting
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / NoopRaftActorSnapshotCohort.java
1 /*
2  * Copyright (c) 2017 Brocade Communications Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.cluster.raft;
9
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;
16
17 /**
18  * RaftActorSnapshotCohort implementation that does nothing.
19  *
20  * @author Thomas Pantelis
21  */
22 public final class NoopRaftActorSnapshotCohort implements RaftActorSnapshotCohort {
23     public static final NoopRaftActorSnapshotCohort INSTANCE = new NoopRaftActorSnapshotCohort();
24
25     private NoopRaftActorSnapshotCohort() {
26     }
27
28     @Override
29     public void createSnapshot(ActorRef actorRef, Optional<OutputStream> installSnapshotStream) {
30     }
31
32     @Override
33     public void applySnapshot(State snapshotState) {
34     }
35
36     @Override
37     public State deserializeSnapshot(ByteSource snapshotBytes) {
38         return EmptyState.INSTANCE;
39     }
40 }