org.usergrid.persistence.cassandra
Class CounterUtils
java.lang.Object
org.usergrid.persistence.cassandra.CounterUtils
public class CounterUtils
- extends Object
Field Summary |
static me.prettyprint.cassandra.serializers.ByteBufferSerializer |
be
|
static me.prettyprint.cassandra.serializers.LongSerializer |
le
|
static org.slf4j.Logger |
logger
|
static me.prettyprint.cassandra.serializers.StringSerializer |
se
|
static me.prettyprint.cassandra.serializers.UUIDSerializer |
ue
|
Method Summary |
void |
addEventCounterMutations(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> m,
UUID applicationId,
Event event,
long timestamp)
|
void |
addMessageCounterMutations(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> m,
UUID applicationId,
UUID queueId,
Message msg,
long timestamp)
|
void |
batchIncrementAggregateCounters(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> m,
UUID applicationId,
UUID userId,
UUID groupId,
UUID queueId,
String category,
Map<String,Long> counters,
long timestamp)
|
void |
batchIncrementAggregateCounters(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> m,
UUID applicationId,
UUID userId,
UUID groupId,
UUID queueId,
String category,
String name,
long value,
long cassandraTimestamp)
|
void |
batchIncrementAggregateCounters(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> m,
UUID applicationId,
UUID userId,
UUID groupId,
UUID queueId,
String category,
String name,
long value,
long counterTimestamp,
long cassandraTimestamp)
|
me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> |
batchIncrementQueueCounter(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> m,
UUID queueId,
String name,
long value,
long timestamp,
UUID applicationId)
|
me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> |
batchIncrementQueueCounters(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> m,
Map<UUID,Map<String,Long>> values,
long timestamp,
UUID applicationId)
|
me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> |
batchIncrementQueueCounters(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> m,
UUID queueId,
Map<String,Long> values,
long timestamp,
UUID applicationId)
|
String |
getAggregateCounterRow(String name,
UUID userId,
UUID groupId,
UUID queueId,
String category,
CounterResolution resolution)
|
List<String> |
getAggregateCounterRows(List<CounterUtils.AggregateCounterSelection> selections,
CounterResolution resolution)
|
CounterUtils.AggregateCounterSelection |
getAggregateCounterSelection(String name,
UUID userId,
UUID groupId,
UUID queueId,
String category)
|
boolean |
getIsCounterBatched()
|
void |
setBatcher(Batcher batcher)
|
void |
setCounterType(String counterType)
Set the type to 'new' ("n"), 'parallel' ("p"), 'old' ("o" - the default)
If not one of the above, do nothing |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
public static final org.slf4j.Logger logger
le
public static final me.prettyprint.cassandra.serializers.LongSerializer le
se
public static final me.prettyprint.cassandra.serializers.StringSerializer se
be
public static final me.prettyprint.cassandra.serializers.ByteBufferSerializer be
ue
public static final me.prettyprint.cassandra.serializers.UUIDSerializer ue
CounterUtils
public CounterUtils()
setBatcher
public void setBatcher(Batcher batcher)
setCounterType
public void setCounterType(String counterType)
- Set the type to 'new' ("n"), 'parallel' ("p"), 'old' ("o" - the default)
If not one of the above, do nothing
- Parameters:
counterType
-
getIsCounterBatched
public boolean getIsCounterBatched()
addEventCounterMutations
public void addEventCounterMutations(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> m,
UUID applicationId,
Event event,
long timestamp)
addMessageCounterMutations
public void addMessageCounterMutations(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> m,
UUID applicationId,
UUID queueId,
Message msg,
long timestamp)
batchIncrementAggregateCounters
public void batchIncrementAggregateCounters(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> m,
UUID applicationId,
UUID userId,
UUID groupId,
UUID queueId,
String category,
Map<String,Long> counters,
long timestamp)
batchIncrementAggregateCounters
public void batchIncrementAggregateCounters(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> m,
UUID applicationId,
UUID userId,
UUID groupId,
UUID queueId,
String category,
String name,
long value,
long cassandraTimestamp)
batchIncrementAggregateCounters
public void batchIncrementAggregateCounters(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> m,
UUID applicationId,
UUID userId,
UUID groupId,
UUID queueId,
String category,
String name,
long value,
long counterTimestamp,
long cassandraTimestamp)
getAggregateCounterSelection
public CounterUtils.AggregateCounterSelection getAggregateCounterSelection(String name,
UUID userId,
UUID groupId,
UUID queueId,
String category)
getAggregateCounterRow
public String getAggregateCounterRow(String name,
UUID userId,
UUID groupId,
UUID queueId,
String category,
CounterResolution resolution)
getAggregateCounterRows
public List<String> getAggregateCounterRows(List<CounterUtils.AggregateCounterSelection> selections,
CounterResolution resolution)
batchIncrementQueueCounter
public me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batchIncrementQueueCounter(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> m,
UUID queueId,
String name,
long value,
long timestamp,
UUID applicationId)
batchIncrementQueueCounters
public me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batchIncrementQueueCounters(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> m,
UUID queueId,
Map<String,Long> values,
long timestamp,
UUID applicationId)
batchIncrementQueueCounters
public me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batchIncrementQueueCounters(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> m,
Map<UUID,Map<String,Long>> values,
long timestamp,
UUID applicationId)
Copyright © 2013. All Rights Reserved.