Package com.gigaspaces.events
Class EventSessionFactory
java.lang.Object
com.gigaspaces.events.EventSessionFactory
Deprecated.
Since 9.7.0 - Use GigaSpace.newDataEventSession instead.
the EventSessionFactory is a static service class that creates DataEventSession objects which are
used to intercept space data events.
the EventSessionFactory is associated with a space and is required in order to create a factory.
once a factory has been created, it can be used to create sessions.
every session is configured according to an EventSessionConfig object.
the following code example shows how to create a session from a factory
and register a listener to it.
the EventSessionFactory is associated with a space and is required in order to create a factory.
once a factory has been created, it can be used to create sessions.
every session is configured according to an EventSessionConfig object.
the following code example shows how to create a session from a factory
and register a listener to it.
EventSessionConfig config = new EventSessionConfig();
config.setFifo(true);
config.setBatch(100, 20000); // size = 100 , time = 20000ms
IJSpace space = ...
EventSessionFactory factory = EventSessionFactory.getFactory(space);
DataEventSession
session = factory.newDataEventSession(config);
Object template = ...
RemoteEventListener listener = ...
session.addListener(template, listener);
- Since:
- 6.0
- Version:
- 1.0
- Author:
- asy ronen
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic EventSessionFactorygetFactory(IJSpace space) Deprecated.Retrieves the EventSessionFactory according to the space.Deprecated.creates a newDataEventSessionusing the default configuration.Deprecated.creates a newDataEventSessionusing the specified configuration.static DataEventSessionnewDataSession(IJSpace space) Deprecated.creates a newDataEventSessionusing the specified space and default configuration.static DataEventSessionnewDataSession(IJSpace space, EventSessionConfig config) Deprecated.creates a newDataEventSessionusing the specified space and configuration.
-
Method Details
-
getFactory
Deprecated.Retrieves the EventSessionFactory according to the space.- Parameters:
space- the associated space- Returns:
- the related factory.
-
newDataSession
Deprecated.creates a newDataEventSessionusing the specified space and default configuration.- Parameters:
space- The space which the session will listen to.- Returns:
- the newly created DataEventSession.
- Throws:
RemoteException- when connection to the space fails.- Since:
- 8.0.4
-
newDataSession
public static DataEventSession newDataSession(IJSpace space, EventSessionConfig config) throws RemoteException Deprecated.creates a newDataEventSessionusing the specified space and configuration.- Parameters:
space- The space which the session will listen to.config- A set of configuration settings used to configure the session.- Returns:
- the newly created DataEventSession.
- Throws:
RemoteException- when connection to the space fails.- Since:
- 8.0.4
-
newDataEventSession
Deprecated.creates a newDataEventSessionusing the default configuration.- Returns:
- the newly created DataEventSession.
- Throws:
RemoteException- when connection to the space fails.- Since:
- 6.5
-
newDataEventSession
Deprecated.creates a newDataEventSessionusing the specified configuration.- Parameters:
config- A set of configuration settings used to configure the session.- Returns:
- the newly created DataEventSession.
- Throws:
RemoteException- when connection to the space fails.- Since:
- 8.0.4
-