- public BucketImpl() {
- }
-
- public BucketImpl(T data) {
- this.data = data;
- }
-
- public BucketImpl(Bucket<T> other) {
- this.version = other.getVersion();
- this.data = other.getData();
- }
-
- public void setData(T data) {
- this.data = data;
- this.version = System.currentTimeMillis() + 1;
+ BucketImpl(final long version, final T data) {
+ this.version = version;
+ this.data = Preconditions.checkNotNull(data);