Class PagedTopicScheme
java.lang.Object
com.tangosol.coherence.config.scheme.AbstractScheme
com.tangosol.coherence.config.scheme.AbstractServiceScheme<com.tangosol.internal.net.service.grid.PartitionedCacheDependencies>
com.tangosol.coherence.config.scheme.AbstractCachingScheme<com.tangosol.internal.net.service.grid.PartitionedCacheDependencies>
com.tangosol.coherence.config.scheme.DistributedScheme
com.tangosol.coherence.config.scheme.PagedTopicScheme
- All Implemented Interfaces:
BackingMapManagerBuilder,MapBuilder,NamedCacheBuilder,NamedCollectionBuilder<NamedTopic>,ServiceBuilder,BundlingScheme,CachingScheme,ClusteredCachingScheme,NamedTopicScheme,ObservableCachingScheme,Scheme,ServiceScheme,TopicScheme<NamedTopic,TopicService>
A
PagedTopicScheme is responsible for building a topic.- Since:
- Coherence 14.1.1
- Author:
- jk 2015.05.21
-
Nested Class Summary
Nested classes/interfaces inherited from class com.tangosol.coherence.config.scheme.DistributedScheme
DistributedScheme.BackupConfigNested 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 TypeMethodDescriptioncom.tangosol.internal.net.topic.impl.paged.PagedTopicDependenciescreateConfiguration(ParameterResolver resolver, ClassLoader loader) Create aPagedTopicDependenciesbased on the values contained in this scheme.ensureConfiguredService(ParameterResolver resolver, MapBuilder.Dependencies deps) Ensure service and its topic configuration.intgetChannelCount(ParameterResolver resolver) Returns the number of channels in the topic, or thePagedTopic.DEFAULT_CHANNEL_COUNTvalue to indicate the topic uses the default channel count.Return the ElementCalculatorBuilder used to build a ElementCalculator.getExpiryDelay(ParameterResolver resolver) Return the amount of time that elements offered to the queue remain visible to consumers.longgetHighUnits(ParameterResolver resolver) Return the high-unitsgetPageSize(ParameterResolver resolver) Return the binary limit of the size of a page in a topic.getReconnectRetryMillis(ParameterResolver resolver) Return the amount of time publishers and subscribers will wait between attempts to reconnect after being disconnected.getReconnectTimeoutMillis(ParameterResolver resolver) Returns the maximum amount of time publishers and subscribers will attempt to reconnect after being disconnected.getReconnectWaitMillis(ParameterResolver resolver) Return the amount of time publishers and subscribers will wait before attempts to reconnect after being disconnected.Return the service type.Obtains theExpressiondefining the name of theStorageAccessAuthorizer.Return theBackingMapSchemeused for the storage of this scheme.getStorageScheme(ParameterResolver resolver) Return theBackingMapSchemeused for the storage of this scheme.getSubscriberTimeout(ParameterResolver resolver) Returns the subscriber timeout value.Return theExpressiontransient. to use to determine whether the backing map is transient.booleanisAllowUnownedCommits(ParameterResolver resolver) Returnstrueif the topic allows commits for a position in a channel by subscribers that do not own the channel.booleanisRetainConsumed(ParameterResolver resolver) Determine whether to retain consumed values.<V> NamedTopicrealize(ValueTypeAssertion<V> typeConstraint, ParameterResolver resolver, MapBuilder.Dependencies deps) Realizes aNamedCollection(possibly "ensuring it") based on the state of the builder, the providedParameterResolverandMapBuilderdependencies.Realize aBackingMapManagerto be scoped by the specifiedConfigurableCacheFactory.<T extends NamedCollection>
booleanDetermines whether thisNamedCollectionBuildercan realize aNamedCollectionof the specified type.voidSet the flag that indicates whether the topic allows commits for a position in a channel by subscribers that do not own the channelvoidsetChannelCount(Expression<Integer> expr) Set the number of channels in the topic.voidSet the ElementCalculatorBuilder.voidsetEventInterceptorBuilders(List<NamedEventInterceptorBuilder> listBuilders) voidsetExpiryDelay(Expression<Seconds> expr) Set the amount of time that elements offered to the queue remain visible to consumers.voidsetHighUnits(Expression<com.oracle.coherence.common.util.MemorySize> expr) Set the high-unitsvoidsetPageSize(Expression<Units> expr) Set the page size.voidSet the amount of time publishers and subscribers will wait between attempts to reconnect after being disconnected.voidSet the maximum amount of time publishers and subscribers will attempt to reconnect after being disconnected.voidSet the amount of time publishers and subscribers will wait before attempts to reconnect after being disconnected.voidsetRetainConsumed(Expression<Boolean> expr) Set whether to retain consumed values.voidsetStorageAccessAuthorizer(Expression<String> exprStorageAccessAuthorizer) Sets theExpressiondefining the name of theStorageAccessAuthorizer.voidsetStorageScheme(CachingScheme scheme) Set theBackingMapSchemewhich builds the backing map for the internal caches used to implement this scheme.voidSet the subscriber timeout value.voidsetTransient(Expression<Boolean> expr) Set the transient flag.Methods inherited from class com.tangosol.coherence.config.scheme.DistributedScheme
getBackingMapScheme, getBackupMapConfig, getBundleManager, isRunningClusterNeeded, setBackingMapScheme, setBackupMapConfig, setBundleManagerMethods inherited from class com.tangosol.coherence.config.scheme.AbstractCachingScheme
establishMapListeners, getDefaultParameterResolver, getListenerBuilder, realizeCache, realizeMap, setListenerBuilder, validateMethods inherited from class com.tangosol.coherence.config.scheme.AbstractServiceScheme
ensureService, getDefaultServiceName, 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
getScopedServiceName, getServiceBuilder, getServiceName, isAutoStart
-
Constructor Details
-
PagedTopicScheme
public PagedTopicScheme()Constructs aPagedTopicScheme.
-
-
Method Details
-
getServiceType
Return the service type.- Specified by:
getServiceTypein interfaceServiceScheme- Overrides:
getServiceTypein classDistributedScheme- Returns:
- the service type
-
realizeBackingMapManager
Description copied from class:AbstractCachingSchemeRealize aBackingMapManagerto be scoped by the specifiedConfigurableCacheFactory.- Specified by:
realizeBackingMapManagerin interfaceBackingMapManagerBuilder- Overrides:
realizeBackingMapManagerin classAbstractCachingScheme<com.tangosol.internal.net.service.grid.PartitionedCacheDependencies>- Parameters:
ccf- theConfigurableCacheFactory- Returns:
- a
BackingMapManager
-
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.
-
getStorageScheme
Return theBackingMapSchemeused for the storage of this scheme.- Parameters:
resolver- potentially override default unit-calculator of BINARY- Returns:
- the scheme
-
getStorageScheme
Return theBackingMapSchemeused for the storage of this scheme.- Returns:
- the scheme
-
setChannelCount
Set the number of channels in the topic.- Parameters:
expr- the number of channels in the topic
-
getChannelCount
Returns the number of channels in the topic, or thePagedTopic.DEFAULT_CHANNEL_COUNTvalue to indicate the topic uses the default channel count.- Parameters:
resolver- the ParameterResolver- Returns:
- the number of channels in the topic, or the
PagedTopic.DEFAULT_CHANNEL_COUNTvalue to indicate the topic uses the default channel count
-
setStorageScheme
Set theBackingMapSchemewhich builds the backing map for the internal caches used to implement this scheme.- Parameters:
scheme- the scheme builder
-
getPageSize
Return the binary limit of the size of a page in a topic. Contains the target number of bytes that can be placed in a page before the page is deemed to be full. Legal values are positive integers.- Parameters:
resolver- the ParameterResolver- Returns:
- the page size
-
setPageSize
Set the page size.- Parameters:
expr- the page high units expression
-
getHighUnits
Return the high-units- Parameters:
resolver- the ParameterResolver- Returns:
- the unit factor
-
setHighUnits
@Injectable("high-units") public void setHighUnits(Expression<com.oracle.coherence.common.util.MemorySize> expr) Set the high-units- Parameters:
expr- the high-units expression
-
getTransientExpression
Return theExpressiontransient. to use to determine whether the backing map is transient.- Returns:
- the
Expressiontransient. to use to determine whether the backing map is transient
-
setTransient
Set the transient flag.- Parameters:
expr- true to make the backing map transient.
-
getStorageAccessAuthorizer
Obtains theExpressiondefining the name of theStorageAccessAuthorizer.- Returns:
- the name of the
StorageAccessAuthorizerornullif one has not been configured.
-
setStorageAccessAuthorizer
@Injectable("storage-authorizer") public void setStorageAccessAuthorizer(Expression<String> exprStorageAccessAuthorizer) Sets theExpressiondefining the name of theStorageAccessAuthorizer.- Parameters:
exprStorageAccessAuthorizer- theExpression
-
getExpiryDelay
Return the amount of time that elements offered to the queue remain visible to consumers.- Parameters:
resolver- the ParameterResolver- Returns:
- the amount of time that elements offered to the queue remain visible to consumers
-
setExpiryDelay
Set the amount of time that elements offered to the queue remain visible to consumers.- Parameters:
expr- the element expiry delay expression
-
isRetainConsumed
Determine whether to retain consumed values.- Parameters:
resolver- the ParameterResolver- Returns:
trueif the topic should retain consumed values
-
setRetainConsumed
Set whether to retain consumed values.- Parameters:
expr- the expression to produce the retain-consumed values flag
-
isAllowUnownedCommits
Returnstrueif the topic allows commits for a position in a channel by subscribers that do not own the channel.- Parameters:
resolver- the ParameterResolver- Returns:
trueif the topic allows commits for a position in a channel by subscribers that do not own the channel
-
setAllowUnownedCommits
Set the flag that indicates whether the topic allows commits for a position in a channel by subscribers that do not own the channel- Parameters:
expr-trueif the topic allows commits for a position in a channel by subscribers that do not own the channel orfalseto only accept commits from channel owners
-
getSubscriberTimeout
Returns the subscriber timeout value.- Parameters:
resolver- the ParameterResolver- Returns:
- the subscriber timeout value
-
setSubscriberTimeout
Set the subscriber timeout value.- Parameters:
expr- the expression representing the timeout value for subscribers
-
getElementCalculatorBuilder
Return the ElementCalculatorBuilder used to build a ElementCalculator.- Returns:
- the element calculator
-
setElementCalculatorBuilder
@Injectable("element-calculator") public void setElementCalculatorBuilder(ElementCalculatorBuilder builder) Set the ElementCalculatorBuilder.- Parameters:
builder- the ElementCalculatorBuilder
-
setEventInterceptorBuilders
@Injectable("interceptors") public void setEventInterceptorBuilders(List<NamedEventInterceptorBuilder> listBuilders) Description copied from class:DistributedScheme- Overrides:
setEventInterceptorBuildersin classDistributedScheme- Parameters:
listBuilders- theListofNamedEventInterceptorBuilders
-
getEventInterceptorBuilders
Description copied from class:DistributedSchemeObtains theListofNamedEventInterceptorBuilders that have been defined for theServiceScheme.Note: For those
ServiceSchemes don't support event interceptors, the returned value must be an empty list.- Specified by:
getEventInterceptorBuildersin interfaceServiceScheme- Overrides:
getEventInterceptorBuildersin classDistributedScheme- Returns:
- an
ListoverNamedEventInterceptorBuilders
-
getReconnectTimeoutMillis
Returns the maximum amount of time publishers and subscribers will attempt to reconnect after being disconnected.- Parameters:
resolver- the parameter resolver- Returns:
- the maximum amount of time publishers and subscribers will attempt to reconnect after being disconnected
-
setReconnectTimeoutMillis
Set the maximum amount of time publishers and subscribers will attempt to reconnect after being disconnected.- Parameters:
expr- the maximum amount of time publishers and subscribers will attempt to reconnect after being disconnected
-
getReconnectRetryMillis
Return the amount of time publishers and subscribers will wait between attempts to reconnect after being disconnected.- Parameters:
resolver- the parameter resolver- Returns:
- the maximum amount of time publishers and subscribers will wait between attempts to reconnect after being disconnected
-
setReconnectRetryMillis
Set the amount of time publishers and subscribers will wait between attempts to reconnect after being disconnected.- Parameters:
expr- the maximum amount of time publishers and subscribers will wait between attempts to reconnect after being disconnected
-
getReconnectWaitMillis
Return the amount of time publishers and subscribers will wait before attempts to reconnect after being disconnected.- Parameters:
resolver- the parameter resolver- Returns:
- the maximum amount of time publishers and subscribers will wait before attempts to reconnect after being disconnected
-
setReconnectWaitMillis
Set the amount of time publishers and subscribers will wait before attempts to reconnect after being disconnected.- Parameters:
expr- the maximum amount of time publishers and subscribers will wait before attempts to reconnect after being disconnected
-
realize
public <V> NamedTopic realize(ValueTypeAssertion<V> typeConstraint, 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:
V- the element type ofNamedCollection- Parameters:
typeConstraint- type constraint assertion for elements of thisNamedCollectionresolver- the ParameterResolverdeps- theMapBuilderdependencies- Returns:
- a
NamedCollection
-
ensureConfiguredService
public TopicService ensureConfiguredService(ParameterResolver resolver, MapBuilder.Dependencies deps) Ensure service and its topic configuration.PagedTopicConfiguration is registered in corresponding service's resource registry.
- Specified by:
ensureConfiguredServicein interfaceTopicScheme<NamedTopic,TopicService> - Parameters:
resolver- the ParameterResolverdeps- theMapBuilderdependencies- Returns:
- corresponding TopicService for this scheme
-
createConfiguration
public com.tangosol.internal.net.topic.impl.paged.PagedTopicDependencies createConfiguration(ParameterResolver resolver, ClassLoader loader) Create aPagedTopicDependenciesbased on the values contained in this scheme.- Parameters:
resolver- theParameterResolverto use to resolve configuration valuesloader- theClassLoaderto use- Returns:
- a
PagedTopicDependenciesbased on the values contained in this scheme
-