public static class BTree.PartitionedCounter extends Object implements ICounter
BTree
is found in the low
int32 word.Constructor and Description |
---|
BTree.PartitionedCounter(int partitionId,
ICounter src) |
Modifier and Type | Method and Description |
---|---|
static long |
combine(int pid,
int ctr)
Combines the partition identifier and the local counter using the same
logic as the
BTree.PartitionedCounter . |
long |
get()
The current value of the counter (initially zero).
|
static int |
getLocalCounter(long v)
Return the local counter from the low word of a partitioned counter.
|
static int |
getPartitionId(long v)
Return the partition identifier from the high word of a partitioned
counter.
|
long |
incrementAndGet()
Increment the current value of the counter and then return its value
(atomic).
|
public BTree.PartitionedCounter(int partitionId, ICounter src)
public long get()
ICounter
public long incrementAndGet()
ICounter
incrementAndGet
in interface ICounter
public static int getPartitionId(long v)
v
- The partitioned counter.public static int getLocalCounter(long v)
v
- The partitioned counter.public static long combine(int pid, int ctr)
BTree.PartitionedCounter
.pid
- The partition identifier.ctr
- The local counter.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.