GigaSpaces XAP.NET Documentation
IDataEventSession Interface
Class LibraryGigaSpaces.Core.EventsIDataEventSession
Provides functionality to add/remove listeners to data events.
Declaration Syntax
C#Visual BasicVisual C++J#
public interface IDataEventSession : IEventSession, 
	IDisposable
Public Interface IDataEventSession _
	Implements IEventSession, IDisposable
public interface class IDataEventSession : IEventSession, 
	IDisposable
public interface IDataEventSession extends IEventSession, 
	IDisposable
Members
All MembersMethodsProperties



IconMemberDescription
AddBatchListener<(Of <(T>)>)(T, EventHandler<(Of <(SpaceBatchDataEventArgs<(Of <(T>)>)>)>))
Registers the listener to the space using the specified template. This can only be used when the IDataEventSession is created with Batch enabled.

AddBatchListener<(Of <(T>)>)(T, EventHandler<(Of <(SpaceBatchDataEventArgs<(Of <(T>)>)>)>), DataEventType)
Registers the listener to the space using the specified template. This can only be used when the IDataEventSession is created with Batch enabled.

AddBatchListener<(Of <(T>)>)(T, EventHandler<(Of <(SpaceBatchDataEventArgs<(Of <(T>)>)>)>), Int64) Obsolete.
Registers the listener to the space using the specified template. This can only be used when the IDataEventSession is created with Batch enabled.

AddBatchListener<(Of <(T>)>)(T, EventHandler<(Of <(SpaceBatchDataEventArgs<(Of <(T>)>)>)>), DataEventType, Int64) Obsolete.
Registers the listener to the space using the specified template. This can only be used when the IDataEventSession is created with Batch enabled.

AddBatchListener<(Of <(T>)>)(IQuery<(Of <(T>)>), EventHandler<(Of <(SpaceBatchDataEventArgs<(Of <(T>)>)>)>))
Registers the listener to the space using the specified template. This can only be used when the IDataEventSession is created with Batch enabled.

AddBatchListener<(Of <(T>)>)(IQuery<(Of <(T>)>), EventHandler<(Of <(SpaceBatchDataEventArgs<(Of <(T>)>)>)>), DataEventType)
Registers the listener to the space using the specified template. This can only be used when the IDataEventSession is created with Batch enabled.

AddBatchListener<(Of <(T>)>)(IQuery<(Of <(T>)>), EventHandler<(Of <(SpaceBatchDataEventArgs<(Of <(T>)>)>)>), Int64) Obsolete.
Registers the listener to the space using the specified template. This can only be used when the IDataEventSession is created with Batch enabled.

AddBatchListener<(Of <(T>)>)(IQuery<(Of <(T>)>), EventHandler<(Of <(SpaceBatchDataEventArgs<(Of <(T>)>)>)>), DataEventType, Int64) Obsolete.
Registers the listener to the space using the specified template. This can only be used when the IDataEventSession is created with Batch enabled.

AddListener<(Of <(T>)>)(T, EventHandler<(Of <(SpaceDataEventArgs<(Of <(T>)>)>)>))
Registers the listener to the space using the specified template.

AddListener<(Of <(T>)>)(T, EventHandler<(Of <(SpaceDataEventArgs<(Of <(T>)>)>)>), DataEventType)
Registers the listener to the space using the specified template.

AddListener<(Of <(T>)>)(T, EventHandler<(Of <(SpaceDataEventArgs<(Of <(T>)>)>)>), Int64) Obsolete.
Registers the listener to the space using the specified template.

AddListener<(Of <(T>)>)(T, EventHandler<(Of <(SpaceDataEventArgs<(Of <(T>)>)>)>), DataEventType, Int64) Obsolete.
Registers the listener to the space using the specified template.

AddListener<(Of <(T>)>)(IQuery<(Of <(T>)>), EventHandler<(Of <(SpaceDataEventArgs<(Of <(T>)>)>)>))
Registers the listener to the space using the specified template.

AddListener<(Of <(T>)>)(IQuery<(Of <(T>)>), EventHandler<(Of <(SpaceDataEventArgs<(Of <(T>)>)>)>), DataEventType)
Registers the listener to the space using the specified template.

AddListener<(Of <(T>)>)(IQuery<(Of <(T>)>), EventHandler<(Of <(SpaceDataEventArgs<(Of <(T>)>)>)>), Int64) Obsolete.
Registers the listener to the space using the specified template.

AddListener<(Of <(T>)>)(IQuery<(Of <(T>)>), EventHandler<(Of <(SpaceDataEventArgs<(Of <(T>)>)>)>), DataEventType, Int64) Obsolete.
Registers the listener to the space using the specified template.

Dispose()()()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from IDisposable.)
RemoveListener(IEventRegistration)
Unregisters the listener from the space.

SessionConfig
Returns the configuration used to create this event session.
(Inherited from IEventSession.)
Space
Returns the space this event session belongs to.
(Inherited from IEventSession.)
Examples
The following class demonstrates subscribing a callback method which is invoked whenever a new instance of type Person is written to the space.
CopyC#
public class Demo
{
    public void Subscribe(ISpaceProxy proxy)
    {
        // Create a new event configuration:
        EventSessionConfig eventConfig = new EventSessionConfig();
        eventConfig.Batch = true;
        eventConfig.BatchSize = 10;
        eventConfig.BatchTime = 1000;
        // Create a new event session:
        IDataEventSession eventSession = proxy.CreateDataEventSession(eventConfig);
        // Subscribe to new persons written to space:
        // NOTE: If you don't need a custom configuration, you can use proxy.DefaultDataEventSession instead.
        eventSession.AddListener<Person>(new Person(), Space_PersonChanged, DataEventType.Write);
    }

    private void Space_PersonChanged(object sender, SpaceDataEventArgs<Person> e)
    {
        // Log the notified person:
        Console.WriteLine("New person in space: " + e.Object.ToString());            
    }
}

Assembly: GigaSpaces.Core (Module: GigaSpaces.Core) Version: 10.0.0.0 (10.0.1.11800)