Record Class EntityMetadata.SnapshotSettings
java.lang.Object
java.lang.Record
io.fluxzero.sdk.modeling.EntityMetadata.SnapshotSettings
- Enclosing class:
EntityMetadata
Shared immutable snapshot trigger and retention settings for Aggregate and Model roots.
-
Constructor Summary
ConstructorsConstructorDescriptionSnapshotSettings(int period, int maxCount) Creates an instance of aSnapshotSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleandue(long sequenceNumber, int storedEventCount) booleanenabled()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intmaxCount()Returns the value of themaxCountrecord component.intperiod()Returns the value of theperiodrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SnapshotSettings
public SnapshotSettings(int period, int maxCount) Creates an instance of aSnapshotSettingsrecord class.- Parameters:
period- the value for theperiodrecord componentmaxCount- the value for themaxCountrecord component
-
-
Method Details
-
enabled
public boolean enabled() -
due
public boolean due(long sequenceNumber, int storedEventCount) -
toString
-
hashCode
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
period
public int period()Returns the value of theperiodrecord component.- Returns:
- the value of the
periodrecord component
-
maxCount
public int maxCount()Returns the value of themaxCountrecord component.- Returns:
- the value of the
maxCountrecord component
-