public class MPerf extends ReceiverAdapter
限定符和类型 | 类和说明 |
---|---|
protected static class |
MPerf.ConfigChange |
protected static class |
MPerf.Configuration |
protected static class |
MPerf.MPerfHeader |
protected static class |
MPerf.Result |
protected class |
MPerf.Sender |
protected class |
MPerf.Stats |
限定符和类型 | 字段和说明 |
---|---|
protected AckCollector |
ack_collector |
protected boolean |
cancelled |
protected JChannel |
channel |
protected static java.text.NumberFormat |
format |
protected static short |
ID |
protected boolean |
initiator |
protected long |
last_interval |
protected Address |
local_addr |
protected Log |
log |
protected int |
log_interval |
protected boolean |
looping |
protected java.util.List<Address> |
members |
protected int |
msg_size |
protected java.lang.String |
name |
protected int |
num_msgs |
protected int |
num_senders |
protected int |
num_threads |
protected boolean |
oob |
protected java.lang.String |
props |
protected int |
receive_log_interval |
protected java.util.concurrent.ConcurrentMap<Address,MPerf.Stats> |
received_msgs
Maintains stats per sender, will be sent to perf originator when all messages have been received
|
protected Address |
result_collector |
protected ResponseCollector<MPerf.Result> |
results |
protected java.util.concurrent.atomic.AtomicLong |
total_received_msgs |
构造器和说明 |
---|
MPerf() |
限定符和类型 | 方法和说明 |
---|---|
protected void |
applyNewConfig(byte[] buffer) |
protected static java.lang.String |
computeStats(long time,
long msgs,
int size) |
protected void |
configChange(java.lang.String name) |
protected void |
displayResults() |
protected static java.io.InputStream |
findFile(java.lang.String filename) |
protected java.util.List<Address> |
getSenders()
Returns all members if num_senders <= 0, or the members with rank <= num_senders
|
protected void |
handleConfigChange(MPerf.ConfigChange config_change) |
protected void |
handleConfigRequest(Address sender) |
protected void |
handleConfigResponse(MPerf.Configuration cfg) |
protected void |
handleData(Address src,
long seqno,
boolean check_order) |
protected void |
loop() |
static void |
main(java.lang.String[] args) |
protected void |
newConfig() |
protected static java.lang.String |
printProperties() |
void |
receive(Message msg)
Called when a message is received.
|
protected void |
send(Address target,
java.lang.Object payload,
byte header,
Message.Flag... flags) |
protected void |
sendMessages() |
void |
start(java.lang.String props,
java.lang.String name) |
void |
stop() |
void |
viewAccepted(View view)
Called when a change in membership has occurred.
|
protected java.lang.String props
protected JChannel channel
protected final AckCollector ack_collector
protected Address local_addr
protected java.lang.String name
protected int num_msgs
protected int msg_size
protected int num_threads
protected int log_interval
protected int receive_log_interval
protected int num_senders
protected boolean oob
protected boolean cancelled
protected final java.util.concurrent.ConcurrentMap<Address,MPerf.Stats> received_msgs
protected final java.util.concurrent.atomic.AtomicLong total_received_msgs
protected final java.util.List<Address> members
protected final Log log
protected boolean looping
protected long last_interval
protected final ResponseCollector<MPerf.Result> results
protected volatile Address result_collector
protected volatile boolean initiator
protected static final java.text.NumberFormat format
protected static final short ID
public void start(java.lang.String props, java.lang.String name) throws java.lang.Exception
java.lang.Exception
protected void loop()
protected void displayResults()
protected void configChange(java.lang.String name) throws java.lang.Exception
java.lang.Exception
protected void newConfig() throws java.lang.Exception
java.lang.Exception
protected void send(Address target, java.lang.Object payload, byte header, Message.Flag... flags) throws java.lang.Exception
java.lang.Exception
protected static java.lang.String printProperties()
protected static java.io.InputStream findFile(java.lang.String filename)
public void stop()
public void receive(Message msg)
ReceiverAdapter
receive
在接口中 MessageListener
receive
在类中 ReceiverAdapter
protected void handleData(Address src, long seqno, boolean check_order)
protected java.util.List<Address> getSenders()
protected void applyNewConfig(byte[] buffer)
protected void handleConfigChange(MPerf.ConfigChange config_change)
protected void handleConfigRequest(Address sender) throws java.lang.Exception
java.lang.Exception
protected void handleConfigResponse(MPerf.Configuration cfg)
public void viewAccepted(View view)
ReceiverAdapter
Channel.connect(String)
returns.viewAccepted
在接口中 MembershipListener
viewAccepted
在类中 ReceiverAdapter
protected void sendMessages()
protected static java.lang.String computeStats(long time, long msgs, int size)
public static void main(java.lang.String[] args)