
Provides functionality for local and remote event notifications on nodes defined by ClusterGroup. All members are thread-safe and may be used concurrently from multiple threads. More...
Inherits GridGain.Common.IAsyncSupport< IEvents >.
Public Member Functions | |
| List< T > | RemoteQuery< T > (IEventFilter< T > filter, TimeSpan?timeout=null, params int[] types) |
| Queries nodes in this cluster group for events using passed in predicate filter for event selection. More... | |
| Guid | RemoteListen< T > (int bufSize=1, TimeSpan?interval=null, bool autoUnsubscribe=true, IEventFilter< T > localListener=null, IEventFilter< T > remoteFilter=null, params int[] types) |
| Adds event listener for specified events to all nodes in the cluster group (possibly including local node if it belongs to the cluster group as well). This means that all events occurring on any node within this cluster group that pass remote filter will be sent to local node for local listener notifications. The listener can be unsubscribed automatically if local node stops, if localListener callback returns false or if StopRemoteListen is called. More... | |
| void | StopRemoteListen (Guid opId) |
| Stops listening to remote events. This will unregister all listeners identified with provided operation ID on all nodes defined by ClusterGroup. More... | |
| IEvent | WaitForLocal (params int[] types) |
| Waits for the specified events. More... | |
| T | WaitForLocal< T > (IEventFilter< T > filter, params int[] types) |
| Waits for the specified events. More... | |
| List< IEvent > | LocalQuery (params int[] types) |
| Queries local node for events using of specified types. More... | |
| void | RecordLocal (IEvent evt) |
| Records customer user generated event. All registered local listeners will be notified. NOTE: all types in range from 1 to 1000 are reserved for internal Ignite events and should not be used by user-defined events. Attempt to record internal event with this method will cause ArgumentException to be thrown. More... | |
| void | LocalListen< T > (IEventFilter< T > listener, params int[] types) |
| Adds an event listener for local events. Note that listener will be added regardless of whether local node is in this cluster group or not. More... | |
| bool | StopLocalListen< T > (IEventFilter< T > listener, params int[] types) |
| Removes local event listener. More... | |
| void | EnableLocal (params int[] types) |
| Enables provided events. Allows to start recording events that were disabled before. Note that provided events will be enabled regardless of whether local node is in this cluster group or not. More... | |
| void | DisableLocal (params int[] types) |
| Disables provided events. Allows to stop recording events that were enabled before. Note that specified events will be disabled regardless of whether local node is in this cluster group or not. More... | |
| int[] | GetEnabledEvents () |
| Gets types of enabled events. More... | |
| bool | IsEnabled (int type) |
| Determines whether the specified event is enabled. More... | |
Public Member Functions inherited from GridGain.Common.IAsyncSupport< IEvents > | |
| TWithAsync | WithAsync () |
| Gets component with asynchronous mode enabled. More... | |
| IFuture | GetFuture () |
| Gets and resets future for previous asynchronous operation. More... | |
| IFuture< TResult > | GetFuture< TResult > () |
| Gets and resets future for previous asynchronous operation. More... | |
Properties | |
| IClusterGroup | ClusterGroup [get] |
| Gets the cluster group to which this instance belongs. More... | |
Properties inherited from GridGain.Common.IAsyncSupport< IEvents > | |
| bool | IsAsync [get] |
| Gets a value indicating whether this instance is in asynchronous mode. More... | |
| void GridGain.Events.IEvents.DisableLocal | ( | params int[] | types | ) |
| types | Events to disable. |
| void GridGain.Events.IEvents.EnableLocal | ( | params int[] | types | ) |
| types | Events to enable. |
| int [] GridGain.Events.IEvents.GetEnabledEvents | ( | ) |
| bool GridGain.Events.IEvents.IsEnabled | ( | int | type | ) |
| type | Event type. |
| void GridGain.Events.IEvents.LocalListen< T > | ( | IEventFilter< T > | listener, |
| params int[] | types | ||
| ) |
| T | Type of events. |
| listener | Predicate that is called on each received event. If predicate returns false, it will be unregistered and will stop receiving events. |
| types | Event types for which this listener will be notified, should not be empty. |
| T | : | IEvent |
| List<IEvent> GridGain.Events.IEvents.LocalQuery | ( | params int[] | types | ) |
| types | Event types to be queried. Optional. |
| void GridGain.Events.IEvents.RecordLocal | ( | IEvent | evt | ) |
| evt | Locally generated event. |
| ArgumentException | If event type is within Ignite reserved range (1 � 1000) |
| Guid GridGain.Events.IEvents.RemoteListen< T > | ( | int | bufSize = 1, |
| TimeSpan? | interval = null, |
||
| bool | autoUnsubscribe = true, |
||
| IEventFilter< T > | localListener = null, |
||
| IEventFilter< T > | remoteFilter = null, |
||
| params int[] | types | ||
| ) |
| T | Type of events. |
| bufSize | Remote events buffer size. Events from remote nodes won't be sent until buffer is full or time interval is exceeded. |
| interval | Maximum time interval after which events from remote node will be sent. Events from remote nodes won't be sent until buffer is full or time interval is exceeded. |
| autoUnsubscribe | Flag indicating that event listeners on remote nodes should be automatically unregistered if master node (node that initiated event listening) leaves topology. If this flag is false, listeners will be unregistered only when StopRemoteListen method is called, or the localListener returns false. |
| localListener | Listener callback that is called on local node. If null, these events will be handled on remote nodes by passed in remoteFilter. |
| remoteFilter | Filter callback that is called on remote node. Only events that pass the remote filter will be sent to local node. If null, all events of specified types will be sent to local node. This remote filter can be used to pre-handle events remotely, before they are passed in to local callback. It will be auto-unsubscribed on the node where event occurred in case if it returns false. |
| types | Types of events to listen for. If not provided, all events that pass the provided remote filter will be sent to local node. |
| T | : | IEvent |
| List<T> GridGain.Events.IEvents.RemoteQuery< T > | ( | IEventFilter< T > | filter, |
| TimeSpan? | timeout = null, |
||
| params int[] | types | ||
| ) |
| T | Type of events. |
| filter | Predicate filter used to query events on remote nodes. |
| timeout | Maximum time to wait for result, null or 0 to wait forever. |
| types | Event types to be queried. |
| T | : | IEvent |
| bool GridGain.Events.IEvents.StopLocalListen< T > | ( | IEventFilter< T > | listener, |
| params int[] | types | ||
| ) |
| T | Type of events. |
| listener | Local event listener to remove. |
| types | Types of events for which to remove listener. If not specified, then listener will be removed for all types it was registered for. |
| T | : | IEvent |
| void GridGain.Events.IEvents.StopRemoteListen | ( | Guid | opId | ) |
| opId | Operation ID that was returned from RemoteListen<T>. |
| IEvent GridGain.Events.IEvents.WaitForLocal | ( | params int[] | types | ) |
| types | Types of the events to wait for. If not provided, all events will be passed to the filter. |
| T GridGain.Events.IEvents.WaitForLocal< T > | ( | IEventFilter< T > | filter, |
| params int[] | types | ||
| ) |
| T | Type of events. |
| filter | Optional filtering predicate. Event wait will end as soon as it returns false. |
| types | Types of the events to wait for. If not provided, all events will be passed to the filter. |
| T | : | IEvent |
|
get |
1.8.11