Class YearSecondTimestamp
java.lang.Object
org.epics.archiverappliance.common.YearSecondTimestamp
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(YearSecondTimestamp other) booleanintgetNano()intshortgetYear()inthashCode()voidsetNanos(int nanos) voidsetSecondsintoyear(int secondsintoyear) voidsetYear(short year) toString()
-
Constructor Details
-
YearSecondTimestamp
public YearSecondTimestamp(short year, int secondsintoyear, int nanos)
-
-
Method Details
-
getYear
public short getYear() -
setYear
public void setYear(short year) -
getSecondsintoyear
public int getSecondsintoyear() -
setSecondsintoyear
public void setSecondsintoyear(int secondsintoyear) -
getNano
public int getNano() -
equals
-
hashCode
public int hashCode() -
setNanos
public void setNanos(int nanos) -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<YearSecondTimestamp>
-