java.lang.Object
org.apache.hadoop.hdfs.server.federation.store.records.Query<T>
Type Parameters:
T - Type of the record to query.

public class Query<T extends BaseRecord> extends Object
Check if a record matches a query. The query is usually a partial record.
  • Constructor Details

    • Query

      public Query(T part)
      Create a query to search for a partial record.
      Parameters:
      part - It defines the attributes to search.
  • Method Details

    • getPartial

      public T getPartial()
      Get the partial record used to query.
      Returns:
      The partial record used for the query.
    • matches

      public boolean matches(T other)
      Check if a record matches the primary keys or the partial record.
      Parameters:
      other - Record to check.
      Returns:
      If the record matches. Don't match if there is no partial.
    • toString

      public String toString()
      Overrides:
      toString in class Object