Package org.graalvm.collections
Class LockFreePrefixTree.Node
java.lang.Object
java.lang.Number
java.util.concurrent.atomic.AtomicLong
org.graalvm.collections.LockFreePrefixTree.Node
- All Implemented Interfaces:
Serializable
- Enclosing class:
LockFreePrefixTree
- Since:
- 22.3
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionat
(LockFreePrefixTree.Allocator allocator, long childKey) Get existing (or create if missing) child with the given key.long
bitwiseOrValue
(long pattern) Atomically does the bitwise-or on the current value.long
incValue()
Increment value.void
setValue
(long value) Set the value for theLockFreePrefixTree.Node
.toString()
long
value()
Methods inherited from class java.util.concurrent.atomic.AtomicLong
accumulateAndGet, addAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, decrementAndGet, doubleValue, floatValue, get, getAcquire, getAndAccumulate, getAndAdd, getAndDecrement, getAndIncrement, getAndSet, getAndUpdate, getOpaque, getPlain, incrementAndGet, intValue, lazySet, longValue, set, setOpaque, setPlain, setRelease, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
Methods inherited from class java.lang.Number
byteValue, shortValue
-
Method Details
-
value
public long value()- Returns:
- The value of the
LockFreePrefixTree.Node
- Since:
- 22.3
-
setValue
public void setValue(long value) Set the value for theLockFreePrefixTree.Node
.- Parameters:
value
- the new value.- Since:
- 22.3
-
incValue
public long incValue()Increment value.- Returns:
- newly incremented value of the
LockFreePrefixTree.Node
. - Since:
- 22.3
-
bitwiseOrValue
public long bitwiseOrValue(long pattern) Atomically does the bitwise-or on the current value.- Parameters:
pattern
- a bit pattern to do bitwise-or with- Returns:
- the value immediately after the bitwise-or operation
- Since:
- 23.0
-
at
Get existing (or create if missing) child with the given key. May returnnull
if the operation cannot complete, for example, due to inability to allocate nodes.- Parameters:
childKey
- the key of the child.- Returns:
- The child with the given childKey, or
null
if cannot complete. - Since:
- 22.3
-
toString
- Overrides:
toString
in classAtomicLong
- Since:
- 22.3
-