Class BaseGrpcServiceImpl

  • Direct Known Subclasses:
    NamedCacheServiceImpl

    public class BaseGrpcServiceImpl
    extends Object
    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
    • Field Detail

      • VOID

        protected static final Void VOID
        A Void value to make it obvious the return value in Void methods.
      • DEFAULT_TRANSFER_THRESHOLD

        public static final long DEFAULT_TRANSFER_THRESHOLD
        The default transfer threshold.
        See Also:
        Constant Field Values
      • f_cacheFactorySupplier

        protected final Function<String,​com.tangosol.net.ConfigurableCacheFactory> f_cacheFactorySupplier
        The function used to obtain ConfigurableCacheFactory instances for a given scope name.
      • f_serializerProducer

        protected final com.tangosol.io.NamedSerializerFactory f_serializerProducer
        The factory to use to lookup named Serializer instances.
      • f_executor

        protected final Executor f_executor
        The Executor to use to hand off asynchronous tasks.
      • f_metrics

        protected final GrpcProxyMetrics f_metrics
        The proxy service metrics.
      • transferThreshold

        protected long transferThreshold
        The transfer threshold used for paged requests.
    • Method Detail

      • getMetrics

        public GrpcProxyMetrics getMetrics()
        Obtain the gRPC metrics instance for this service.
        Returns:
        the gRPC metrics instance for this service
      • createDefaultExecutor

        protected static Executor createDefaultExecutor​(String sName)
        Create the default Executor.
        Returns:
        the default Executor
      • getSerializer

        protected com.tangosol.io.Serializer getSerializer​(String sFormatRequest,
                                                           String sFormatProxy,
                                                           Supplier<com.tangosol.io.Serializer> supplierSerializer,
                                                           Supplier<ClassLoader> supplierLoader)