Package me.ahoo.cosid.stat.generator
Record Class SegmentIdStat
java.lang.Object
java.lang.Record
me.ahoo.cosid.stat.generator.SegmentIdStat
- All Implemented Interfaces:
IdGeneratorStat
,Stat
public record SegmentIdStat(String kind, long fetchTime, long maxId, long offset, long sequence, long step, boolean isExpired, boolean isOverflow, boolean isAvailable, GroupedKey groupedKey, Stat converter)
extends Record
implements IdGeneratorStat
-
Constructor Summary
ConstructorDescriptionSegmentIdStat
(String kind, long fetchTime, long maxId, long offset, long sequence, long step, boolean isExpired, boolean isOverflow, boolean isAvailable, GroupedKey groupedKey, Stat converter) Creates an instance of aSegmentIdStat
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconverter
record component.final boolean
Indicates whether some other object is "equal to" this one.long
Returns the value of thefetchTime
record component.Returns the value of thegroupedKey
record component.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theisAvailable
record component.boolean
Returns the value of theisExpired
record component.boolean
Returns the value of theisOverflow
record component.kind()
Returns the value of thekind
record component.long
maxId()
Returns the value of themaxId
record component.long
offset()
Returns the value of theoffset
record component.long
sequence()
Returns the value of thesequence
record component.long
step()
Returns the value of thestep
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface me.ahoo.cosid.stat.generator.IdGeneratorStat
actual
-
Constructor Details
-
SegmentIdStat
public SegmentIdStat(String kind, long fetchTime, long maxId, long offset, long sequence, long step, boolean isExpired, boolean isOverflow, boolean isAvailable, GroupedKey groupedKey, Stat converter) Creates an instance of aSegmentIdStat
record class.- Parameters:
kind
- the value for thekind
record componentfetchTime
- the value for thefetchTime
record componentmaxId
- the value for themaxId
record componentoffset
- the value for theoffset
record componentsequence
- the value for thesequence
record componentstep
- the value for thestep
record componentisExpired
- the value for theisExpired
record componentisOverflow
- the value for theisOverflow
record componentisAvailable
- the value for theisAvailable
record componentgroupedKey
- the value for thegroupedKey
record componentconverter
- the value for theconverter
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
kind
Returns the value of thekind
record component. -
fetchTime
public long fetchTime()Returns the value of thefetchTime
record component.- Returns:
- the value of the
fetchTime
record component
-
maxId
public long maxId()Returns the value of themaxId
record component.- Returns:
- the value of the
maxId
record component
-
offset
public long offset()Returns the value of theoffset
record component.- Returns:
- the value of the
offset
record component
-
sequence
public long sequence()Returns the value of thesequence
record component.- Returns:
- the value of the
sequence
record component
-
step
public long step()Returns the value of thestep
record component.- Returns:
- the value of the
step
record component
-
isExpired
public boolean isExpired()Returns the value of theisExpired
record component.- Returns:
- the value of the
isExpired
record component
-
isOverflow
public boolean isOverflow()Returns the value of theisOverflow
record component.- Returns:
- the value of the
isOverflow
record component
-
isAvailable
public boolean isAvailable()Returns the value of theisAvailable
record component.- Returns:
- the value of the
isAvailable
record component
-
groupedKey
Returns the value of thegroupedKey
record component.- Returns:
- the value of the
groupedKey
record component
-
converter
Returns the value of theconverter
record component.- Specified by:
converter
in interfaceIdGeneratorStat
- Returns:
- the value of the
converter
record component
-