Package com.tnsai.context.snapshot
Record Class SnapshotStore.SnapshotStoreStatistics
java.lang.Object
java.lang.Record
com.tnsai.context.snapshot.SnapshotStore.SnapshotStoreStatistics
- Enclosing interface:
SnapshotStore
public static record SnapshotStore.SnapshotStoreStatistics(int totalSnapshots, int uniqueAgents, Instant oldestSnapshot, Instant newestSnapshot, Map<SnapshotTrigger,Integer> snapshotsByTrigger)
extends Record
Statistics about the snapshot store.
-
Constructor Summary
ConstructorsConstructorDescriptionSnapshotStoreStatistics(int totalSnapshots, int uniqueAgents, Instant oldestSnapshot, Instant newestSnapshot, Map<SnapshotTrigger, Integer> snapshotsByTrigger) Creates an instance of aSnapshotStoreStatisticsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thenewestSnapshotrecord component.Returns the value of theoldestSnapshotrecord component.Returns the value of thesnapshotsByTriggerrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalSnapshotsrecord component.intReturns the value of theuniqueAgentsrecord component.
-
Constructor Details
-
SnapshotStoreStatistics
public SnapshotStoreStatistics(int totalSnapshots, int uniqueAgents, Instant oldestSnapshot, Instant newestSnapshot, Map<SnapshotTrigger, Integer> snapshotsByTrigger) Creates an instance of aSnapshotStoreStatisticsrecord class.- Parameters:
totalSnapshots- the value for thetotalSnapshotsrecord componentuniqueAgents- the value for theuniqueAgentsrecord componentoldestSnapshot- the value for theoldestSnapshotrecord componentnewestSnapshot- the value for thenewestSnapshotrecord componentsnapshotsByTrigger- the value for thesnapshotsByTriggerrecord 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 '=='. -
totalSnapshots
public int totalSnapshots()Returns the value of thetotalSnapshotsrecord component.- Returns:
- the value of the
totalSnapshotsrecord component
-
uniqueAgents
public int uniqueAgents()Returns the value of theuniqueAgentsrecord component.- Returns:
- the value of the
uniqueAgentsrecord component
-
oldestSnapshot
Returns the value of theoldestSnapshotrecord component.- Returns:
- the value of the
oldestSnapshotrecord component
-
newestSnapshot
Returns the value of thenewestSnapshotrecord component.- Returns:
- the value of the
newestSnapshotrecord component
-
snapshotsByTrigger
Returns the value of thesnapshotsByTriggerrecord component.- Returns:
- the value of the
snapshotsByTriggerrecord component
-