public class BPING extends PING implements Runnable
Discovery.Responses
Modifier and Type | Field and Description |
---|---|
protected int |
bind_port |
protected String |
dest |
protected InetAddress |
dest_addr |
protected int |
port_range |
protected Thread |
receiver |
protected DatagramSocket |
sock |
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 |
---|
BPING() |
Modifier and Type | Method and Description |
---|---|
int |
getBindPort() |
void |
init()
Called after instance has been created (null constructor) and before protocol is started.
|
void |
run() |
protected void |
sendMcastDiscoveryRequest(Message msg) |
void |
setBindPort(int bind_port) |
void |
start()
This method is called on a
Channel.connect(String) . |
void |
stop()
This method is called on a
Channel.disconnect() . |
fetchClusterMembers, isDynamic, sendDiscoveryRequestsInParallel
deserialize, discoveryRequestReceived, down, findAllViews, findAllViewsAsString, findInitialMembers, findInitialMembersAsString, findMembers, getCurrentCoord, getNumberOfDiscoveryRequestsSent, getNumInitialMembers, getTimeout, getView, getViewId, handleConnect, handleDisconnect, isMergeRunning, providedUpServices, resetStats, sendDiscoveryRequest, sendDiscoveryResponse, serializeWithoutView, setForceSendingDiscoveryRsps, setNumInitialMembers, setTimeout, up
destroy, 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
protected String dest
protected int bind_port
protected int port_range
protected DatagramSocket sock
protected volatile Thread receiver
protected InetAddress dest_addr
public int getBindPort()
public void setBindPort(int bind_port)
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 flushedprotected void sendMcastDiscoveryRequest(Message msg)
sendMcastDiscoveryRequest
in class Discovery
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.