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.remote.rpc.registry.gossip;
10 import java.io.Serializable;
12 public class BucketImpl<T extends Copier<T>> implements Bucket<T>, Serializable {
13 private static final long serialVersionUID = 294779770032719196L;
15 private Long version = System.currentTimeMillis();
22 public BucketImpl(T data) {
26 public BucketImpl(Bucket<T> other) {
27 this.version = other.getVersion();
28 this.data = other.getData();
31 public void setData(T data) {
33 this.version = System.currentTimeMillis()+1;
37 public Long getVersion() {
47 public String toString() {
48 return "BucketImpl{" +
49 "version=" + version +