Package org.infinispan.query.dsl
Class TotalHitCount
java.lang.Object
org.infinispan.query.dsl.TotalHitCount
- All Implemented Interfaces:
HitCount
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
EMPTY
-
-
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.
-
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, theHitCount.value()
here could be a lower-bound of the exact value, and in this case, this method will returnfalse
.- Specified by:
isExact
in interfaceHitCount
- Returns:
- whether the
HitCount.value()
is exact
-