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.Responsesbreak_on_coord_rsp, current_coord, force_sending_discovery_rsps, group_addr, is_coord, is_leaving, is_server, local_addr, members, num_discovery_requests, num_initial_members, num_initial_srv_members, ping_responses, return_entire_cache, 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(). |
Collection<PhysicalAddress> |
fetchClusterMembers(String cluster_name)
Grab all current cluster members
|
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) |
boolean |
sendDiscoveryRequestsInParallel()
Whether or not to send each discovery request on a separate (timer) thread.
|
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, getCurrentCoord, getNumberOfDiscoveryRequestsSent, getNumInitialMembers, getTimeout, getView, getViewId, isMergeRunning, providedUpServices, resetStats, sendDiscoveryRequest, sendDiscoveryResponse, sendMcastDiscoveryRequest, serializeWithoutView, setForceSendingDiscoveryRsps, setNumInitialMembers, setTimeout, updumpStats, enableStats, getConfigurableObjects, getDownProtocol, getId, getLevel, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getValue, isErgonomics, printStats, providedDownServices, requiredDownServices, requiredUpServices, resetStatistics, setDownProtocol, setErgonomics, setId, setLevel, setProtocolStack, setSocketFactory, setUpProtocol, setValue, setValues, statsEnabledpublic 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 Collection<PhysicalAddress> fetchClusterMembers(String cluster_name)
DiscoveryfetchClusterMembers in class Discoverypublic boolean sendDiscoveryRequestsInParallel()
DiscoveryDiscovery.fetchClusterMembers(String) sequentiallysendDiscoveryRequestsInParallel in class Discoverypublic void addInitialHost(String hostname, int port)
public boolean removeInitialHost(String hostname, int port)
protected void connect(RouterStub stub, String group, Address logical_addr)
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.