java.lang.Object
org.elasticsearch.core.AbstractRefCounted
org.elasticsearch.compute.operator.SideChannel
- All Implemented Interfaces:
Closeable,AutoCloseable,org.elasticsearch.core.RefCounted,org.elasticsearch.core.Releasable
- Direct Known Subclasses:
SharedMinCompetitive
public abstract class SideChannel
extends org.elasticsearch.core.AbstractRefCounted
implements org.elasticsearch.core.Releasable
A "side channel" for the
Operators running on one node. These
nodes must run on the same JVM, but will not run in the same Driver.
SideChannels are RefCounted so they can release
resources when the last Operator referencing them
is Operator.close()d.
SideChannels are configured during physical planning.
And the physical plan nodes are not RefCounted.
So we can't make the actual SideChannel implementations
during planning. Instead, we configure a supplier that builds the
SideChannel when building the first Operator
instance.
This implements Releasable as a convenience that delegates to
AbstractRefCounted.decRef().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic classSideChannel.Supplier<T extends SideChannel>Builds theSideChannelon first use and returns a shared reference on the next use. -
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclose()protected final voidprotected abstract voidMethods inherited from class org.elasticsearch.core.AbstractRefCounted
alreadyClosed, decRef, hasReferences, incRef, mustIncRef, of, refCount, touch, tryIncRef
-
Constructor Details
-
SideChannel
-
-
Method Details
-
close
public final void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.core.Releasable
-
closeInternal
protected final void closeInternal()- Specified by:
closeInternalin classorg.elasticsearch.core.AbstractRefCounted
-
closeSideChannel
protected abstract void closeSideChannel()
-