2 * Copyright (c) 2014 Cisco 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.base.messages;
10 import akka.dispatch.ControlMessage;
11 import com.google.common.base.Preconditions;
12 import java.io.OutputStream;
13 import java.util.Optional;
14 import javax.annotation.Nonnull;
15 import org.opendaylight.controller.cluster.raft.persisted.Snapshot;
17 public class CaptureSnapshotReply implements ControlMessage {
18 private final Snapshot.State snapshotState;
19 private final Optional<OutputStream> installSnapshotStream;
21 public CaptureSnapshotReply(@Nonnull final Snapshot.State snapshotState,
22 @Nonnull final Optional<OutputStream> installSnapshotStream) {
23 this.snapshotState = Preconditions.checkNotNull(snapshotState);
24 this.installSnapshotStream = Preconditions.checkNotNull(installSnapshotStream);
28 public Snapshot.State getSnapshotState() {
33 public Optional<OutputStream> getInstallSnapshotStream() {
34 return installSnapshotStream;