Package com.oracle.coherence.grpc.proxy
Class BaseGrpcServiceImpl
java.lang.Object
com.oracle.coherence.grpc.proxy.BaseGrpcServiceImpl
- Direct Known Subclasses:
NamedCacheServiceImpl
A base class for gRPC services.
The asynchronous processing of CompletionStage
s is done using an DaemonPoolExecutor
so as not to consume or block threads in the Fork Join Pool. The DaemonPoolExecutor
is
configurable so that its thread counts can be controlled.
- Since:
- 23.03
- Author:
- Jonathan Knight 2023.02.03
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
The defaultBaseGrpcServiceImpl.Dependencies
implementation.static interface
The dependencies to configure aBaseGrpcServiceImpl
. -
Field Summary
Modifier and TypeFieldDescriptionstatic final long
The default transfer threshold.protected final Function
<String, ConfigurableCacheFactory> The function used to obtain ConfigurableCacheFactory instances for a given scope name.protected final BaseGrpcServiceImpl.Dependencies
The serviceBaseGrpcServiceImpl.Dependencies
.protected final Executor
TheExecutor
to use to hand off asynchronous tasks.protected final GrpcProxyMetrics
The proxy service metrics.protected final NamedSerializerFactory
The factory to use to lookup namedSerializer
instances.protected long
The transfer threshold used for paged requests.protected static final Void
AVoid
value to make it obvious the return value in Void methods. -
Constructor Summary
ConstructorDescriptionBaseGrpcServiceImpl
(BaseGrpcServiceImpl.Dependencies dependencies, String sMBeanName, String sPoolName) Create aBaseGrpcServiceImpl
. -
Method Summary
Modifier and TypeMethodDescriptionprotected static Executor
createDefaultExecutor
(String sName) Create the defaultExecutor
.Obtain the gRPC metrics instance for this service.protected Serializer
getSerializer
(String sFormatRequest, String sFormatProxy, Supplier<Serializer> supplierSerializer, Supplier<ClassLoader> supplierLoader)
-
Field Details
-
VOID
AVoid
value to make it obvious the return value in Void methods. -
DEFAULT_TRANSFER_THRESHOLD
public static final long DEFAULT_TRANSFER_THRESHOLDThe default transfer threshold.- See Also:
-
f_dependencies
The serviceBaseGrpcServiceImpl.Dependencies
. -
f_cacheFactorySupplier
The function used to obtain ConfigurableCacheFactory instances for a given scope name. -
f_serializerProducer
The factory to use to lookup namedSerializer
instances. -
f_executor
TheExecutor
to use to hand off asynchronous tasks. -
f_metrics
The proxy service metrics. -
transferThreshold
protected long transferThresholdThe transfer threshold used for paged requests.
-
-
Constructor Details
-
BaseGrpcServiceImpl
public BaseGrpcServiceImpl(BaseGrpcServiceImpl.Dependencies dependencies, String sMBeanName, String sPoolName) Create aBaseGrpcServiceImpl
.- Parameters:
dependencies
- theBaseGrpcServiceImpl.Dependencies
to use to configure the service
-
-
Method Details
-
getMetrics
Obtain the gRPC metrics instance for this service.- Returns:
- the gRPC metrics instance for this service
-
createDefaultExecutor
Create the defaultExecutor
.- Returns:
- the default
Executor
-
getSerializer
protected Serializer getSerializer(String sFormatRequest, String sFormatProxy, Supplier<Serializer> supplierSerializer, Supplier<ClassLoader> supplierLoader)
-