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
9 package org.opendaylight.controller.cluster.raft.base.messages;
11 import com.google.common.base.Preconditions;
12 import com.google.common.io.ByteSource;
13 import javax.annotation.Nonnull;
14 import org.opendaylight.controller.cluster.raft.persisted.Snapshot;
17 * Internal message sent from the SnapshotManager to its associated leader when a snapshot capture is complete to
18 * prompt the leader to install the snapshot on its followers as needed.
20 public final class SendInstallSnapshot {
21 private final Snapshot snapshot;
22 private final ByteSource snapshotBytes;
24 public SendInstallSnapshot(@Nonnull Snapshot snapshot, @Nonnull ByteSource snapshotBytes) {
25 this.snapshot = Preconditions.checkNotNull(snapshot);
26 this.snapshotBytes = Preconditions.checkNotNull(snapshotBytes);
30 public Snapshot getSnapshot() {
34 public ByteSource getSnapshotBytes() {