Class TotalHitCount

java.lang.Object
org.infinispan.query.dsl.TotalHitCount
All Implemented Interfaces:
HitCount

public class TotalHitCount extends Object implements HitCount
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final TotalHitCount
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    TotalHitCount(int value, boolean exact)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    For efficiency reasons, the computation of the hit count could be limited to some upper bound.
    int
    This returned value could be either exact or a lower-bound of the exact value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • TotalHitCount

      public TotalHitCount(int value, boolean exact)
  • Method Details

    • value

      public int value()
      Description copied from interface: HitCount
      This returned value could be either exact or a lower-bound of the exact value.

      When the query is non-indexed, for performance reasons, the hit count is not calculated and will return -1.

      Specified by:
      value in interface HitCount
      Returns:
      the total hit count value
      See Also:
    • isExact

      public boolean isExact()
      Description copied from interface: HitCount
      For efficiency reasons, the computation of the hit count could be limited to some upper bound. If the hit account accuracy is limited, the HitCount.value() here could be a lower-bound of the exact value, and in this case, this method will return false.
      Specified by:
      isExact in interface HitCount
      Returns:
      whether the HitCount.value() is exact