|
GigaSpaces XAP 10.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.gigaspaces.events.EventSessionFactory
public class EventSessionFactory
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.
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);
DataEventSession,
EventSessionConfig| Method Summary | |
|---|---|
static EventSessionFactory |
getFactory(IJSpace space)
Retrieves the EventSessionFactory according to the space. |
DataEventSession |
newDataEventSession()
creates a new DataEventSession using the default configuration. |
DataEventSession |
newDataEventSession(EventSessionConfig config)
creates a new DataEventSession using the specified configuration. |
DataEventSession |
newDataEventSession(EventSessionConfig config,
Transaction tx)
Deprecated. Since 8.0.4 - Event sessions with transactions are deprecated - use newDataEventSession(EventSessionConfig) instead. |
static DataEventSession |
newDataSession(IJSpace space)
creates a new DataEventSession using the specified space and default configuration. |
static DataEventSession |
newDataSession(IJSpace space,
EventSessionConfig config)
creates a new DataEventSession using the specified space and configuration. |
static DataEventSession |
newDataSession(IJSpace space,
Transaction tx,
String schemaName)
Deprecated. Since 8.0.4 - Event sessions with transactions are deprecated - use newDataSession(IJSpace, EventSessionConfig) instead. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static EventSessionFactory getFactory(IJSpace space)
space - the associated space
public static DataEventSession newDataSession(IJSpace space)
throws RemoteException
DataEventSession using the specified space and default configuration.
space - The space which the session will listen to.
RemoteException - when connection to the space fails.
public static DataEventSession newDataSession(IJSpace space,
EventSessionConfig config)
throws RemoteException
DataEventSession using the specified space and configuration.
space - The space which the session will listen to.config - A set of configuration settings used to configure the session.
RemoteException - when connection to the space fails.
@Deprecated
public static DataEventSession newDataSession(IJSpace space,
Transaction tx,
String schemaName)
throws IOException
newDataSession(IJSpace, EventSessionConfig) instead.
space - the bounded spacetx - the bounded transaction. NULL if no transaction is needed.schemaName - the name of the predefined configuration schema
IOException - when schema name is invalid or when connection to the space fails.
public DataEventSession newDataEventSession()
throws RemoteException
DataEventSession using the default configuration.
RemoteException - when connection to the space fails.
public DataEventSession newDataEventSession(EventSessionConfig config)
throws RemoteException
DataEventSession using the specified configuration.
config - A set of configuration settings used to configure the session.
RemoteException - when connection to the space fails.
@Deprecated
public DataEventSession newDataEventSession(EventSessionConfig config,
Transaction tx)
throws RemoteException
newDataEventSession(EventSessionConfig) instead.
DataEventSession using the specified configuration and transaction.
config - A set of configuration settings used to configure the session.tx - the bounded transaction. NULL if no transaction is needed.
RemoteException - when connection to the space fails.
|
GigaSpaces XAP 10.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||