| Package | Description | 
|---|---|
| org.apache.cassandra.db.context | |
| org.apache.cassandra.utils | 
| Modifier and Type | Method and Description | 
|---|---|
| CounterId | CounterContext.ContextState. getCounterId() | 
| Modifier and Type | Method and Description | 
|---|---|
| java.nio.ByteBuffer | CounterContext. createGlobal(CounterId id,
            long clock,
            long count)Creates a counter context with a single global, 2.1+ shard (a result of increment). | 
| java.nio.ByteBuffer | CounterContext. createRemote(CounterId id,
            long clock,
            long count)Creates a counter context with a single remote shard. | 
| int | CounterContext. findPositionOf(java.nio.ByteBuffer context,
              CounterId id)Finds the position of a shard with the given id within the context (via binary search). | 
| ClockAndCount | CounterContext. getClockAndCountOf(java.nio.ByteBuffer context,
                  CounterId id)Returns the clock and the count associated with the given counter id, or (0, 0) if no such shard is present. | 
| void | CounterContext.ContextState. writeGlobal(CounterId id,
           long clock,
           long count) | 
| void | CounterContext.ContextState. writeLocal(CounterId id,
          long clock,
          long count) | 
| void | CounterContext.ContextState. writeRemote(CounterId id,
           long clock,
           long count) | 
| Modifier and Type | Method and Description | 
|---|---|
| static CounterId | CounterId. fromInt(int n)Pack an int in a valid CounterId so that the resulting ids respects the
 numerical ordering. | 
| static CounterId | CounterId. generate() | 
| static CounterId | CounterId. getLocalId() | 
| static CounterId | CounterId. wrap(java.nio.ByteBuffer id) | 
| static CounterId | CounterId. wrap(java.nio.ByteBuffer bb,
    int offset) | 
| Modifier and Type | Method and Description | 
|---|---|
| int | CounterId. compareTo(CounterId o) | 
Copyright © 2018 The Apache Software Foundation