Class BaseGrpcServiceImpl
java.lang.Object
com.oracle.coherence.grpc.proxy.common.BaseGrpcServiceImpl
- Direct Known Subclasses:
BaseNamedCacheServiceImpl
A base class for gRPC services.
The asynchronous processing of CompletionStages 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
Nested ClassesModifier and TypeClassDescriptionstatic classThe defaultBaseGrpcServiceImpl.Dependenciesimplementation.static interfaceThe dependencies to configure aBaseGrpcServiceImpl. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longThe default transfer threshold.protected final Function<String, ConfigurableCacheFactory> The function used to obtain ConfigurableCacheFactory instances for a given scope name.protected final BaseGrpcServiceImpl.DependenciesThe serviceBaseGrpcServiceImpl.Dependencies.protected final ExecutorTheExecutorto use to hand off asynchronous tasks.protected final GrpcProxyMetricsThe proxy service metrics.protected final NamedSerializerFactoryThe factory to use to lookup namedSerializerinstances.protected longThe transfer threshold used for paged requests.protected static final VoidAVoidvalue to make it obvious the return value in Void methods. -
Constructor Summary
ConstructorsConstructorDescriptionBaseGrpcServiceImpl(BaseGrpcServiceImpl.Dependencies dependencies, String sMBeanName, String sPoolName) Create aBaseGrpcServiceImpl. -
Method Summary
Modifier and TypeMethodDescriptionprotected static ExecutorcreateDefaultExecutor(String sName) Create the defaultExecutor.Return theExecutorthis service is using for async-requests.Obtain the gRPC metrics instance for this service.protected SerializergetSerializer(String sFormatRequest, String sFormatProxy, Supplier<Serializer> supplierSerializer, Supplier<ClassLoader> supplierLoader) longReturn the transfer threshold.
-
Field Details
-
VOID
AVoidvalue 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 namedSerializerinstances. -
f_executor
TheExecutorto 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.Dependenciesto use to configure the service
-
-
Method Details
-
getMetrics
Obtain the gRPC metrics instance for this service.- Returns:
- the gRPC metrics instance for this service
-
getExecutor
Return theExecutorthis service is using for async-requests.- Returns:
- the
Executorthis service is using for async-requests
-
getTransferThreshold
public long getTransferThreshold()Return the transfer threshold.- Returns:
- the
transferThreshold
-
createDefaultExecutor
Create the defaultExecutor.- Returns:
- the default
Executor
-
getSerializer
protected Serializer getSerializer(String sFormatRequest, String sFormatProxy, Supplier<Serializer> supplierSerializer, Supplier<ClassLoader> supplierLoader)
-