Record Class DistributedCache.ScanResult<K>

java.lang.Object
java.lang.Record
cloud.opencode.base.cache.distributed.DistributedCache.ScanResult<K>
Type Parameters:
K - the key type - 键类型
Record Components:
keys - the set of keys found | 找到的键集合
nextCursor - the cursor for the next scan | 下次扫描的游标
finished - whether the scan is complete | 扫描是否完成
Enclosing interface:
DistributedCache<K,V>

public static record DistributedCache.ScanResult<K>(Set<K> keys, String nextCursor, boolean finished) extends Record
Result of a scan operation. 扫描操作的结果。
Since:
JDK 25, opencode-base-cache V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Constructor Details

    • ScanResult

      public ScanResult(Set<K> keys, String nextCursor, boolean finished)
      Creates an instance of a ScanResult record class.
      Parameters:
      keys - the value for the keys record component
      nextCursor - the value for the nextCursor record component
      finished - the value for the finished record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • keys

      public Set<K> keys()
      Returns the value of the keys record component.
      Returns:
      the value of the keys record component
    • nextCursor

      public String nextCursor()
      Returns the value of the nextCursor record component.
      Returns:
      the value of the nextCursor record component
    • finished

      public boolean finished()
      Returns the value of the finished record component.
      Returns:
      the value of the finished record component