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 static java.util.Objects.requireNonNull;
12 import akka.dispatch.ControlMessage;
13 import java.io.OutputStream;
14 import java.util.Optional;
15 import org.eclipse.jdt.annotation.NonNull;
16 import org.opendaylight.controller.cluster.raft.persisted.Snapshot;
18 public class CaptureSnapshotReply implements ControlMessage {
19 private final Snapshot.State snapshotState;
20 private final Optional<OutputStream> installSnapshotStream;
22 public CaptureSnapshotReply(final Snapshot.@NonNull State snapshotState,
23 final @NonNull Optional<OutputStream> installSnapshotStream) {
24 this.snapshotState = requireNonNull(snapshotState);
25 this.installSnapshotStream = requireNonNull(installSnapshotStream);
28 public Snapshot.@NonNull State getSnapshotState() {
32 public @NonNull Optional<OutputStream> getInstallSnapshotStream() {
33 return installSnapshotStream;