Public Member Functions | Properties | List of all members
GridGain.IMessaging Interface Reference

Provides functionality for topic-based message exchange among nodes defined by IClusterGroup. Users can send ordered and unordered messages to various topics. Note that same topic name cannot be reused between ordered and unordered messages. All members are thread-safe and may be used concurrently from multiple threads. More...

Inherits GridGain.Common.IAsyncSupport< IMessaging >.

Public Member Functions

void Send (object message, object topic=null)
 Sends a message with specified topic to the nodes in the underlying cluster group. More...
 
void Send (IEnumerable messages, object topic=null)
 Sends messages with specified topic to the nodes in the underlying cluster group. More...
 
void SendAll (IEnumerable messages, object topic=null)
 Sends messages with specified topic to the nodes in the underlying cluster group. More...
 
void SendOrdered (object message, object topic=null, TimeSpan?timeout=null)
 Sends a message with specified topic to the nodes in the underlying cluster group. Messages sent with this method will arrive in the same order they were sent. Note that if a topic is used for ordered messages, then it cannot be reused for non-ordered messages. More...
 
void LocalListen< T > (IMessageFilter< T > filter, object topic=null)
 Adds local listener for given topic on local node only. This listener will be notified whenever any node within the cluster group will send a message for a given topic to this node. Local listen subscription will happen regardless of whether local node belongs to this cluster group or not. More...
 
void StopLocalListen< T > (IMessageFilter< T > filter, object topic=null)
 Unregisters local listener for given topic on local node only. More...
 
Guid RemoteListen< T > (IMessageFilter< T > filter, object topic=null)
 Adds a message listener for a given topic to all nodes in the cluster group (possibly including this node if it belongs to the cluster group as well). This means that any node within this cluster group can send a message for a given topic and all nodes within the cluster group will receive listener notifications. More...
 
void StopRemoteListen (Guid opId)
 Unregisters all listeners identified with provided operation ID on all nodes in the cluster group. More...
 
- Public Member Functions inherited from GridGain.Common.IAsyncSupport< IMessaging >
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< IMessaging >
bool IsAsync [get]
 Gets a value indicating whether this instance is in asynchronous mode. More...
 

Detailed Description

Member Function Documentation

void GridGain.IMessaging.LocalListen< T > ( IMessageFilter< T >  filter,
object  topic = null 
)
Parameters
filterPredicate that is called on each received message. If predicate returns false, then it will be unsubscribed from any further notifications.
topicTopic to subscribe to.
Guid GridGain.IMessaging.RemoteListen< T > ( IMessageFilter< T >  filter,
object  topic = null 
)
Parameters
filterListener predicate.
topicTopic to unsubscribe from.
Returns
Operation ID that can be passed to StopRemoteListen method to stop listening.
void GridGain.IMessaging.Send ( object  message,
object  topic = null 
)
Parameters
messageMessage to send.
topicTopic to send to, null for default topic.
void GridGain.IMessaging.Send ( IEnumerable  messages,
object  topic = null 
)
Parameters
messagesMessages to send.
topicTopic to send to, null for default topic.
void GridGain.IMessaging.SendAll ( IEnumerable  messages,
object  topic = null 
)
Parameters
messagesMessages to send.
topicTopic to send to, null for default topic.
void GridGain.IMessaging.SendOrdered ( object  message,
object  topic = null,
TimeSpan?  timeout = null 
)
Parameters
messageMessage to send.
topicTopic to send to, null for default topic.
timeoutMessage timeout, null for for default value from configuration (IgniteConfiguration.getNetworkTimeout).
void GridGain.IMessaging.StopLocalListen< T > ( IMessageFilter< T >  filter,
object  topic = null 
)
Parameters
filterListener predicate.
topicTopic to unsubscribe from.
void GridGain.IMessaging.StopRemoteListen ( Guid  opId)
Parameters
opIdOperation ID that was returned from RemoteListen<T> method.

Property Documentation

IClusterGroup GridGain.IMessaging.ClusterGroup
get