public class MPerfRpc extends ReceiverAdapter
MPerf
.限定符和类型 | 类和说明 |
---|---|
protected static class |
MPerfRpc.ConfigChange |
protected static class |
MPerfRpc.Configuration |
protected class |
MPerfRpc.MperfMarshaller |
protected static class |
MPerfRpc.Result |
protected class |
MPerfRpc.Sender |
protected class |
MPerfRpc.Stats |
限定符和类型 | 字段和说明 |
---|---|
protected JChannel |
channel |
protected static short |
clearResults |
protected static short |
configChange |
protected static short |
configReq |
protected static short |
configRsp |
protected RpcDispatcher |
disp |
protected static short |
exit |
protected static java.text.NumberFormat |
format |
protected static short |
handleData |
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 static java.lang.reflect.Method[] |
METHODS |
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,MPerfRpc.Stats> |
received_msgs
Maintains stats per sender, will be sent to perf originator when all messages have been received
|
protected static short |
result |
protected Address |
result_collector |
protected ResponseCollector<MPerfRpc.Result> |
results |
protected RequestOptions |
send_options |
protected static short |
sendingDone |
protected static short |
startSending |
protected boolean |
sync |
protected java.util.concurrent.atomic.AtomicLong |
total_received_msgs |
构造器和说明 |
---|
MPerfRpc() |
限定符和类型 | 方法和说明 |
---|---|
void |
clearResults() |
protected static java.lang.String |
computeStats(long time,
long msgs,
int size) |
void |
configChange(MPerfRpc.ConfigChange config_change) |
protected void |
configChange(java.lang.String name) |
void |
configReq(Address sender) |
void |
configRsp(MPerfRpc.Configuration cfg) |
protected void |
displayResults() |
void |
exit() |
protected java.util.List<Address> |
getSenders()
Returns all members if num_senders <= 0, or the members with rank <= num_senders
|
void |
handleData(Address src,
byte[] payload,
long seqno,
boolean check_order) |
protected java.lang.Object |
invokeRpc(short method_id,
Address dest,
RequestOptions options,
java.lang.Object... args) |
protected RspList |
invokeRpc(short method_id,
RequestOptions options,
java.lang.Object... args) |
protected void |
loop() |
static void |
main(java.lang.String[] args) |
void |
result(Address sender,
MPerfRpc.Result res)
Called when a result from a node is received
|
void |
sendingDone(Address sender) |
protected void |
sendMessages() |
void |
start(java.lang.String props,
java.lang.String name) |
void |
startSending(Address initiator) |
void |
stop() |
void |
viewAccepted(View view)
Called when a change in membership has occurred.
|
protected java.lang.String props
protected JChannel channel
protected RpcDispatcher disp
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 sync
protected boolean oob
protected final java.util.concurrent.ConcurrentMap<Address,MPerfRpc.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<MPerfRpc.Result> results
protected volatile Address result_collector
protected volatile boolean initiator
protected RequestOptions send_options
protected static final java.text.NumberFormat format
protected static final short handleData
protected static final short startSending
protected static final short sendingDone
protected static final short result
protected static final short clearResults
protected static final short configChange
protected static final short configReq
protected static final short configRsp
protected static final short exit
protected static final java.lang.reflect.Method[] METHODS
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 RspList invokeRpc(short method_id, RequestOptions options, java.lang.Object... args) throws java.lang.Exception
java.lang.Exception
protected java.lang.Object invokeRpc(short method_id, Address dest, RequestOptions options, java.lang.Object... args) throws java.lang.Exception
java.lang.Exception
public void stop()
public void handleData(Address src, byte[] payload, long seqno, boolean check_order)
public void startSending(Address initiator)
public void sendingDone(Address sender)
public void result(Address sender, MPerfRpc.Result res)
public void clearResults()
public void configChange(MPerfRpc.ConfigChange config_change)
public void configReq(Address sender) throws java.lang.Exception
java.lang.Exception
public void configRsp(MPerfRpc.Configuration cfg)
public void exit()
protected java.util.List<Address> getSenders()
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)