Add SendInstallSnapshot javadoc
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / base / messages / SendInstallSnapshot.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
9 package org.opendaylight.controller.cluster.raft.base.messages;
10
11 import com.google.common.base.Preconditions;
12 import javax.annotation.Nonnull;
13 import org.opendaylight.controller.cluster.raft.Snapshot;
14
15 /**
16  * Internal message sent from the SnapshotManager to its associated leader. The leader is expected to apply the
17  * {@link Snapshot} to its state.
18  */
19 public final class SendInstallSnapshot {
20     private final Snapshot snapshot;
21
22     public SendInstallSnapshot(@Nonnull Snapshot snapshot) {
23         this.snapshot = Preconditions.checkNotNull(snapshot);
24     }
25
26     @Nonnull public Snapshot getSnapshot() {
27         return snapshot;
28     }
29 }