Record Class GetCollectionCacheKey

java.lang.Object
java.lang.Record
org.restheart.mongodb.db.GetCollectionCacheKey

public record GetCollectionCacheKey(Optional<com.mongodb.client.ClientSession> session, com.mongodb.client.MongoCollection<org.bson.BsonDocument> collection, org.bson.BsonDocument sort, org.bson.BsonDocument filter, org.bson.BsonDocument keys, org.bson.BsonDocument hint, int from, int to, long cursorId, boolean exhausted) extends Record
Author:
Andrea Di Cesare <andrea@softinstigate.com>
  • Constructor Summary

    Constructors
    Constructor
    Description
    GetCollectionCacheKey(Optional<com.mongodb.client.ClientSession> session, com.mongodb.client.MongoCollection<org.bson.BsonDocument> collection, org.bson.BsonDocument sort, org.bson.BsonDocument filter, org.bson.BsonDocument keys, org.bson.BsonDocument hint, int from, int to, long cursorId, boolean exhausted)
    Creates an instance of a GetCollectionCacheKey record class.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    com.mongodb.client.MongoCollection<org.bson.BsonDocument>
    Returns the value of the collection record component.
    long
    Returns the value of the cursorId record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the exhausted record component.
    org.bson.BsonDocument
    Returns the value of the filter record component.
    int
    Returns the value of the from record component.
    final int
    Returns a hash code value for this object.
    org.bson.BsonDocument
    Returns the value of the hint record component.
    org.bson.BsonDocument
    Returns the value of the keys record component.
    Optional<com.mongodb.client.ClientSession>
    Returns the value of the session record component.
    org.bson.BsonDocument
    Returns the value of the sort record component.
    int
    to()
    Returns the value of the to record component.
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • GetCollectionCacheKey

      public GetCollectionCacheKey(Optional<com.mongodb.client.ClientSession> session, com.mongodb.client.MongoCollection<org.bson.BsonDocument> collection, org.bson.BsonDocument sort, org.bson.BsonDocument filter, org.bson.BsonDocument keys, org.bson.BsonDocument hint, int from, int to, long cursorId, boolean exhausted)
      Creates an instance of a GetCollectionCacheKey record class.
      Parameters:
      session - the value for the session record component
      collection - the value for the collection record component
      sort - the value for the sort record component
      filter - the value for the filter record component
      keys - the value for the keys record component
      hint - the value for the hint record component
      from - the value for the from record component
      to - the value for the to record component
      cursorId - the value for the cursorId record component
      exhausted - the value for the exhausted record component
  • Method Details

    • clone

      public static GetCollectionCacheKey clone(GetCollectionCacheKey key)
      Parameters:
      key -
    • toString

      public 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 '=='.
      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.
    • session

      public Optional<com.mongodb.client.ClientSession> session()
      Returns the value of the session record component.
      Returns:
      the value of the session record component
    • collection

      public com.mongodb.client.MongoCollection<org.bson.BsonDocument> collection()
      Returns the value of the collection record component.
      Returns:
      the value of the collection record component
    • sort

      public org.bson.BsonDocument sort()
      Returns the value of the sort record component.
      Returns:
      the value of the sort record component
    • filter

      public org.bson.BsonDocument filter()
      Returns the value of the filter record component.
      Returns:
      the value of the filter record component
    • keys

      public org.bson.BsonDocument keys()
      Returns the value of the keys record component.
      Returns:
      the value of the keys record component
    • hint

      public org.bson.BsonDocument hint()
      Returns the value of the hint record component.
      Returns:
      the value of the hint record component
    • from

      public int from()
      Returns the value of the from record component.
      Returns:
      the value of the from record component
    • to

      public int to()
      Returns the value of the to record component.
      Returns:
      the value of the to record component
    • cursorId

      public long cursorId()
      Returns the value of the cursorId record component.
      Returns:
      the value of the cursorId record component
    • exhausted

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