Record Class DurableLogConfig
java.lang.Object
java.lang.Record
org.j7m.middleware.durablelog.DurableLogConfig
- Record Components:
directory- log directory owned by the durable logmaxSegmentBytes- maximum segment file size before rotationmaxPayloadBytes- maximum payload size accepted for one recordmaxRecordsPerAppend- maximum records accepted in one append callmaxOpenCursors- maximum concurrently open cursorsfsyncPolicy- durability sync policygroupCommitPolicy- group commit batching policyintegrityPolicy- frame integrity policyretentionPolicy- segment retention policyclock- timestamp source
public record DurableLogConfig(Path directory, long maxSegmentBytes, long maxPayloadBytes, int maxRecordsPerAppend, int maxOpenCursors, org.j7m.middleware.api.durablelog.FsyncPolicy fsyncPolicy, org.j7m.middleware.api.durablelog.GroupCommitPolicy groupCommitPolicy, org.j7m.middleware.api.durablelog.LogIntegrityPolicy integrityPolicy, org.j7m.middleware.api.durablelog.RetentionPolicy retentionPolicy, Clock clock)
extends Record
Immutable file durable-log configuration.
-
Constructor Summary
ConstructorsConstructorDescriptionDurableLogConfig(Path directory, long maxSegmentBytes, long maxPayloadBytes, int maxRecordsPerAppend, int maxOpenCursors, org.j7m.middleware.api.durablelog.FsyncPolicy fsyncPolicy, org.j7m.middleware.api.durablelog.GroupCommitPolicy groupCommitPolicy, org.j7m.middleware.api.durablelog.LogIntegrityPolicy integrityPolicy, org.j7m.middleware.api.durablelog.RetentionPolicy retentionPolicy, Clock clock) Creates validated configuration. -
Method Summary
Modifier and TypeMethodDescriptionclock()Returns the value of theclockrecord component.static DurableLogConfigCreates default configuration for a directory.Returns the value of thedirectoryrecord component.final booleanIndicates whether some other object is "equal to" this one.org.j7m.middleware.api.durablelog.FsyncPolicyReturns the value of thefsyncPolicyrecord component.org.j7m.middleware.api.durablelog.GroupCommitPolicyReturns the value of thegroupCommitPolicyrecord component.final inthashCode()Returns a hash code value for this object.org.j7m.middleware.api.durablelog.LogIntegrityPolicyReturns the value of theintegrityPolicyrecord component.intReturns the value of themaxOpenCursorsrecord component.longReturns the value of themaxPayloadBytesrecord component.intReturns the value of themaxRecordsPerAppendrecord component.longReturns the value of themaxSegmentBytesrecord component.org.j7m.middleware.api.durablelog.RetentionPolicyReturns the value of theretentionPolicyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DurableLogConfig
public DurableLogConfig(Path directory, long maxSegmentBytes, long maxPayloadBytes, int maxRecordsPerAppend, int maxOpenCursors, org.j7m.middleware.api.durablelog.FsyncPolicy fsyncPolicy, org.j7m.middleware.api.durablelog.GroupCommitPolicy groupCommitPolicy, org.j7m.middleware.api.durablelog.LogIntegrityPolicy integrityPolicy, org.j7m.middleware.api.durablelog.RetentionPolicy retentionPolicy, Clock clock) Creates validated configuration.
-
-
Method Details
-
defaults
Creates default configuration for a directory.- Parameters:
directory- log directory- Returns:
- default durable-log configuration
-
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. -
directory
-
maxSegmentBytes
public long maxSegmentBytes()Returns the value of themaxSegmentBytesrecord component.- Returns:
- the value of the
maxSegmentBytesrecord component
-
maxPayloadBytes
public long maxPayloadBytes()Returns the value of themaxPayloadBytesrecord component.- Returns:
- the value of the
maxPayloadBytesrecord component
-
maxRecordsPerAppend
public int maxRecordsPerAppend()Returns the value of themaxRecordsPerAppendrecord component.- Returns:
- the value of the
maxRecordsPerAppendrecord component
-
maxOpenCursors
public int maxOpenCursors()Returns the value of themaxOpenCursorsrecord component.- Returns:
- the value of the
maxOpenCursorsrecord component
-
fsyncPolicy
public org.j7m.middleware.api.durablelog.FsyncPolicy fsyncPolicy()Returns the value of thefsyncPolicyrecord component.- Returns:
- the value of the
fsyncPolicyrecord component
-
groupCommitPolicy
public org.j7m.middleware.api.durablelog.GroupCommitPolicy groupCommitPolicy()Returns the value of thegroupCommitPolicyrecord component.- Returns:
- the value of the
groupCommitPolicyrecord component
-
integrityPolicy
public org.j7m.middleware.api.durablelog.LogIntegrityPolicy integrityPolicy()Returns the value of theintegrityPolicyrecord component.- Returns:
- the value of the
integrityPolicyrecord component
-
retentionPolicy
public org.j7m.middleware.api.durablelog.RetentionPolicy retentionPolicy()Returns the value of theretentionPolicyrecord component.- Returns:
- the value of the
retentionPolicyrecord component
-
clock
-