📄 dispatchersurveillant.java
字号:
/*
* Created on 2004-10-12
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package cn.edu.hust.cgcl.biogrid.dispatcher;
/**
* @author Administrator
*This class is to show the detail information in the dispatcher node
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class DispatcherSurveillant extends Thread{
DispatcherInfo d_info=null;
private boolean isActive=true;
public DispatcherSurveillant(DispatcherInfo dinfo){
d_info=dinfo;
}
public void run(){
System.out.println("\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
System.out.println("ID\tIp\t\tfirstMonitorID\tfirstMonitorIp\tsecondMonitorID\tsecondMonitorIp\tjobCount\tpcLoad\tworkerCount\tidleWorkerCount\tcanAcceptJob");
//while(isActive){
//d_info.dispatcherUpdate();
System.out.print(d_info.getDispatcherId()+"\t");
System.out.print(d_info.getDispatcherIp()+"\t");
System.out.print(d_info.getFirstMonitorId()+"\t\t");
System.out.print(d_info.getFirstMonitorIp()+"\t");
System.out.print(d_info.getSecondMonitorId()+"\t\t");
System.out.print(d_info.getSecondMonitorIp()+"\t");
System.out.print(d_info.getJobCount()+"\t");
System.out.print(d_info.getDispatcherLoad()+"\t");
System.out.print(d_info.getWorkerCount()+"\t");
System.out.print(d_info.getIdleWorkerCount()+"\t");
System.out.println(d_info.getCanAcceptJob()+"\t");
try
{
Thread.sleep(2000);
}
catch (InterruptedException e)
{
if(!isActive) return;
//get back to work
}
//}
}
public void terminated(){
isActive=false;
System.out.println("\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -