public static class CounterContext.ContextState
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.nio.ByteBuffer |
context |
int |
headerLength |
Modifier and Type | Method and Description |
---|---|
static CounterContext.ContextState |
allocate(int globalCount,
int localCount,
int remoteCount,
Allocator allocator)
Allocate a new context big enough for globalCount + localCount + remoteCount elements
and return the initial corresponding ContextState.
|
int |
compareIdTo(CounterContext.ContextState other) |
void |
copyTo(CounterContext.ContextState other) |
long |
getClock() |
long |
getCount() |
CounterId |
getCounterId() |
int |
getElementIndex() |
boolean |
hasRemaining() |
boolean |
isGlobal() |
boolean |
isLocal() |
boolean |
isRemote() |
void |
moveToNext() |
void |
reset() |
static CounterContext.ContextState |
wrap(java.nio.ByteBuffer context) |
void |
writeGlobal(CounterId id,
long clock,
long count) |
void |
writeLocal(CounterId id,
long clock,
long count) |
void |
writeRemote(CounterId id,
long clock,
long count) |
public final java.nio.ByteBuffer context
public final int headerLength
public static CounterContext.ContextState wrap(java.nio.ByteBuffer context)
public static CounterContext.ContextState allocate(int globalCount, int localCount, int remoteCount, Allocator allocator)
public boolean isGlobal()
public boolean isLocal()
public boolean isRemote()
public boolean hasRemaining()
public void moveToNext()
public void copyTo(CounterContext.ContextState other)
public int compareIdTo(CounterContext.ContextState other)
public void reset()
public int getElementIndex()
public CounterId getCounterId()
public long getClock()
public long getCount()
public void writeGlobal(CounterId id, long clock, long count)
public void writeLocal(CounterId id, long clock, long count)
public void writeRemote(CounterId id, long clock, long count)
Copyright © 2015 The Apache Software Foundation