2 * Copyright (c) 2016 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.datastore.persisted;
10 import com.google.common.base.MoreObjects;
11 import com.google.common.collect.ImmutableList;
12 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
13 import java.io.Externalizable;
14 import java.util.Collection;
15 import java.util.List;
17 public final class FrontendShardDataTreeSnapshotMetadata
18 extends ShardDataTreeSnapshotMetadata<FrontendShardDataTreeSnapshotMetadata> {
20 private static final long serialVersionUID = 1L;
22 @SuppressFBWarnings(value = "SE_BAD_FIELD", justification = "This field is not Serializable but this class "
23 + "implements writeReplace to delegate serialization to a Proxy class and thus instances of this class "
24 + "aren't serialized. FindBugs does not recognize this.")
25 private final List<FrontendClientMetadata> clients;
27 public FrontendShardDataTreeSnapshotMetadata(final Collection<FrontendClientMetadata> clients) {
28 this.clients = ImmutableList.copyOf(clients);
31 public List<FrontendClientMetadata> getClients() {
36 protected Externalizable externalizableProxy() {
41 public Class<FrontendShardDataTreeSnapshotMetadata> getType() {
42 return FrontendShardDataTreeSnapshotMetadata.class;
46 public String toString() {
47 return MoreObjects.toStringHelper(FrontendShardDataTreeSnapshotMetadata.class)
48 .add("clients", clients)