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 java.io.FilenameFilter |
filter |
protected java.util.concurrent.Future<?> |
info_writer |
protected int |
info_writer_max_writes_after_view |
protected long |
info_writer_sleep_time |
protected long |
interval
Deprecated.
|
protected java.lang.String |
location |
protected int |
reads |
protected static java.util.regex.Pattern |
regexp |
protected boolean |
remove_all_files_on_view_change |
protected boolean |
remove_old_coords_on_view_change |
protected java.io.File |
root_dir |
protected static java.lang.String |
SUFFIX |
protected boolean |
write_data_on_find |
protected int |
writes |
always_send_physical_addr_with_discovery_request, async_discovery, async_discovery_use_separate_thread_per_request, 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, send_cache_on_join, stagger_timeout, timeout, timer, transport_supports_multicasting, use_disk_cache, view, WHITESPACEafter_creation_hook, down_prot, ergonomics, id, log, name, stack, stats, up_prot| Constructor and Description |
|---|
FILE_PING() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
addDiscoveryResponseToCaches(Address mbr,
java.lang.String logical_name,
PhysicalAddress physical_addr)
Only add the discovery response if the logical address is not present or the physical addrs are different
|
protected static java.lang.String |
addressToFilename(Address mbr) |
protected void |
createRootDir() |
protected boolean |
deleteFile(java.io.File file) |
java.lang.Object |
down(Event evt)
An event is to be sent down the stack.
|
void |
findMembers(java.util.List<Address> members,
boolean initial_discovery,
Responses responses)
Fetches information (e.g.
|
java.lang.String |
getLocation() |
boolean |
getRemoveAllDataOnViewChange() |
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 java.util.List<PingData> |
read(java.io.File file) |
protected java.util.List<PingData> |
read(java.io.InputStream in) |
protected void |
readAll(java.util.List<Address> members,
java.lang.String clustername,
Responses responses) |
protected void |
remove(java.lang.String clustername,
Address addr) |
protected void |
removeAll(java.lang.String clustername)
Removes all files for the given cluster name
|
void |
resetStats() |
FILE_PING |
setLocation(java.lang.String l) |
FILE_PING |
setRemoveAllDataOnViewChange(boolean r) |
protected void |
startInfoWriter() |
protected void |
stopInfoWriter() |
protected void |
write(java.util.List<PingData> list,
java.io.OutputStream out) |
protected void |
write(java.util.List<PingData> list,
java.lang.String clustername) |
protected void |
writeAll()
Write information about all of the member to file (only if I'm the coord)
|
void |
writeInfo() |
addResponse, addressAsString, addToCache, breakOnCoordResponse, breakOnCoordResponse, deserialize, discoveryRequestReceived, discoveryRspExpiryTime, disseminateDiscoveryInformation, dumpCache, findInitialMembersAsString, findMembers, forceDiscoveryResponses, forceDiscoveryResponses, getCurrentCoord, getNumberOfDiscoveryRequestsSent, getNumInitialMembers, getTimeout, getView, getViewId, handleConnect, handleDisconnect, handleDiscoveryResponse, isCoord, isMergeRunning, marshal, numInitialMembers, numInitialMembers, providedUpServices, readPingData, returnEntireCache, returnEntireCache, sendCacheInformation, sendDiscoveryResponse, serializeWithoutView, setForceSendingDiscoveryRsps, setNumInitialMembers, setTimeout, staggerTimeout, staggerTimeout, start, startCacheDissemination, stop, timeout, timeout, up, useDiskCache, useDiskCache, weedOutCompletedDiscoveryResponsesaccept, afterCreationHook, destroy, dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getLog, 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, upprotected static final java.lang.String SUFFIX
protected static final java.util.regex.Pattern regexp
protected java.lang.String location
@Deprecated protected long interval
protected boolean remove_old_coords_on_view_change
protected boolean remove_all_files_on_view_change
protected int info_writer_max_writes_after_view
protected long info_writer_sleep_time
protected boolean write_data_on_find
protected int writes
protected int reads
protected java.io.File root_dir
protected static final java.io.FilenameFilter filter
protected java.util.concurrent.Future<?> info_writer
public java.lang.String getLocation()
public FILE_PING setLocation(java.lang.String l)
public boolean getRemoveAllDataOnViewChange()
public FILE_PING setRemoveAllDataOnViewChange(boolean r)
public boolean isInfoWriterRunning()
public void writeInfo()
public void init()
throws java.lang.Exception
Protocolpublic void resetStats()
resetStats in class Discoverypublic java.lang.Object down(Event evt)
Protocoldown_prot.down(). In case of a GET_ADDRESS event (which tries to
retrieve the stack's address from one of the bottom layers), the layer may need to send
a new response event back up the stack using up_prot.up().public void findMembers(java.util.List<Address> members, boolean initial_discovery, Responses responses)
DiscoveryResponses 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 Discoverymembers - A list of logical addresses (typically UUIDs). 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 boolean addDiscoveryResponseToCaches(Address mbr, java.lang.String logical_name, PhysicalAddress physical_addr)
addDiscoveryResponseToCaches in class Discoveryprotected static java.lang.String addressToFilename(Address mbr)
protected void createRootDir()
protected void remove(java.lang.String clustername,
Address addr)
protected void removeAll(java.lang.String clustername)
protected void readAll(java.util.List<Address> members, java.lang.String clustername, Responses responses)
protected java.util.List<PingData> read(java.io.File file) throws java.lang.Exception
java.lang.Exceptionprotected java.util.List<PingData> read(java.io.InputStream in)
protected void writeAll()
protected void write(java.util.List<PingData> list, java.lang.String clustername)
protected void write(java.util.List<PingData> list, java.io.OutputStream out) throws java.lang.Exception
protected boolean deleteFile(java.io.File file)
protected void startInfoWriter()
protected void stopInfoWriter()
Copyright © 1998-2020 Red Hat. All Rights Reserved.