atomic-storage: remove type dependency at segment level I/O
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / base / messages / CaptureSnapshotReply.java
1 /*
2  * Copyright (c) 2014 Cisco 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.base.messages;
9
10 import static java.util.Objects.requireNonNull;
11
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;
17
18 public class CaptureSnapshotReply implements ControlMessage {
19     private final Snapshot.State snapshotState;
20     private final Optional<OutputStream> installSnapshotStream;
21
22     public CaptureSnapshotReply(final Snapshot.@NonNull State snapshotState,
23             final @NonNull Optional<OutputStream> installSnapshotStream) {
24         this.snapshotState = requireNonNull(snapshotState);
25         this.installSnapshotStream = requireNonNull(installSnapshotStream);
26     }
27
28     public Snapshot.@NonNull State getSnapshotState() {
29         return snapshotState;
30     }
31
32     public @NonNull Optional<OutputStream> getInstallSnapshotStream() {
33         return installSnapshotStream;
34     }
35 }