public abstract class DataPoint extends Object
write(long time, IChunkWriter
writer) .Every subclass has its data type and overrides a setting method for its data type.| Modifier and Type | Field and Description |
|---|---|
protected String |
measurementId
measurementId of this DataPoint.
|
protected TSDataType |
type
value type of this DataPoint.
|
| Constructor and Description |
|---|
DataPoint(TSDataType type,
String measurementId)
constructor of DataPoint.
|
| Modifier and Type | Method and Description |
|---|---|
static DataPoint |
getDataPoint(TSDataType dataType,
String measurementId,
String value)
Construct one data point with data type and value.
|
String |
getMeasurementId() |
TSDataType |
getType() |
abstract Object |
getValue() |
void |
setBoolean(boolean value) |
void |
setDouble(double value) |
void |
setFloat(float value) |
void |
setInteger(int value) |
void |
setLong(long value) |
void |
setString(Binary value) |
String |
toString() |
abstract void |
writeTo(long time,
ChunkWriterImpl writer)
write this DataPoint by a SeriesWriter.
|
protected final TSDataType type
protected final String measurementId
public DataPoint(TSDataType type, String measurementId)
type - value type of this DataPointmeasurementId - measurementId of this DataPointpublic static DataPoint getDataPoint(TSDataType dataType, String measurementId, String value)
dataType - data typemeasurementId - measurement idvalue - value in string formatpublic abstract void writeTo(long time,
ChunkWriterImpl writer)
throws IOException
time - timestampwriter - writerIOException - exception in IOpublic String getMeasurementId()
public abstract Object getValue()
public TSDataType getType()
public void setInteger(int value)
public void setLong(long value)
public void setBoolean(boolean value)
public void setFloat(float value)
public void setDouble(double value)
public void setString(Binary value)
Copyright © 2022 The Apache Software Foundation. All rights reserved.