public class FILE_PING extends Discovery
限定符和类型 | 字段和说明 |
---|---|
protected static java.io.FilenameFilter |
filter |
protected long |
interval
已过时。
|
protected java.lang.String |
location |
protected View |
prev_view |
protected int |
reads |
protected java.io.File |
root_dir |
protected static java.lang.String |
SUFFIX |
protected int |
writes |
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
构造器和说明 |
---|
FILE_PING() |
限定符和类型 | 方法和说明 |
---|---|
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. physical address, logical name) for the given member addresses.
|
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() |
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) |
void |
resetStats() |
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)
|
addResponse, addressAsString, addToCache, breakOnCoordResponse, breakOnCoordResponse, deserialize, discoveryRequestReceived, dumpCache, findInitialMembersAsString, findMembers, forceDiscoveryResponses, forceDiscoveryResponses, getCurrentCoord, getNumberOfDiscoveryRequestsSent, getNumInitialMembers, getTimeout, getView, getViewId, handleConnect, handleDisconnect, handleDiscoveryResponse, isCoord, isMergeRunning, marshal, numInitialMembers, numInitialMembers, providedUpServices, readPingData, returnEntireCache, returnEntireCache, sendDiscoveryResponse, serializeWithoutView, setForceSendingDiscoveryRsps, setNumInitialMembers, setTimeout, staggerTimeout, staggerTimeout, start, stop, timeout, timeout, up, useDiskCache, useDiskCache
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 static final java.lang.String SUFFIX
protected java.lang.String location
@Deprecated protected long interval
protected int writes
protected int reads
protected java.io.File root_dir
protected static final java.io.FilenameFilter filter
protected volatile View prev_view
public void init() throws java.lang.Exception
Protocol
public void resetStats()
resetStats
在类中 Discovery
public java.lang.Object down(Event evt)
Protocol
down_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)
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
在类中 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 boolean addDiscoveryResponseToCaches(Address mbr, java.lang.String logical_name, PhysicalAddress physical_addr)
protected static java.lang.String addressToFilename(Address mbr)
protected void createRootDir()
protected void remove(java.lang.String clustername, Address addr)
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.Exception
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)