public class TCPGOSSIP extends Discovery
The FIND_INITIAL_MBRS event will eventually be answered with a FIND_INITIAL_MBRS_OK event up the stack.
Discovery.PingSenderTask, Discovery.Responsesbreak_on_coord_rsp, group_addr, is_server, local_addr, max_found_members, max_rank, members, num_discovery_requests, num_initial_members, num_initial_srv_members, num_ping_requests, ping_responses, rank, return_entire_cache, sender, stagger_timeout, timeout, timer, view| Constructor and Description |
|---|
TCPGOSSIP() |
| Modifier and Type | Method and Description |
|---|---|
void |
addInitialHost(String hostname,
int port) |
protected void |
connect(RouterStub stub,
String group,
Address logical_addr) |
protected void |
connectAllStubs(String group,
Address logical_addr) |
void |
destroy()
This method is called on a
Channel.close(). |
List<InetSocketAddress> |
getInitialHosts() |
void |
handleConnect() |
void |
handleDisconnect() |
void |
init()
Called after instance has been created (null constructor) and before protocol is started.
|
boolean |
isDynamic() |
boolean |
removeInitialHost(String hostname,
int port) |
void |
sendGetMembersRequest(String cluster_name,
Promise promise,
ViewId view_id) |
void |
setInitialHosts(List<InetSocketAddress> hosts) |
void |
start()
This method is called on a
Channel.connect(String). |
void |
stop()
This method is called on a
Channel.disconnect(). |
deserialize, discoveryRequestReceived, down, findAllViews, findAllViewsAsString, findInitialMembers, findInitialMembersAsString, findMembers, getNumberOfDiscoveryRequestsSent, getNumInitialMembers, getNumPingRequests, getTimeout, getView, getViewId, makeView, providedUpServices, resetStats, sendDiscoveryResponse, serializeWithoutView, setNumInitialMembers, setNumPingRequests, setTimeout, updownThreadEnabled, dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getId, getLevel, getName, getProperties, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getValue, isErgonomics, printStats, providedDownServices, requiredDownServices, requiredUpServices, setDownProtocol, setErgonomics, setId, setLevel, setProperties, setPropertiesInternal, setProperty, setProtocolStack, setSocketFactory, setUpProtocol, setValue, setValues, statsEnabled, upThreadEnabledpublic void setInitialHosts(List<InetSocketAddress> hosts)
public List<InetSocketAddress> getInitialHosts()
public void init()
throws Exception
Protocolpublic void start()
throws Exception
ProtocolChannel.connect(String). Starts work.
Protocols are connected and queues are ready to receive events.
Will be called from bottom to top. This call will replace
the START and START_OK events.start in class DiscoveryException - Thrown if protocol cannot be started successfully. This will cause the ProtocolStack
to fail, so Channel.connect(String) will throw an exceptionpublic void stop()
ProtocolChannel.disconnect(). Stops work (e.g. by closing multicast socket).
Will be called from top to bottom. This means that at the time of the method invocation the
neighbor protocol below is still working. This method will replace the
STOP, STOP_OK, CLEANUP and CLEANUP_OK events. The ProtocolStack guarantees that
when this method is called all messages in the down queue will have been flushedpublic void destroy()
ProtocolChannel.close().
Does some cleanup; after the call the VM will terminatepublic void handleConnect()
handleConnect in class Discoverypublic void handleDisconnect()
handleDisconnect in class Discoverypublic void sendGetMembersRequest(String cluster_name, Promise promise, ViewId view_id) throws Exception
sendGetMembersRequest in class DiscoveryExceptionpublic void addInitialHost(String hostname, int port)
public boolean removeInitialHost(String hostname, int port)
protected void connect(RouterStub stub, String group, Address logical_addr)
Copyright © 2015 JBoss, a division of Red Hat. All rights reserved.