Record Class ScanResult
java.lang.Object
java.lang.Record
com.loomcache.common.protocol.ScanResult
- Record Components:
cursor- the position for the next scan (0 = scan is complete)keys- the list of keys matched in this scan iteration
Result of a cursor-based scan operation on a data structure (Map, Set).
Implements Redis-like cursor iteration:
- cursor = 0 on input means start from beginning
- cursor in result = position to continue from next scan, or 0 if done
- keys = list of matched keys (up to count limit)
Thread-safe: immutable record with no mutable state.
- Since:
- 1.2
-
Constructor Summary
ConstructorsConstructorDescriptionScanResult(long cursor, List<String> keys) Creates an instance of aScanResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongcursor()Returns the value of thecursorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns true if the scan is complete (cursor is 0).keys()Returns the value of thekeysrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScanResult
-
-
Method Details
-
isComplete
public boolean isComplete()Returns true if the scan is complete (cursor is 0). -
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. -
cursor
-
keys
-