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.BackupConfig
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
-
Method Summary
Modifier and TypeMethodDescriptioncom.tangosol.internal.net.topic.impl.paged.PagedTopicDependencies
createConfiguration
(ParameterResolver resolver, ClassLoader loader) Create aPagedTopicDependencies
based on the values contained in this scheme.ensureConfiguredService
(ParameterResolver resolver, MapBuilder.Dependencies deps) Ensure service and its topic configuration.int
getChannelCount
(ParameterResolver resolver) Returns the number of channels in the topic, or thePagedTopic.DEFAULT_CHANNEL_COUNT
value 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.long
getHighUnits
(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 theExpression
defining the name of theStorageAccessAuthorizer
.Return theBackingMapScheme
used for the storage of this scheme.getStorageScheme
(ParameterResolver resolver) Return theBackingMapScheme
used for the storage of this scheme.getSubscriberTimeout
(ParameterResolver resolver) Returns the subscriber timeout value.Return theExpression
transient. to use to determine whether the backing map is transient.boolean
isAllowUnownedCommits
(ParameterResolver resolver) Returnstrue
if the topic allows commits for a position in a channel by subscribers that do not own the channel.boolean
isRetainConsumed
(ParameterResolver resolver) Determine whether to retain consumed values.<V> NamedTopic
realize
(ValueTypeAssertion<V> typeConstraint, ParameterResolver resolver, MapBuilder.Dependencies deps) Realizes aNamedCollection
(possibly "ensuring it") based on the state of the builder, the providedParameterResolver
andMapBuilder
dependencies.Realize aBackingMapManager
to be scoped by the specifiedConfigurableCacheFactory
.<T extends NamedCollection>
booleanDetermines whether thisNamedCollectionBuilder
can realize aNamedCollection
of the specified type.void
Set the flag that indicates whether the topic allows commits for a position in a channel by subscribers that do not own the channelvoid
setChannelCount
(Expression<Integer> expr) Set the number of channels in the topic.void
Set the ElementCalculatorBuilder.void
setEventInterceptorBuilders
(List<NamedEventInterceptorBuilder> listBuilders) void
setExpiryDelay
(Expression<Seconds> expr) Set the amount of time that elements offered to the queue remain visible to consumers.void
setHighUnits
(Expression<com.oracle.coherence.common.util.MemorySize> expr) Set the high-unitsvoid
setPageSize
(Expression<Units> expr) Set the page size.void
Set the amount of time publishers and subscribers will wait between attempts to reconnect after being disconnected.void
Set the maximum amount of time publishers and subscribers will attempt to reconnect after being disconnected.void
Set the amount of time publishers and subscribers will wait before attempts to reconnect after being disconnected.void
setRetainConsumed
(Expression<Boolean> expr) Set whether to retain consumed values.void
setStorageAccessAuthorizer
(Expression<String> exprStorageAccessAuthorizer) Sets theExpression
defining the name of theStorageAccessAuthorizer
.void
setStorageScheme
(CachingScheme scheme) Set theBackingMapScheme
which builds the backing map for the internal caches used to implement this scheme.void
Set the subscriber timeout value.void
setTransient
(Expression<Boolean> expr) Set the transient flag.Methods inherited from class com.tangosol.coherence.config.scheme.DistributedScheme
getBackingMapScheme, getBackupMapConfig, getBundleManager, isRunningClusterNeeded, setBackingMapScheme, setBackupMapConfig, setBundleManager
Methods inherited from class com.tangosol.coherence.config.scheme.AbstractCachingScheme
establishMapListeners, getDefaultParameterResolver, getListenerBuilder, realizeCache, realizeMap, setListenerBuilder, validate
Methods inherited from class com.tangosol.coherence.config.scheme.AbstractServiceScheme
ensureService, getDefaultServiceName, 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
getScopedServiceName, getServiceBuilder, getServiceName, isAutoStart
-
Constructor Details
-
PagedTopicScheme
public PagedTopicScheme()Constructs aPagedTopicScheme
.
-
-
Method Details
-
getServiceType
Return the service type.- Specified by:
getServiceType
in interfaceServiceScheme
- Overrides:
getServiceType
in classDistributedScheme
- Returns:
- the service type
-
realizeBackingMapManager
Description copied from class:AbstractCachingScheme
Realize aBackingMapManager
to be scoped by the specifiedConfigurableCacheFactory
.- Specified by:
realizeBackingMapManager
in interfaceBackingMapManagerBuilder
- Overrides:
realizeBackingMapManager
in classAbstractCachingScheme<com.tangosol.internal.net.service.grid.PartitionedCacheDependencies>
- Parameters:
ccf
- theConfigurableCacheFactory
- Returns:
- a
BackingMapManager
-
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.
-
getStorageScheme
Return theBackingMapScheme
used for the storage of this scheme.- Parameters:
resolver
- potentially override default unit-calculator of BINARY- Returns:
- the scheme
-
getStorageScheme
Return theBackingMapScheme
used 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_COUNT
value 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_COUNT
value to indicate the topic uses the default channel count
-
setStorageScheme
Set theBackingMapScheme
which 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 theExpression
transient. to use to determine whether the backing map is transient.- Returns:
- the
Expression
transient. 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 theExpression
defining the name of theStorageAccessAuthorizer
.- Returns:
- the name of the
StorageAccessAuthorizer
ornull
if one has not been configured.
-
setStorageAccessAuthorizer
@Injectable("storage-authorizer") public void setStorageAccessAuthorizer(Expression<String> exprStorageAccessAuthorizer) Sets theExpression
defining 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:
true
if 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
Returnstrue
if the topic allows commits for a position in a channel by subscribers that do not own the channel.- Parameters:
resolver
- the ParameterResolver- Returns:
true
if 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
-true
if the topic allows commits for a position in a channel by subscribers that do not own the channel orfalse
to 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:
setEventInterceptorBuilders
in classDistributedScheme
- Parameters:
listBuilders
- theList
ofNamedEventInterceptorBuilder
s
-
getEventInterceptorBuilders
Description copied from class:DistributedScheme
Obtains theList
ofNamedEventInterceptorBuilder
s that have been defined for theServiceScheme
.Note: For those
ServiceScheme
s don't support event interceptors, the returned value must be an empty list.- Specified by:
getEventInterceptorBuilders
in interfaceServiceScheme
- Overrides:
getEventInterceptorBuilders
in classDistributedScheme
- Returns:
- an
List
overNamedEventInterceptorBuilder
s
-
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: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:
V
- the element type ofNamedCollection
- Parameters:
typeConstraint
- type constraint assertion for elements of thisNamedCollection
resolver
- the ParameterResolverdeps
- theMapBuilder
dependencies- 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:
ensureConfiguredService
in interfaceTopicScheme<NamedTopic,
TopicService> - Parameters:
resolver
- the ParameterResolverdeps
- theMapBuilder
dependencies- Returns:
- corresponding TopicService for this scheme
-
createConfiguration
public com.tangosol.internal.net.topic.impl.paged.PagedTopicDependencies createConfiguration(ParameterResolver resolver, ClassLoader loader) Create aPagedTopicDependencies
based on the values contained in this scheme.- Parameters:
resolver
- theParameterResolver
to use to resolve configuration valuesloader
- theClassLoader
to use- Returns:
- a
PagedTopicDependencies
based on the values contained in this scheme
-