Module org.elasticsearch.compute
Class SideChannel.Supplier<T extends SideChannel>
java.lang.Object
org.elasticsearch.compute.operator.SideChannel.Supplier<T>
- Direct Known Subclasses:
SharedMinCompetitive.Supplier
- Enclosing class:
SideChannel
Builds the
SideChannel on first use and returns a shared reference
on the next use.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Tbuild()final Tget()Get theSideChannel, building it if this is the first call and incrementing its reference it if it has already been built.
-
Constructor Details
-
Supplier
public Supplier()
-
-
Method Details
-
build
-
get
Get theSideChannel, building it if this is the first call and incrementing its reference it if it has already been built.This will only ever build one channel at a time. There are 3 possible states:
vcontainsnull- create a new channel-
vcontains a side channel, but it is closed - the thread that closed it will clearv. Loop untilvcontainsnull. -
vcontains a side channel and successfullyAbstractRefCounted.tryIncRef()it - return it.
-