public class FILE_PING extends Discovery
Modifier and Type | Class and Description |
---|---|
protected class |
FILE_PING.InfoWriter
Class which calls writeAll() a few times.
|
Discovery.DiscoveryCacheDisseminationTask
Modifier and Type | Field and Description |
---|---|
protected static FilenameFilter |
filter |
protected Future<?> |
info_writer |
protected int |
info_writer_max_writes_after_view |
protected long |
info_writer_sleep_time |
protected String |
location |
protected int |
reads |
protected static Pattern |
regexp |
protected boolean |
register_shutdown_hook |
protected boolean |
remove_all_data_on_view_change |
protected boolean |
remove_old_coords_on_view_change |
protected File |
root_dir |
protected static String |
SUFFIX |
protected boolean |
update_store_on_view_change |
protected int |
writes |
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 |
---|
FILE_PING() |
Modifier and Type | Method and Description |
---|---|
protected static String |
addressToFilename(Address mbr) |
protected void |
createRootDir() |
protected boolean |
deleteFile(File file) |
Object |
down(Event evt)
An event is to be sent down the stack.
|
void |
findMembers(List<Address> members,
boolean initial_discovery,
Responses responses)
Fetches information (e.g.
|
protected void |
handleView(View new_view,
View old_view,
boolean coord_changed) |
void |
init()
Called after instance has been created (null constructor) and before protocol is started.
|
boolean |
isDynamic() |
boolean |
isInfoWriterRunning() |
protected List<PingData> |
read(File file) |
protected List<PingData> |
read(InputStream in) |
protected void |
readAll(List<Address> members,
String clustername,
Responses responses) |
protected void |
remove(String clustername,
Address addr) |
protected void |
removeAll(String clustername)
Removes all files for the given cluster name
|
void |
resetStats() |
protected void |
startInfoWriter() |
void |
stop()
This method is called on a
JChannel.disconnect() . |
protected void |
stopInfoWriter() |
protected void |
write(List<PingData> list,
OutputStream out) |
protected void |
write(List<PingData> list,
String clustername) |
protected void |
writeAll()
Write information about all of the member to file (only if I'm the coord)
|
protected void |
writeAll(Address[] excluded_mbrs) |
void |
writeInfo() |
addDiscoveryResponseToCaches, addResponse, addResponse, addressAsString, addToCache, breakOnCoordResponse, breakOnCoordResponse, deserialize, discoveryRequestReceived, discoveryRspExpiryTime, disseminateDiscoveryInformation, dumpCache, findInitialMembersAsString, findMembers, getCurrentCoord, getNumberOfDiscoveryRequestsSent, getView, getViewId, handleConnect, handleDisconnect, handleDiscoveryResponse, isCoord, isMergeRunning, marshal, providedUpServices, readPingData, returnEntireCache, returnEntireCache, sendCacheInformation, sendDiscoveryResponse, serializeWithoutView, staggerTimeout, staggerTimeout, start, startCacheDissemination, up, up, useDiskCache, useDiskCache, weedOutCompletedDiscoveryResponses
accept, afterCreationHook, destroy, 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 static final String SUFFIX
protected static final Pattern regexp
protected String location
protected boolean remove_old_coords_on_view_change
protected boolean remove_all_data_on_view_change
protected int info_writer_max_writes_after_view
protected long info_writer_sleep_time
protected boolean register_shutdown_hook
protected boolean update_store_on_view_change
protected int writes
protected int reads
protected File root_dir
protected static final FilenameFilter filter
protected Future<?> info_writer
public boolean isInfoWriterRunning()
public void writeInfo()
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 resetStats()
resetStats
in class Discovery
public Object down(Event evt)
Protocol
down_prot.down()
.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 addedprotected void createRootDir()
protected void removeAll(String clustername)
protected List<PingData> read(InputStream in)
protected void writeAll()
protected void writeAll(Address[] excluded_mbrs)
protected void write(List<PingData> list, OutputStream out) throws Exception
protected boolean deleteFile(File file)
protected void startInfoWriter()
protected void stopInfoWriter()
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.