public static final class SeqLockPrefixTree.Node extends AtomicLong
Modifier and Type | Method and Description |
---|---|
SeqLockPrefixTree.Node |
at(long key)
Get existing (or create if missing) child with the given key.
|
long |
incValue()
Increment value.
|
long |
seqlockValue() |
void |
setValue(long value)
Set the value for the
LockFreePrefixTree.Node . |
<C> void |
topDown(C currentContext,
BiFunction<C,Long,C> createContext,
BiConsumer<C,Long> consumeValue)
Traverse the tree top-down while maintaining a context.
|
String |
toString() |
long |
value() |
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, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
byteValue, shortValue
public long value()
LockFreePrefixTree.Node
public long incValue()
LockFreePrefixTree.Node
.public void setValue(long value)
LockFreePrefixTree.Node
.value
- the new value.public SeqLockPrefixTree.Node at(long key)
key
- the key of the child.public long seqlockValue()
public <C> void topDown(C currentContext, BiFunction<C,Long,C> createContext, BiConsumer<C,Long> consumeValue)
C
- The type of the contextcurrentContext
- The context for the root of the treecreateContext
- A function defining how the context for children is createdconsumeValue
- A function that consumes the nodes valuepublic String toString()
toString
in class AtomicLong