public class BPING extends PING implements java.lang.Runnable
限定符和类型 | 字段和说明 |
---|---|
protected int |
bind_port |
protected java.lang.String |
dest |
protected java.net.InetAddress |
dest_addr |
protected int |
port_range |
protected java.lang.Thread |
receiver |
protected java.net.DatagramSocket |
sock |
always_send_physical_addr_with_discovery_request, async_discovery, break_on_coord_rsp, cluster_name, current_coord, discovery_rsp_expiry_time, force_sending_discovery_rsps, is_coord, is_leaving, is_server, local_addr, max_members_in_discovery_request, members, num_discovery_requests, num_initial_members, num_initial_srv_members, ping_responses, return_entire_cache, stagger_timeout, timeout, timer, transport_supports_multicasting, use_disk_cache, view, WHITESPACE
构造器和说明 |
---|
BPING() |
限定符和类型 | 方法和说明 |
---|---|
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() . |
findMembers, isDynamic, sendDiscoveryRequest
addDiscoveryResponseToCaches, addResponse, addressAsString, addToCache, breakOnCoordResponse, breakOnCoordResponse, deserialize, discoveryRequestReceived, down, dumpCache, findInitialMembersAsString, findMembers, forceDiscoveryResponses, forceDiscoveryResponses, getCurrentCoord, getNumberOfDiscoveryRequestsSent, getNumInitialMembers, getTimeout, getView, getViewId, handleConnect, handleDisconnect, handleDiscoveryResponse, isCoord, isMergeRunning, marshal, numInitialMembers, numInitialMembers, providedUpServices, read, readPingData, resetStats, returnEntireCache, returnEntireCache, sendDiscoveryResponse, serializeWithoutView, setForceSendingDiscoveryRsps, setNumInitialMembers, setTimeout, staggerTimeout, staggerTimeout, timeout, timeout, up, useDiskCache, useDiskCache, write
accept, destroy, dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, isErgonomics, level, parse, printStats, providedDownServices, requiredDownServices, requiredUpServices, resetStatistics, setDownProtocol, setErgonomics, setId, setLevel, setProtocolStack, setSocketFactory, setUpProtocol, setValue, setValues, statsEnabled, up
protected java.lang.String dest
protected int bind_port
protected int port_range
protected java.net.DatagramSocket sock
protected volatile java.lang.Thread receiver
protected java.net.InetAddress dest_addr
public int getBindPort()
public void setBindPort(int bind_port)
public void init() throws java.lang.Exception
Protocol
public void start() throws java.lang.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
在类中 Discovery
java.lang.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
在类中 PING
public void run()
run
在接口中 java.lang.Runnable