Package fr.becpg.repo.audit.model
Record Class AuditPage
java.lang.Object
java.lang.Record
fr.becpg.repo.audit.model.AuditPage
- Record Components:
entries- the entries of the page, in the database ordernextStartAfterId- the entry identifier the next page starts after, null when the scan reached the end of the audit applicationscanInterrupted- true when the scan spent its window budget before filling the page
public record AuditPage(List<org.json.JSONObject> entries, Long nextStartAfterId, boolean scanInterrupted)
extends Record
AuditPage class.
One page of audit entries read by keyset paging, along with what a caller needs to carry the scan on where this page stopped.- Version:
- $Id: $Id
- Author:
- matthieu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<org.json.JSONObject> The field for theentriesrecord component.private final LongThe field for thenextStartAfterIdrecord component.private final booleanThe field for thescanInterruptedrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AuditPageempty()empty.List<org.json.JSONObject> entries()Returns the value of theentriesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thenextStartAfterIdrecord component.booleanReturns the value of thescanInterruptedrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
entries
The field for theentriesrecord component. -
nextStartAfterId
The field for thenextStartAfterIdrecord component. -
scanInterrupted
private final boolean scanInterruptedThe field for thescanInterruptedrecord component.
-
-
Constructor Details
-
AuditPage
Creates an instance of aAuditPagerecord class.- Parameters:
entries- the value for theentriesrecord componentnextStartAfterId- the value for thenextStartAfterIdrecord componentscanInterrupted- the value for thescanInterruptedrecord component
-
-
Method Details
-
empty
empty.
- Returns:
- a
AuditPageobject
-
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 '=='. -
entries
Returns the value of theentriesrecord component.- Returns:
- the value of the
entriesrecord component
-
nextStartAfterId
Returns the value of thenextStartAfterIdrecord component.- Returns:
- the value of the
nextStartAfterIdrecord component
-
scanInterrupted
public boolean scanInterrupted()Returns the value of thescanInterruptedrecord component.- Returns:
- the value of the
scanInterruptedrecord component
-