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 com.google.common.base.Preconditions;
11 import java.io.OutputStream;
12 import java.util.Optional;
13 import javax.annotation.Nonnull;
14 import org.opendaylight.controller.cluster.raft.persisted.Snapshot;
16 public class CaptureSnapshotReply {
17 private final Snapshot.State snapshotState;
18 private final Optional<OutputStream> installSnapshotStream;
20 public CaptureSnapshotReply(@Nonnull final Snapshot.State snapshotState,
21 @Nonnull final Optional<OutputStream> installSnapshotStream) {
22 this.snapshotState = Preconditions.checkNotNull(snapshotState);
23 this.installSnapshotStream = Preconditions.checkNotNull(installSnapshotStream);
27 public Snapshot.State getSnapshotState() {
32 public Optional<OutputStream> getInstallSnapshotStream() {
33 return installSnapshotStream;