Inheritance diagram for MessageConsumer:
Public Member Functions | |
this (Cluster cluster, IEvent event) | |
protected void | invoke (IEvent event, IPayload payload) |
Private Member Functions | |
this (ISocketReader reader, IBuffer buffer) | |
void | notify (IBuffer buffer) |
Cluster | getCluster () |
void | pauseGroup () |
void | resumeGroup () |
void | cancel () |
Definition at line 607 of file Cluster.d.
|
Construct a multicast consumer for the specified event Reimplemented from BulletinConsumer. |
|
override the default processing to sweep the cluster for queued entries. Each server node is queried until one is found that contains a payload. Note that it is possible to set things up where we are told exactly which node to go to; howerver given that we won't be listening whilst scanning, and that there's likely to be a group of new entries in the cluster, it's just as effective to scan. This will be far from ideal for all environments, so we should make the strategy plugable instead. Reimplemented from BulletinConsumer. Definition at line 645 of file Cluster.d. References IEvent::getChannel(), Cluster::getQueue(), IEvent::invoke(), BulletinConsumer::pauseGroup(), and BulletinConsumer::resumeGroup(). |
|
Construct a listener with the requisite arguments. The specified buffer is populated via the provided instance of ISocketReader before being passed to the notify() method. All arguments are required. Definition at line 81 of file SocketListener.d. |
|
Notification callback invoked when we receive a multicast packet. Note that we check the packet channel-name against the one we're consuming, to check for cases where the group address had a hash collision. Reimplemented from SocketListener. Definition at line 508 of file Cluster.d. References BulletinConsumer::event, IEvent::getChannel(), IChannel::getName(), ProtocolReader::getPayload(), and BulletinConsumer::invoke(). |
|
Return the cluster instance we're associated with. |
|
Temporarily halt listening. This can be used to ignore multicast messages while, for example, the consumer is busy doing other things. Definition at line 563 of file Cluster.d. References MulticastSocket::pauseGroup(). Referenced by invoke(). |
|
Resume listening, post-pause. Definition at line 574 of file Cluster.d. References MulticastSocket::resumeGroup(). Referenced by invoke(). |
|
Cancel this consumer. The listener is effectively disabled from this point forward. The listener thread does not halt at this point, but waits until the socket-read returns. Note that the D Interface implementation requires us to "reimplement and dispatch" trivial things like this ~ it's a pain in the neck to maintain. Reimplemented from IConsumer. |