Registers the listener to the space using the specified template.
This can only be used when the IDataEventSession is created with Batch enabled.
Declaration Syntax
C# | Visual Basic | Visual C++ | J# |
[ObsoleteAttribute("Since 9.7 - Data event registration with custom lease is deprecated")] IEventRegistration AddBatchListener<T>( IQuery<T> query, EventHandler<SpaceBatchDataEventArgs<T>> listener, long leaseTime )
<ObsoleteAttribute("Since 9.7 - Data event registration with custom lease is deprecated")> _ Function AddBatchListener(Of T) ( _ query As IQuery(Of T), _ listener As EventHandler(Of SpaceBatchDataEventArgs(Of T)), _ leaseTime As Long _ ) As IEventRegistration
[ObsoleteAttribute(L"Since 9.7 - Data event registration with custom lease is deprecated")] generic<typename T> IEventRegistration^ AddBatchListener( IQuery<T>^ query, EventHandler<SpaceBatchDataEventArgs<T>^>^ listener, long long leaseTime )
Generic Template Parameters
- T
- Type of object to listen to.
Parameters
- query (IQuery<(Of <(T>)>))
- The query used for matching.
- listener (EventHandler<(Of <(SpaceBatchDataEventArgs<(Of <(T>)>)>)>))
- The listener which will handle notifications.
- leaseTime (Int64)
- The time duration in which the listener will be receiving calls.
Return Value
An event registration token.
Exceptions
Exception | Condition |
---|---|
SqlQueryException | The query template is an illegal SqlQuery. |