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.Responses
break_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, up
dumpStats, 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, statsEnabled
public void setInitialHosts(List<InetSocketAddress> hosts)
public List<InetSocketAddress> getInitialHosts()
public void init() throws Exception
Protocol
public void start() throws Exception
Protocol
Channel.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 Discovery
Exception
- Thrown if protocol cannot be started successfully. This will cause the ProtocolStack
to fail, so Channel.connect(String)
will throw an exceptionpublic void stop()
Protocol
Channel.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()
Protocol
Channel.close()
.
Does some cleanup; after the call the VM will terminatepublic void handleConnect()
handleConnect
in class Discovery
public void handleDisconnect()
handleDisconnect
in class Discovery
public Collection<PhysicalAddress> fetchClusterMembers(String cluster_name)
Discovery
fetchClusterMembers
in class Discovery
public boolean sendDiscoveryRequestsInParallel()
Discovery
Discovery.fetchClusterMembers(String)
sequentiallysendDiscoveryRequestsInParallel
in class Discovery
public 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.