public class TCPGOSSIP extends Discovery
The FIND_INITIAL_MBRS event will eventually be answered with a FIND_INITIAL_MBRS_OK event up the stack.
| Constructor and Description |
|---|
TCPGOSSIP() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
This method is called on a
Channel.close(). |
java.lang.String |
getName() |
void |
handleConnect() |
void |
handleDisconnect() |
void |
sendGetMembersRequest() |
boolean |
setProperties(java.util.Properties props)
sets the properties of the PING protocol.
|
void |
start()
This method is called on a
Channel.connect(String). |
void |
stop()
This method is called on a
Channel.disconnect(). |
down, findInitialMembers, findInitialMembersAsString, getNumberOfDiscoveryRequestsSent, getNumInitialMembers, getNumPingRequests, getTimeout, init, localAddressSet, makeView, providedUpServices, resetStats, setNumInitialMembers, setNumPingRequests, setTimeout, updownThreadEnabled, dumpStats, enableStats, getDownProtocol, getProperties, getProtocolStack, getThreadFactory, getTransport, getUpProtocol, printStats, providedDownServices, requiredDownServices, requiredUpServices, setDownProtocol, setPropertiesInternal, setProtocolStack, setUpProtocol, statsEnabled, upThreadEnabledpublic boolean setProperties(java.util.Properties props)
DiscoverysetProperties in class Discoveryprops - - a property setpublic void start()
throws java.lang.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 Discoveryjava.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()
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()
sendGetMembersRequest in class DiscoveryCopyright ? 1998-2008 Bela Ban. All Rights Reserved.