public class RollingCounterDataPoint extends DataPoint
Modifier and Type | Class and Description |
---|---|
protected static class |
RollingCounterDataPoint.RollingCounterIndices
Indices used for storing
RollingCounterDataPoint contents in a
file. |
DataPoint.Indices
ENCODING_CHAR_SET
Constructor and Description |
---|
RollingCounterDataPoint(InputStream is)
Constructs a
RollingCounterDataPoint from the specified stream
contents. |
RollingCounterDataPoint(long lastUpdatedTimeStamp,
long msSpanned,
long delta)
Constructs a
RollingCounterDataPoint using the specified values. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object toCompare) |
long |
getDelta()
Gets the delta value.
|
int |
getExpectedFieldCount()
Gets the expected CSV field count for the data type.
|
int |
hashCode() |
protected String[] |
prepareArrayFieldsForWriting(String[] fields)
Prepares the provided
String array with values to be written for
this DataPoint . |
void |
set(String[] fields)
Reads the
DataPoint contents from the specified String
array. |
void |
setDelta(long toSet)
Sets the delta value.
|
String |
toDebugString()
Gets a detailed representation of this object to facilitate debugging.
|
String |
toString() |
getLastUpdatedTimeStamp, getMsSpanned, read, setLastUpdatedTimeStamp, setMsSpanned, write
public RollingCounterDataPoint(long lastUpdatedTimeStamp, long msSpanned, long delta)
RollingCounterDataPoint
using the specified values.lastUpdatedTimeStamp
- last updated time stampmsSpanned
- milliseconds spanneddelta
- delta valuepublic RollingCounterDataPoint(InputStream is) throws DataFormatException, IOException
RollingCounterDataPoint
from the specified stream
contents.is
- InputStream
to read fromDataFormatException
- if the expected content cannot be readIOException
- if an error occurs while reading from the streampublic long getDelta()
public int getExpectedFieldCount()
DataPoint
getExpectedFieldCount
in class DataPoint
protected String[] prepareArrayFieldsForWriting(String[] fields)
DataPoint
String
array with values to be written for
this DataPoint
.prepareArrayFieldsForWriting
in class DataPoint
fields
- a String
array that will be set with the field
values, in order, to be writtenpublic void set(String[] fields) throws DataFormatException
DataPoint
DataPoint
contents from the specified String
array.set
in class DataPoint
fields
- String
array to read fromDataFormatException
- if the expected file content cannot be readpublic void setDelta(long toSet)
toSet
- delta valuepublic String toDebugString()
DataPoint
toDebugString
in class DataPoint
Copyright © 2015. All Rights Reserved.