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_serviceDependencies
Fields 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 aTopicDependencies
based on the values contained in this scheme.ensureConfiguredService
(ParameterResolver resolver, MapBuilder.Dependencies deps) Obtain a configured topic service.protected Service
ensureService
(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> NamedTopic
realize
(ValueTypeAssertion<E> assertion, ParameterResolver resolver, MapBuilder.Dependencies deps) Realizes aNamedCollection
(possibly "ensuring it") based on the state of the builder, the providedParameterResolver
andMapBuilder
dependencies.<T extends NamedCollection>
booleanDetermines whether thisNamedCollectionBuilder
can realize aNamedCollection
of the specified type.Methods inherited from class com.tangosol.coherence.config.scheme.BaseGrpcScheme
getServiceProvider, isRunningClusterNeeded, setRemoteScopeName
Methods inherited from class com.tangosol.coherence.config.scheme.AbstractCachingScheme
establishMapListeners, getDefaultParameterResolver, getListenerBuilder, realizeBackingMapManager, realizeCache, realizeMap, setListenerBuilder, validate
Methods inherited from class com.tangosol.coherence.config.scheme.AbstractServiceScheme
getDefaultServiceName, getEventInterceptorBuilders, getScopedServiceName, getScopeName, getServiceBuilder, getServiceDependencies, getServiceName, getXml, injectScopeNameIntoService, isAutoStart, realizeService, setAutoStart, setScopeName, setServiceDependencies, setServiceName, setXml
Methods inherited from class com.tangosol.coherence.config.scheme.AbstractScheme
getSchemeName, isAnonymous, setSchemeName, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.tangosol.coherence.config.scheme.Scheme
getSchemeName, isAnonymous
Methods 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:NamedCollectionBuilder
Realizes aNamedCollection
(possibly "ensuring it") based on the state of the builder, the providedParameterResolver
andMapBuilder
dependencies.The
MapBuilder
dependencies are required to satisfy the requirement when realizing aNamedCollection
additionally involves realizing one or more internalMap
s.- Specified by:
realize
in interfaceNamedCollectionBuilder<NamedTopic>
- Type Parameters:
E
- the element type ofNamedCollection
- Parameters:
assertion
- type constraint assertion for elements of thisNamedCollection
resolver
- the ParameterResolverdeps
- theMapBuilder
dependencies- Returns:
- a
NamedCollection
-
realizes
Description copied from interface:NamedCollectionBuilder
Determines whether thisNamedCollectionBuilder
can realize aNamedCollection
of the specified type.- Specified by:
realizes
in interfaceNamedCollectionBuilder<NamedTopic>
- Type Parameters:
T
- the type of the class to verify- Parameters:
type
- theClass
of the type to verify- Returns:
- true if this builder can realize a
NamedCollection
of the specified type.
-
createConfiguration
Description copied from interface:TopicScheme
Create aTopicDependencies
based on the values contained in this scheme.- Specified by:
createConfiguration
in interfaceTopicScheme<NamedTopic,
TopicService> - Parameters:
resolver
- theParameterResolver
to use to resolve configuration valuesloader
- theClassLoader
to use- Returns:
- a
TopicDependencies
based 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:
getNamedCollectionBuilder
in interfaceServiceScheme
-
getServiceType
Description copied from interface:ServiceScheme
Return the service type.- Specified by:
getServiceType
in interfaceServiceScheme
- Returns:
- the service type
-
ensureService
Description copied from class:AbstractServiceScheme
Call theCluster.ensureService(String, String)
method to obtain the service.- Overrides:
ensureService
in classAbstractServiceScheme<com.tangosol.internal.net.grpc.DefaultRemoteGrpcTopicServiceDependencies>
- Parameters:
sService
- the name of the servicecluster
- theCluster
to obtain the service from- Returns:
- the ensured service
-
ensureConfiguredService
public TopicService ensureConfiguredService(ParameterResolver resolver, MapBuilder.Dependencies deps) Description copied from interface:TopicScheme
Obtain a configured topic service.- Specified by:
ensureConfiguredService
in interfaceTopicScheme<NamedTopic,
TopicService> - Parameters:
resolver
- theParameterResolver
to use to resolve the service parametersdeps
- the dependencies to use to configure the service- Returns:
- a configured topic service
-