Class YearSecondTimestamp
- java.lang.Object
-
- org.epics.archiverappliance.common.YearSecondTimestamp
-
- All Implemented Interfaces:
Comparable<YearSecondTimestamp>
public class YearSecondTimestamp extends Object implements Comparable<YearSecondTimestamp>
This is a version of a timestamp that breaks down time into a short year, a signed int secondsintoyear and a signed int nanos This is the format that is used internally in the protocol buffers storage plugin. When storing files partitioned by years, the year is dropped from the event, saving two bytes of storage per event. When reconstructing such files, we determine the year from the file name and add it back in.- Author:
- mshankar
-
-
Constructor Summary
Constructors Constructor Description YearSecondTimestamp(short year, int secondsintoyear, int nanos)
-
Method Summary
Modifier and Type Method Description int
compareTo(YearSecondTimestamp other)
int
getNanos()
int
getSecondsintoyear()
short
getYear()
void
setNanos(int nanos)
void
setSecondsintoyear(int secondsintoyear)
void
setYear(byte year)
-
-
-
Method Detail
-
getYear
public short getYear()
-
setYear
public void setYear(byte year)
-
getSecondsintoyear
public int getSecondsintoyear()
-
setSecondsintoyear
public void setSecondsintoyear(int secondsintoyear)
-
getNanos
public int getNanos()
-
setNanos
public void setNanos(int nanos)
-
compareTo
public int compareTo(YearSecondTimestamp other)
- Specified by:
compareTo
in interfaceComparable<YearSecondTimestamp>
-
-