Record Class GroupCommitPolicy
java.lang.Object
java.lang.Record
org.j7m.middleware.api.durablelog.GroupCommitPolicy
- Record Components:
maxAppends- maximum appends before forcing a commitmaxDelay- maximum delay allowed before forcing pending appends;Duration.ZEROmeans count-triggered group commit only
- All Implemented Interfaces:
Serializable
public record GroupCommitPolicy(int maxAppends, Duration maxDelay)
extends Record
implements Serializable
Baseline group commit policy.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GroupCommitPolicydefaults()Default deterministic batch policy.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxAppendsrecord component.maxDelay()Returns the value of themaxDelayrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GroupCommitPolicy
Creates policy.
-
-
Method Details
-
defaults
Default deterministic batch policy.- Returns:
- default group commit policy
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
maxAppends
public int maxAppends()Returns the value of themaxAppendsrecord component.- Returns:
- the value of the
maxAppendsrecord component
-
maxDelay
-