public class TCPGOSSIP extends Discovery implements RouterStub.MembersNotification
Discovery.DiscoveryCacheDisseminationTask
Modifier and Type | Field and Description |
---|---|
protected long |
reconnect_interval |
protected int |
sock_conn_timeout |
protected RouterStubManager |
stubManager |
protected boolean |
use_nio |
async_discovery, async_discovery_use_separate_thread_per_request, break_on_coord_rsp, cluster_name, current_coord, discovery_rsp_expiry_time, is_coord, is_leaving, is_server, local_addr, max_members_in_discovery_request, max_rank_to_reply, num_discovery_requests, ping_responses, return_entire_cache, send_cache_on_join, sends_can_block, stagger_timeout, timer, transport_supports_multicasting, use_disk_cache, use_ip_addrs, view, WHITESPACE
after_creation_hook, down_prot, ergonomics, id, log, stack, stats, up_prot
Constructor and Description |
---|
TCPGOSSIP() |
Modifier and Type | Method and Description |
---|---|
void |
addInitialHost(String hostname,
int port) |
void |
destroy()
This method is called on a
JChannel.close() . |
void |
findMembers(List<Address> members,
boolean initial_discovery,
Responses responses)
Fetches information (e.g.
|
List<InetSocketAddress> |
getInitialHosts() |
RouterStubManager |
getStubManager() |
void |
handleConnect() |
void |
handleDisconnect() |
void |
init()
Called after instance has been created (null constructor) and before protocol is started.
|
boolean |
isDynamic() |
void |
members(List<PingData> mbrs) |
String |
print() |
String |
printReconnectList() |
String |
printStubs() |
boolean |
removeInitialHost(String hostname,
int port) |
void |
setInitialHosts(Collection<InetSocketAddress> hosts) |
void |
setInitialHosts(List<InetSocketAddress> hosts) |
void |
stop()
This method is called on a
JChannel.disconnect() . |
addDiscoveryResponseToCaches, addResponse, addResponse, addressAsString, addToCache, breakOnCoordResponse, breakOnCoordResponse, deserialize, discoveryRequestReceived, discoveryRspExpiryTime, disseminateDiscoveryInformation, down, dumpCache, findInitialMembersAsString, findMembers, getCurrentCoord, getNumberOfDiscoveryRequestsSent, getView, getViewId, handleDiscoveryResponse, isCoord, isMergeRunning, marshal, providedUpServices, read, readPingData, resetStats, returnEntireCache, returnEntireCache, sendCacheInformation, sendDiscoveryResponse, serializeWithoutView, staggerTimeout, staggerTimeout, start, startCacheDissemination, up, up, useDiskCache, useDiskCache, weedOutCompletedDiscoveryResponses, write
accept, afterCreationHook, down, enableStats, getConfigurableObjects, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getLog, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, isErgonomics, level, parse, providedDownServices, requiredDownServices, requiredUpServices, resetStatistics, setDownProtocol, setErgonomics, setId, setLevel, setProperties, setProtocolStack, setSocketFactory, setUpProtocol, setValue, statsEnabled, up
protected int sock_conn_timeout
protected long reconnect_interval
protected boolean use_nio
protected volatile RouterStubManager stubManager
public void setInitialHosts(List<InetSocketAddress> hosts)
public void setInitialHosts(Collection<InetSocketAddress> hosts)
public List<InetSocketAddress> getInitialHosts()
public RouterStubManager getStubManager()
public void init() throws Exception
Protocol
public void stop()
Protocol
JChannel.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
JChannel.close()
.
Does some cleanup; after the call the VM will terminatepublic void handleConnect()
handleConnect
in class Discovery
public String print()
public String printStubs()
public String printReconnectList()
public void handleDisconnect()
handleDisconnect
in class Discovery
public void findMembers(List<Address> members, boolean initial_discovery, Responses responses)
Discovery
Responses
object. If Discovery.async_discovery
is true, this method will be called
in a separate thread, otherwise the caller's thread will be used.findMembers
in class Discovery
members
- A list of logical addresses (typically UUID
s). If null, then information
for all members is fetchedinitial_discovery
- Set to true if this is for the initial membership discovery. Some protocols (e.g.
file based ones) may return only the information for the coordinator(s).responses
- The list to which responses should be addedpublic void members(List<PingData> mbrs)
members
in interface RouterStub.MembersNotification
public void addInitialHost(String hostname, int port)
public boolean removeInitialHost(String hostname, int port)
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.