Module org.elasticsearch.compute
Class SharedMinCompetitive
java.lang.Object
org.elasticsearch.core.AbstractRefCounted
org.elasticsearch.compute.operator.SideChannel
org.elasticsearch.compute.operator.topn.SharedMinCompetitive
- All Implemented Interfaces:
Closeable,AutoCloseable,org.elasticsearch.core.RefCounted,org.elasticsearch.core.Releasable
A thread safe, shared holder for the min competitive value from a
set of
TopNOperators.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic classNested classes/interfaces inherited from class org.elasticsearch.compute.operator.SideChannel
SideChannel.Status -
Field Summary
Fields inherited from class org.elasticsearch.core.AbstractRefCounted
ALREADY_CLOSED_MESSAGE, INVALID_DECREF_MESSAGEFields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigs()get(BlockFactory blockFactory) Read the min competitive value.booleanoffer(org.apache.lucene.util.BytesRef minCompetitive) Offer an update to the min competitive value.Methods inherited from class org.elasticsearch.compute.operator.SideChannel
close, closeInternalMethods inherited from class org.elasticsearch.core.AbstractRefCounted
alreadyClosed, decRef, hasReferences, incRef, mustIncRef, of, refCount, touch, tryIncRef
-
Method Details
-
configs
-
offer
public boolean offer(org.apache.lucene.util.BytesRef minCompetitive) Offer an update to the min competitive value.- Parameters:
minCompetitive- if it is accepted then the bytes are copied- Returns:
- whether the update was accepted.
falsehere means the minimum value in the local top n is greater than or equal to the minimum competitive value already recorded
-
get
-
closeSideChannel
protected void closeSideChannel()- Specified by:
closeSideChannelin classSideChannel
-