public final class GossipProtocol extends Object implements IGossipProtocol
| Modifier and Type | Field and Description |
|---|---|
static String |
GOSSIP_REQ |
| Constructor and Description |
|---|
GossipProtocol(Transport transport,
IMembershipProtocol membership,
GossipConfig config)
Creates new instance of gossip protocol with given memberId, transport and settings.
|
| Modifier and Type | Method and Description |
|---|---|
rx.Observable<Message> |
listen()
Listens for gossips from other cluster members.
|
void |
spread(Message message)
Spreads given message between cluster members.
|
void |
start()
Starts running gossip protocol.
|
void |
stop()
Stops running gossip protocol and releases occupied resources.
|
public static final String GOSSIP_REQ
public GossipProtocol(Transport transport, IMembershipProtocol membership, GossipConfig config)
transport - transportmembership - membership protocolconfig - gossip protocol settingspublic void start()
IGossipProtocolstart in interface IGossipProtocolpublic void stop()
IGossipProtocolstop in interface IGossipProtocolpublic void spread(Message message)
IGossipProtocolspread in interface IGossipProtocolpublic rx.Observable<Message> listen()
IGossipProtocollisten in interface IGossipProtocolCopyright © 2015–2017. All rights reserved.