本文整理汇总了Java中water.RPC.RPCCall.send_nack方法的典型用法代码示例。如果您正苦于以下问题:Java RPCCall.send_nack方法的具体用法?Java RPCCall.send_nack怎么用?Java RPCCall.send_nack使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类water.RPC.RPCCall
的用法示例。
在下文中一共展示了RPCCall.send_nack方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import water.RPC.RPCCall; //导入方法依赖的package包/类
@Override public void run() {
Thread.currentThread().setPriority(Thread.MAX_PRIORITY-1);
while( true ) {
RPC.RPCCall r;
long currenTime = System.currentTimeMillis();
for(H2ONode h2o:H2O.CLOUD._memary) {
if(h2o != H2O.SELF) {
for(RPCCall rpc:h2o._work.values()) {
if((rpc._started + rpc._retry) < currenTime) {
// RPC from somebody who dropped out of cloud?
if( (!H2O.CLOUD.contains(rpc._client) && !rpc._client._heartbeat._client) ||
// Timedout client?
(rpc._client._heartbeat._client && rpc._retry >= HeartBeatThread.CLIENT_TIMEOUT) ) {
rpc._client.remove_task_tracking(rpc._tsknum);
} else {
if (rpc._computed) {
if (rpc._computedAndReplied) {
DTask dt = rpc._dt;
if(dt != null) {
if (++rpc._ackResendCnt % 5 == 0)
Log.warn("Got " + rpc._ackResendCnt + " resends on ack for task # " + rpc._tsknum + ", class = " + dt.getClass().getSimpleName());
rpc.resend_ack();
}
}
} else if(rpc._nackResendCnt == 0) { // else send nack
++rpc._nackResendCnt;
rpc.send_nack();
}
}
}
}
}
}
long timeElapsed = System.currentTimeMillis()-currenTime;
if(timeElapsed < 1000)
try {Thread.sleep(1000-timeElapsed);} catch (InterruptedException e) {}
}
}
示例2: run
import water.RPC.RPCCall; //导入方法依赖的package包/类
@Override public void run() {
Thread.currentThread().setPriority(Thread.MAX_PRIORITY-1);
while( true ) {
long currenTime = System.currentTimeMillis();
for(H2ONode h2o:H2O.CLOUD._memary) {
if(h2o != H2O.SELF) {
for(RPCCall rpc:h2o._work.values()) {
if((rpc._started + rpc._retry) < currenTime) {
// RPC from somebody who dropped out of cloud?
if( (!H2O.CLOUD.contains(rpc._client) && !rpc._client._heartbeat._client) ||
// Timedout client?
(rpc._client._heartbeat._client && rpc._retry >= HeartBeatThread.CLIENT_TIMEOUT) ) {
rpc._client.remove_task_tracking(rpc._tsknum);
} else {
if (rpc._computed) {
if (rpc._computedAndReplied) {
DTask dt = rpc._dt;
if(dt != null) {
if (++rpc._ackResendCnt % 5 == 0)
Log.warn("Got " + rpc._ackResendCnt + " resends on ack for task # " + rpc._tsknum + ", class = " + dt.getClass().getSimpleName());
rpc.resend_ack();
}
}
} else if(rpc._nackResendCnt == 0) { // else send nack
++rpc._nackResendCnt;
rpc.send_nack();
}
}
}
}
}
}
long timeElapsed = System.currentTimeMillis()-currenTime;
if(timeElapsed < 1000)
try {Thread.sleep(1000-timeElapsed);} catch (InterruptedException e) {/*comment to stop ideaj warning*/}
}
}