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 edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
12 public class CaptureSnapshotReply {
13 private final byte [] snapshot;
15 @SuppressFBWarnings(value = "EI_EXPOSE_REP2", justification = "Stores a reference to an externally mutable byte[] "
16 + "object but this is OK since this class is merely a DTO and does not process byte[] internally. "
17 + "Also it would be inefficient to create a copy as the byte[] could be large.")
18 public CaptureSnapshotReply(byte [] snapshot) {
19 this.snapshot = snapshot;
22 @SuppressFBWarnings(value = "EI_EXPOSE_REP", justification = "Exposes a mutable object stored in a field but "
23 + "this is OK since this class is merely a DTO and does not process the byte[] internally. "
24 + "Also it would be inefficient to create a return copy as the byte[] could be large.")
25 public byte [] getSnapshot() {