MCPcopy Index your code
hub / github.com/questdb/questdb / AbstractSequence

Class AbstractSequence

core/src/main/java/io/questdb/mp/AbstractSequence.java:29–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27import io.questdb.std.Unsafe;
28
29public abstract class AbstractSequence extends RhsPadding {
30 private static final long CACHE_OFFSET = Unsafe.getFieldOffset(Value.class, "cache");
31 private static final long VALUE_OFFSET = Unsafe.getFieldOffset(Value.class, "value");
32
33 public AbstractSequence(WaitStrategy waitStrategy) {
34 super(waitStrategy);
35 }
36
37 protected boolean casValue(long expected, long value) {
38 return Unsafe.cas(this, VALUE_OFFSET, expected, value);
39 }
40
41 protected long getValue() {
42 return Unsafe.getLong(this, VALUE_OFFSET);
43 }
44
45 protected void setCacheFenced(long cache) {
46 Unsafe.putOrderedLong(this, CACHE_OFFSET, cache);
47 }
48}
49
50@SuppressWarnings("unused")
51class LhsPadding {

Callers

nothing calls this directly

Calls 1

getFieldOffsetMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…