Debian Codegraph @

src/main/org/h2/mvstore/tx/VersionedBitSet.java

raw
1 /*
2 * Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0,
3 * and the EPL 1.0 (https://h2database.com/html/license.html).
4 * Initial Developer: H2 Group
5 */
6 package org.h2.mvstore.tx;
7
8 import java.util.BitSet;
9
10 /**
11 * Class VersionedBitSet extends standard BitSet to add a version field.
12 * This will allow bit set and version to be changed atomically.
13 */
14 final class VersionedBitSet extends BitSet {
15 private static final long serialVersionUID = 1L;
16
17 private long version;
18
19 public VersionedBitSet() {}
20
21 public long getVersion() {
22 return version;
23 }
24
25 public void setVersion(long version) {
26 this.version = version;
27 }
28
29 @Override
30 public VersionedBitSet clone() {
31 return (VersionedBitSet)super.clone();
32 }
33 }