Class PagedQueueScheme
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.PagedQueueScheme
- All Implemented Interfaces:
BackingMapManagerBuilder
,MapBuilder
,NamedCacheBuilder
,NamedCollectionBuilder<com.tangosol.internal.net.queue.NamedMapQueue>
,ServiceBuilder
,BundlingScheme
,CachingScheme
,ClusteredCachingScheme
,NamedQueueScheme<com.tangosol.internal.net.queue.NamedMapQueue>
,ObservableCachingScheme
,QueueScheme<com.tangosol.internal.net.queue.NamedMapQueue,
,QueueService> Scheme
,ServiceScheme
public class PagedQueueScheme
extends DistributedScheme
implements NamedQueueScheme<com.tangosol.internal.net.queue.NamedMapQueue>
A
PagedQueueScheme
is responsible for building a queue.-
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
FieldsModifier and TypeFieldDescriptionstatic final PagedQueueScheme
A singleton instance of thePagedQueueScheme
.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 TypeMethodDescriptioncom.tangosol.internal.net.queue.PagedQueueDependencies
createConfiguration
(ParameterResolver resolver, ClassLoader loader) Create aPagedQueueDependencies
based on the values contained in this scheme.ensureConfiguredService
(ParameterResolver resolver, MapBuilder.Dependencies deps) Ensure service and its queue configuration.getNamedCollectionBuilder
(Class<? extends NamedCollection> clz, com.oracle.coherence.common.util.Options<NamedCollection.Option> options) getPageSize
(ParameterResolver resolver) Return the binary limit of the size of a page in a queue.Return the service type.<V> com.tangosol.internal.net.queue.NamedMapQueue
<?, V> 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.<T extends NamedCollection>
booleanDetermines whether thisNamedCollectionBuilder
can realize aNamedCollection
of the specified type.void
setEventInterceptorBuilders
(List<NamedEventInterceptorBuilder> listBuilders) void
setPageSize
(Expression<Units> expr) Set the page size.Methods inherited from class com.tangosol.coherence.config.scheme.DistributedScheme
getBackingMapScheme, getBackupMapConfig, getBundleManager, getEventInterceptorBuilders, isRunningClusterNeeded, setBackingMapScheme, setBackupMapConfig, setBundleManager
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
ensureService, getDefaultServiceName, getScopedServiceName, getScopeName, getServiceBuilder, getServiceDependencies, getServiceName, getXml, injectScopeNameIntoService, isAutoStart, realizeService, setApplicationContext, 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.NamedQueueScheme
realize, realize, realize, realize
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
-
Field Details
-
INSTANCE
A singleton instance of thePagedQueueScheme
.
-
-
Constructor Details
-
PagedQueueScheme
public PagedQueueScheme()Constructs aPagedQueueScheme
.
-
-
Method Details
-
getServiceType
Return the service type.- Specified by:
getServiceType
in interfaceServiceScheme
- Overrides:
getServiceType
in classDistributedScheme
- Returns:
- the service type
-
realizes
Description copied from interface:NamedCollectionBuilder
Determines whether thisNamedCollectionBuilder
can realize aNamedCollection
of the specified type.- Specified by:
realizes
in interfaceNamedCollectionBuilder<com.tangosol.internal.net.queue.NamedMapQueue>
- 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.
-
getNamedCollectionBuilder
public PagedQueueScheme getNamedCollectionBuilder(Class<? extends NamedCollection> clz, com.oracle.coherence.common.util.Options<NamedCollection.Option> options) - Specified by:
getNamedCollectionBuilder
in interfaceServiceScheme
-
getPageSize
Return the binary limit of the size of a page in a queue. 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
-
setEventInterceptorBuilders
@Injectable("interceptors") public void setEventInterceptorBuilders(List<NamedEventInterceptorBuilder> listBuilders) Description copied from class:DistributedScheme
- Overrides:
setEventInterceptorBuilders
in classDistributedScheme
- Parameters:
listBuilders
- theList
ofNamedEventInterceptorBuilder
s
-
realize
public <V> com.tangosol.internal.net.queue.NamedMapQueue<?,V> 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<com.tangosol.internal.net.queue.NamedMapQueue>
- 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 QueueService ensureConfiguredService(ParameterResolver resolver, MapBuilder.Dependencies deps) Ensure service and its queue configuration.DistributedQueueConfiguration is registered in corresponding service's resource registry.
- Specified by:
ensureConfiguredService
in interfaceQueueScheme<com.tangosol.internal.net.queue.NamedMapQueue,
QueueService> - Parameters:
resolver
- the ParameterResolverdeps
- theMapBuilder
dependencies- Returns:
- corresponding QueueService for this scheme
-
createConfiguration
public com.tangosol.internal.net.queue.PagedQueueDependencies createConfiguration(ParameterResolver resolver, ClassLoader loader) Create aPagedQueueDependencies
based on the values contained in this scheme.- Parameters:
resolver
- theParameterResolver
to use to resolve configuration valuesloader
- theClassLoader
to use- Returns:
- a
PagedQueueDependencies
based on the values contained in this scheme
-