Class BaseGrpcTopicScheme
java.lang.Object
com.tangosol.coherence.config.scheme.AbstractScheme
com.tangosol.coherence.config.scheme.AbstractServiceScheme<com.tangosol.internal.net.grpc.DefaultRemoteGrpcTopicServiceDependencies>
com.tangosol.coherence.config.scheme.AbstractCachingScheme<com.tangosol.internal.net.grpc.DefaultRemoteGrpcTopicServiceDependencies>
com.tangosol.coherence.config.scheme.BaseGrpcScheme<com.tangosol.internal.net.grpc.DefaultRemoteGrpcTopicServiceDependencies,TopicService>
com.tangosol.coherence.config.scheme.BaseGrpcTopicScheme
- All Implemented Interfaces:
BackingMapManagerBuilder,MapBuilder,NamedCacheBuilder,NamedCollectionBuilder<NamedTopic>,ServiceBuilder,CachingScheme,NamedTopicScheme,ObservableCachingScheme,Scheme,ServiceScheme,TopicScheme<NamedTopic,TopicService>
public class BaseGrpcTopicScheme
extends BaseGrpcScheme<com.tangosol.internal.net.grpc.DefaultRemoteGrpcTopicServiceDependencies,TopicService>
implements NamedTopicScheme
The
BaseGrpcTopicScheme is responsible for building a
remote gRPC topic service.
This class is sub-classed in the Coherence Java gRPC client module and that subclass does all the actual work. This allows the grpc remote scheme to be added to a cache configuration file even if the gRPC client is not on the class path and nothing will break.
- Author:
- Jonathan Knight 2025.01.01
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tangosol.coherence.config.builder.MapBuilder
MapBuilder.Dependencies -
Field Summary
Fields inherited from class com.tangosol.coherence.config.scheme.AbstractServiceScheme
m_serviceDependenciesFields inherited from interface com.tangosol.coherence.config.scheme.ServiceScheme
DELIM_APPLICATION_SCOPE, DELIM_DOMAIN_PARTITION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateConfiguration(ParameterResolver resolver, ClassLoader loader) Create aTopicDependenciesbased on the values contained in this scheme.ensureConfiguredService(ParameterResolver resolver, MapBuilder.Dependencies deps) Obtain a configured topic service.protected ServiceensureService(String sService, Cluster cluster) Call theCluster.ensureService(String, String)method to obtain the service.getNamedCollectionBuilder(Class<? extends NamedCollection> clz, com.oracle.coherence.common.util.Options<NamedCollection.Option> options) Return the service type.<E> NamedTopicrealize(ValueTypeAssertion<E> assertion, ParameterResolver resolver, MapBuilder.Dependencies deps) Realizes aNamedCollection(possibly "ensuring it") based on the state of the builder, the providedParameterResolverandMapBuilderdependencies.<T extends NamedCollection>
booleanDetermines whether thisNamedCollectionBuildercan realize aNamedCollectionof the specified type.Methods inherited from class com.tangosol.coherence.config.scheme.BaseGrpcScheme
getServiceProvider, isRunningClusterNeeded, setRemoteScopeNameMethods inherited from class com.tangosol.coherence.config.scheme.AbstractCachingScheme
establishMapListeners, getDefaultParameterResolver, getListenerBuilder, realizeBackingMapManager, realizeCache, realizeMap, setListenerBuilder, validateMethods inherited from class com.tangosol.coherence.config.scheme.AbstractServiceScheme
getDefaultServiceName, getEventInterceptorBuilders, getScopedServiceName, getScopeName, getServiceBuilder, getServiceDependencies, getServiceName, getXml, injectScopeNameIntoService, isAutoStart, realizeService, setAutoStart, setScopeName, setServiceDependencies, setServiceName, setXmlMethods inherited from class com.tangosol.coherence.config.scheme.AbstractScheme
getSchemeName, isAnonymous, setSchemeName, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tangosol.coherence.config.scheme.Scheme
getSchemeName, isAnonymousMethods inherited from interface com.tangosol.coherence.config.scheme.ServiceScheme
getEventInterceptorBuilders, getScopedServiceName, getScopedServiceNameForProperty, getServiceBuilder, getServiceName, isAutoStart
-
Constructor Details
-
BaseGrpcTopicScheme
public BaseGrpcTopicScheme()Constructs aBaseGrpcTopicScheme.
-
-
Method Details
-
realize
public <E> NamedTopic realize(ValueTypeAssertion<E> assertion, ParameterResolver resolver, MapBuilder.Dependencies deps) Description copied from interface:NamedCollectionBuilderRealizes aNamedCollection(possibly "ensuring it") based on the state of the builder, the providedParameterResolverandMapBuilderdependencies.The
MapBuilderdependencies are required to satisfy the requirement when realizing aNamedCollectionadditionally involves realizing one or more internalMaps.- Specified by:
realizein interfaceNamedCollectionBuilder<NamedTopic>- Type Parameters:
E- the element type ofNamedCollection- Parameters:
assertion- type constraint assertion for elements of thisNamedCollectionresolver- the ParameterResolverdeps- theMapBuilderdependencies- Returns:
- a
NamedCollection
-
realizes
Description copied from interface:NamedCollectionBuilderDetermines whether thisNamedCollectionBuildercan realize aNamedCollectionof the specified type.- Specified by:
realizesin interfaceNamedCollectionBuilder<NamedTopic>- Type Parameters:
T- the type of the class to verify- Parameters:
type- theClassof the type to verify- Returns:
- true if this builder can realize a
NamedCollectionof the specified type.
-
createConfiguration
Description copied from interface:TopicSchemeCreate aTopicDependenciesbased on the values contained in this scheme.- Specified by:
createConfigurationin interfaceTopicScheme<NamedTopic,TopicService> - Parameters:
resolver- theParameterResolverto use to resolve configuration valuesloader- theClassLoaderto use- Returns:
- a
TopicDependenciesbased on the values contained in this scheme
-
getNamedCollectionBuilder
public NamedCollectionBuilder getNamedCollectionBuilder(Class<? extends NamedCollection> clz, com.oracle.coherence.common.util.Options<NamedCollection.Option> options) - Specified by:
getNamedCollectionBuilderin interfaceServiceScheme
-
getServiceType
Description copied from interface:ServiceSchemeReturn the service type.- Specified by:
getServiceTypein interfaceServiceScheme- Returns:
- the service type
-
ensureService
Description copied from class:AbstractServiceSchemeCall theCluster.ensureService(String, String)method to obtain the service.- Overrides:
ensureServicein classAbstractServiceScheme<com.tangosol.internal.net.grpc.DefaultRemoteGrpcTopicServiceDependencies>- Parameters:
sService- the name of the servicecluster- theClusterto obtain the service from- Returns:
- the ensured service
-
ensureConfiguredService
public TopicService ensureConfiguredService(ParameterResolver resolver, MapBuilder.Dependencies deps) Description copied from interface:TopicSchemeObtain a configured topic service.- Specified by:
ensureConfiguredServicein interfaceTopicScheme<NamedTopic,TopicService> - Parameters:
resolver- theParameterResolverto use to resolve the service parametersdeps- the dependencies to use to configure the service- Returns:
- a configured topic service
-