GigaSpaces XAP.NET Documentation
PollingEventListenerContainer<(Of <(TData>)>) Class
Class LibraryGigaSpaces.XAP.Events.PollingPollingEventListenerContainer<(Of <(TData>)>)
Event listener container that uses a receive operation handler to poll for events and allows to subscribe to DataEventArrived that will be triggered by a successfull receive operation, Usally used in conjuction with the Take<(Of <(T>)>)(T, ITransaction, Int64) API. This container also allow for transactional reception of messages. Event reception and listener execution can automatically be wrapped in transactions through passing an ITransactionManager into the TransactionManager property. Actual event listener execution happens in a concurrent asynchronous manner, initially MinConcurrentConsumers consumers will be created. Dynamic scaling of the number of concurrent consumers can be activated through specifying a MaxConcurrentConsumers value that is higher than the MinConcurrentConsumers value. The scale is done both ways, scale up when necessary and scale down when some of the invokers are idle. A consumer is considered idle when IdleIterationsThreshold cycles has passed and it didn't trigger any event, the scaling rate is determined by DynamicScaleSampleRate property, its specifies the rate in which to sample the load of the concurrent consumers for scaling up or down.
Note:Using more than one consumer might break fifo behaviour if fifo is configured by the space or the specific class type.
Declaration Syntax
C#Visual BasicVisual C++J#
public class PollingEventListenerContainer<TData> : EventListenerContainer<TData>
Public Class PollingEventListenerContainer(Of TData) _
	Inherits EventListenerContainer(Of TData)
generic<typename TData>
public ref class PollingEventListenerContainer : public EventListenerContainer<TData>
J# supports the use of generic APIs, but not the declaration of new ones.
Generic Template Parameters
TData
Type of data which the container monitors for events.
Members
All MembersConstructorsMethodsPropertiesFieldsEvents



IconMemberDescription
PollingEventListenerContainer<(Of <(TData>)>)()()()
Creates a container without configuration.

PollingEventListenerContainer<(Of <(TData>)>)(ISpaceProxy)
Creates a container with the specified space proxy.

PollingEventListenerContainer<(Of <(TData>)>)(ISpaceProxy, Object)
Creates a container with the specified space proxy and template.

_failedEvents
Number of failed events
(Inherited from EventListenerContainer<(Of <(TData>)>).)
_processedEvents
Number of processed events
(Inherited from EventListenerContainer<(Of <(TData>)>).)
ActiveConcurrentConsumers
Gets the currently active concurrent consumers, this number can be anywhere between MinConcurrentConsumers to MaxConcurrentConsumers

ActualTemplate
Gets the actual template that is used for event listening. If PerformSnapshot is true, this will be the snapshot result of the Template.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
AssertNotActive(String)
Asserts that the container is not running currently, and if it does throws InvalidEventListenerOperationException.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
BatchDataEventArrived
Occurs when a batch data event arrives.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
BatchDataEventArrivedHasSubscriptions()()()
Returns true if BatchDataEventArrived has subscriptions, false otherwise.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
CloneEventListenersPerThread
Gets or sets whether to clone the event listener containing classes when the container is invoking the DataEventArrived event from more than one thread
(Inherited from EventListenerContainer<(Of <(TData>)>).)
ContainerExceptionOccured
Occurs when an exception is thrown during the container's asynchronous life-cycle.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
DataEventArrived
Occurs when a data event arrives.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
DataEventArrivedHasSubscriptions()()()
Returns true if DataEventArrived has subscriptions, false otherwise.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
DefaultDynamicScaleSampleRate
Default value for DynamicScaleSampleRate.

DefaultIdleIterationsThreshold
Default value for IdleIterationsThreshold.

DefaultMaxConcurrentConsumers
Default value for MaxConcurrentConsumers.

DefaultMinConcurrentConsumers
Default value for MinConcurrentConsumers.

DefaultReceiveBatchSize
Default value for ReceiveBatchSize.

DefaultReceiveTimeout
Default value for ReceiveTimeout.

