public abstract class Statistic<V extends StatisticValue<?>> extends Object implements Persistable
Modifier and Type | Field and Description |
---|---|
protected StatisticId<V> |
cachedStatisticId |
static String |
DEFAULT_TAG
Statistics that are not explicitly tagged and do not have a binning strategy will use this tag.
|
static String |
INTERNAL_TAG
Statistics that are used by internal GeoWave systems use this tag.
|
Constructor and Description |
---|
Statistic(StatisticType<V> statisticType) |
Modifier and Type | Method and Description |
---|---|
protected int |
byteLength() |
abstract V |
createEmpty()
Create a new value for this statistic, initialized to a base state (no entries ingested).
|
void |
fromBinary(byte[] bytes)
Convert a stream of binary bytes to fields and data within an object.
|
StatisticBinningStrategy |
getBinningStrategy()
Returns the binning strategy used by the statistic.
|
abstract String |
getDescription()
Get a human-readable description of this statistic.
|
abstract StatisticId<V> |
getId()
Return the unique identifier for the statistic.
|
StatisticType<V> |
getStatisticType()
Get the statistic type associated with the statistic.
|
String |
getTag()
Get the tag for the statistic.
|
abstract boolean |
isCompatibleWith(Class<?> clazz)
Determine if the statistic is compatible with the given class.
|
boolean |
isInternal() |
protected void |
readBytes(ByteBuffer buffer) |
void |
setBinningStrategy(StatisticBinningStrategy binningStrategy) |
void |
setInternal() |
void |
setTag(String tag) |
byte[] |
toBinary()
Convert fields and data within an object to binary form for transmission or storage.
|
protected void |
writeBytes(ByteBuffer buffer) |
public static final String INTERNAL_TAG
public static final String DEFAULT_TAG
protected StatisticId<V extends StatisticValue<?>> cachedStatisticId
public Statistic(StatisticType<V> statisticType)
public abstract String getDescription()
public abstract V createEmpty()
public boolean isInternal()
true
if the statistic is an internal statisticpublic abstract boolean isCompatibleWith(Class<?> clazz)
clazz
- the class to checktrue
if the statistic is compatiblepublic abstract StatisticId<V> getId()
public void setTag(String tag)
public void setInternal()
public final String getTag()
public void setBinningStrategy(StatisticBinningStrategy binningStrategy)
public StatisticBinningStrategy getBinningStrategy()
null
if there is nonepublic final StatisticType<V> getStatisticType()
protected int byteLength()
protected void writeBytes(ByteBuffer buffer)
protected void readBytes(ByteBuffer buffer)
public final byte[] toBinary()
Persistable
toBinary
in interface Persistable
public final void fromBinary(byte[] bytes)
Persistable
fromBinary
in interface Persistable
Copyright © 2013–2022. All rights reserved.