Record Class LogStatus
java.lang.Object
java.lang.Record
org.j7m.middleware.api.durablelog.LogStatus
- Record Components:
logDirectory- redacted log directory summaryopen- whether the log is openstreamCount- number of streamssegmentCount- number of segment filesactiveSegment- redacted active segment summarycurrentOffsets- current offset by streammetrics- metrics snapshotfsyncPolicy- configured fsync policyretentionPolicy- configured retention policylastError- redacted last error
- All Implemented Interfaces:
Serializable
public record LogStatus(String logDirectory, boolean open, int streamCount, int segmentCount, String activeSegment, Map<LogStreamId, LogOffset> currentOffsets, LogMetricsSnapshot metrics, FsyncPolicy fsyncPolicy, RetentionPolicy retentionPolicy, String lastError)
extends Record
implements Serializable
Durable-log status snapshot.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLogStatus(String logDirectory, boolean open, int streamCount, int segmentCount, String activeSegment, Map<LogStreamId, LogOffset> currentOffsets, LogMetricsSnapshot metrics, FsyncPolicy fsyncPolicy, RetentionPolicy retentionPolicy, String lastError) Creates status. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactiveSegmentrecord component.Returns the value of thecurrentOffsetsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefsyncPolicyrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thelastErrorrecord component.Returns the value of thelogDirectoryrecord component.metrics()Returns the value of themetricsrecord component.booleanopen()Returns the value of theopenrecord component.Returns the value of theretentionPolicyrecord component.intReturns the value of thesegmentCountrecord component.intReturns the value of thestreamCountrecord component.streams()Returns stream statuses.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LogStatus
public LogStatus(String logDirectory, boolean open, int streamCount, int segmentCount, String activeSegment, Map<LogStreamId, LogOffset> currentOffsets, LogMetricsSnapshot metrics, FsyncPolicy fsyncPolicy, RetentionPolicy retentionPolicy, String lastError) Creates status.
-
-
Method Details
-
streams
Returns stream statuses.- Returns:
- immutable stream status list
-
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. -
logDirectory
Returns the value of thelogDirectoryrecord component.- Returns:
- the value of the
logDirectoryrecord component
-
open
-
streamCount
public int streamCount()Returns the value of thestreamCountrecord component.- Returns:
- the value of the
streamCountrecord component
-
segmentCount
public int segmentCount()Returns the value of thesegmentCountrecord component.- Returns:
- the value of the
segmentCountrecord component
-
activeSegment
Returns the value of theactiveSegmentrecord component.- Returns:
- the value of the
activeSegmentrecord component
-
currentOffsets
Returns the value of thecurrentOffsetsrecord component.- Returns:
- the value of the
currentOffsetsrecord component
-
metrics
-
fsyncPolicy
Returns the value of thefsyncPolicyrecord component.- Returns:
- the value of the
fsyncPolicyrecord component
-
retentionPolicy
Returns the value of theretentionPolicyrecord component.- Returns:
- the value of the
retentionPolicyrecord component
-
lastError
-