Dispose()()()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
DynamicScaleSampleRate
Gets or sets the rate in which to sample the consumers load for scaling up or down. The number represent every how many polling iterations to sample. The value can't be less than 1.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
GetContainerNameLoggingPrefix()()()
Creates a container logging prefix.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
GetHashCode()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()
Gets the Type of the current instance.
(Inherited from Object.)
IdleIterationsThreshold
Gets or sets the number of idle polling iterations (A polling operation that didn't trigger an event) that when reached define the consumer as idle. The value can't be less than 1.

InitTransaction()()()
Creates a transaction using the supplied TransactionManager, it takes into consideration the TransactionTimeout if it was set to override the default manager timeout.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
InvokeBatchDataEventArrived(Object, BatchDataEventArgs<(Of <(TData>)>))
Invokes BatchDataEventArrived event.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
InvokeContainerExceptionOccured(Object, ContainerExceptionEventArgs)
Invokes ContainerExceptionOccured event.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
InvokeDataEventArrived(Object, DataEventArgs<(Of <(TData>)>))
Invokes DataEventArrived event.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
InvokeUserExceptionOccured(Object, UserExceptionEventArgs<(Of <(TData>)>))
Invokes UserExceptionOccured event.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
IsActive
Returns true if the container is currently listening to events, false otherwise.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
IsBatch
Returns true if the listener is in batch mode, false otherwise.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
MaxConcurrentConsumers
The maximum number of concurrent consumers, that can be scaled up to on demand, that polls and then executes events, this number can't be less than MinConcurrentConsumers.

MemberwiseClone()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
MinConcurrentConsumers
The minimum number of concurrent consumers that polls and then executes events, this number can't be higher than MaxConcurrentConsumers and can't be less than 1.

Mode
Gets the space mode that container is aware of
(Inherited from EventListenerContainer<(Of <(TData>)>).)
Name
Gets or sets the name of the container. This property is not required, but setting a friendly name might be helpful in debugging scenarios.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
OnBecomeNotPrimary()()()
Execute container logic that should be done when the underlying space behind the proxy is no longer primary, this method should not block.
(Overrides EventListenerContainer<(Of <(TData>)>).OnBecomeNotPrimary()()().)
OnBecomePrimary()()()
Execute container logic that should be done when the underlying space behind the proxy becomes primary, this method should not block.
(Overrides EventListenerContainer<(Of <(TData>)>).OnBecomePrimary()()().)
OnStart()()()
Execute container logic that should be done when the container is started, this method should not block. The container is space mode aware, and should do its work in OnBecomePrimary()()().
(Overrides EventListenerContainer<(Of <(TData>)>).OnStart()()().)
OnStop(Int32)
Execute container logic that should be done when the container is stopped, this method should not block.
(Overrides EventListenerContainer<(Of <(TData>)>).OnStop(Int32).)
PerformSnapshot
Gets or sets whether to perform an Snapshot<(Of <(T>)>)(T) on the Template for improved performance.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
ReceiveBatchSize
Gets or sets the batch size parameter which is passed to the ReceiveOperationHandler when subscribed to batch events.

ReceiveOperationHandler
Gets or sets the receive operation handler that will be used in each polling iteration. The receive operation handler executes a polling logic every iteration and any non null return value triggers the event.

ReceiveTimeout
Gets or sets the timeout parameter which is passed to the ReceiveOperationHandler each poll.

SpaceProxy
Gets or sets the proxy to the space which should be listened to.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
Start()()()
Starts listening to events.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
Stop()()()
Stops listening to events. Execution is blocked until the container is fully stopped.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
Stop(TimeSpan)
Stops listening to events. Execution is blocked until the container is fully stopped or the specified timeout elapses.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
Stop(Int32)
Stops listening to events. Execution is blocked until the container is fully stopped or the specified timeout elapses.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
Template
Gets or sets the template that determines which entries this container should listen for.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
ToString()()()
Returns a String that represents the current Object.
(Inherited from Object.)
TransactionManager
Gets or sets the transaction manager that will be used to create transactions for the event listening and handling operations. If null, no transactions will be used.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
TransactionTimeout
Gets or sets a transaction timeout value to override the default value in the TransactionManager property.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
TransactionType
Gets or sets the TransactionType. When Manual is used, the transaction type will be determined by the TransactionManager.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
TriggerOperationHandler
Gets or sets the trigger operation handler that will be used in each polling iteration. The trigger operation handlers executes its logic out side the transacional context and before a transaction is created, doing so allows to reduce the overhead of creating a transaction for each polling operation that might be an idle iteration.

UserExceptionOccured
Occurs when an exception is thrown while DataEventArrived is processed.
(Inherited from EventListenerContainer<(Of <(TData>)>).)
Validate()()()
Validate that the container is configured properly The container is not configured properly.
(Overrides EventListenerContainer<(Of <(TData>)>).Validate()()().)
Inheritance Hierarchy
Object
EventListenerContainer<(Of <(TData>)>)
 PollingEventListenerContainer<(Of <(TData>)>)

Assembly: GigaSpaces.Core (Module: GigaSpaces.Core) Version: 7.0.1.3800 (7.0.1.3800)