Package com.oracle.coherence.client
Interface ChannelProvider
-
- All Superinterfaces:
Comparable<ChannelProvider>
public interface ChannelProvider extends Comparable<ChannelProvider>
A provider of named gRPCChannelinstances.Instances of this interface are loaded by the
ServiceLoaderwhen building gRPC channel instances to provide aChannelfor a remote gRPC service. This allows application code to provide channels that require configuration not supported by the out-of-the-box Coherence configuration.- Since:
- 20.12
- Author:
- Jonathan Knight 2020.12.15
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_PRIORITYThe default priority for a configuration.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default intcompareTo(ChannelProvider other)Optional<io.grpc.Channel>getChannel(String sName)Return theChannel.default intgetPriority()Returns the priority for this provider.
-
-
-
Field Detail
-
DEFAULT_PRIORITY
static final int DEFAULT_PRIORITY
The default priority for a configuration.- See Also:
getPriority(), Constant Field Values
-
-
Method Detail
-
getChannel
Optional<io.grpc.Channel> getChannel(String sName)
Return theChannel.- Parameters:
sName- the name of the channel to get- Returns:
- the
Channel
-
getPriority
default int getPriority()
Returns the priority for this provider.Sessions will be created in priority order, the highest priority first.
The default priority is zero (see
DEFAULT_PRIORITY.- Returns:
- the priority for this provider
-
compareTo
default int compareTo(ChannelProvider other)
- Specified by:
compareToin interfaceComparable<ChannelProvider>
-
-