The TimeLimitingCollector type exposes the following members.

Methods

  NameDescription
Public methodAcceptsDocsOutOfOrder (Overrides Collector..::..AcceptsDocsOutOfOrder()()()().)
Public methodCollect
Calls {@link Collector#Collect(int)} on the decorated {@link Collector} unless the allowed time has passed, in which case it throws an exception.
(Overrides Collector..::..Collect(Int32).)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodStatic memberGetResolution
Return the timer resolution.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsGreedy
Checks if this time limited collector is greedy in collecting the last hit. A non greedy collector, upon a timeout, would throw a {@link TimeExceededException} without allowing the wrapped collector to collect current doc. A greedy one would first allow the wrapped hit collector to collect current doc and only then throw a {@link TimeExceededException}.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetGreedy
Sets whether this time limited collector is greedy.
Public methodSetNextReader (Overrides Collector..::..SetNextReader(IndexReader, Int32).)
Public methodStatic memberSetResolution
Set the timer resolution. The default timer resolution is 20 milliseconds. This means that a search required to take no longer than 800 milliseconds may be stopped after 780 to 820 milliseconds.
Note that:
  • Finer (smaller) resolution is more accurate but less efficient.
  • Setting resolution to less than 5 milliseconds will be silently modified to 5 milliseconds.
  • Setting resolution smaller than current resolution might take effect only after current resolution. (Assume current resolution of 20 milliseconds is modified to 5 milliseconds, then it can take up to 20 milliseconds for the change to have effect.
Public methodSetScorer (Overrides Collector..::..SetScorer(Scorer).)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)

See Also