📄 dispatcherinfo.java
字号:
package cn.edu.hust.cgcl.biogrid.monitor;
import java.util.Vector;
/**
* <p>Title: </p>
* <p>Description: DispatcherInfo类包括了dispatcher的统计信息</p>
* <p>Copyright: Copyright (c) 2004</p>
* <p>Company: </p>
* @author not attributable
* @version 1.0
*/
public class DispatcherInfo
{
private String dispatcherId=null;
private String firstMonitorId=null;
private String secondMonitorId=null;
private int jobCount=0;
private int workerLoad=0;
private int dispatcherLoad=0;
private int workerCount=0;
private boolean canAcceptJob=true;
private int idleWorkerCount=0;
private Vector dispatcherJob=null;
public DispatcherInfo()
{
//this.setDispatcherInfo("", "", "", 0, 0, 0, 0, true, null);
} // DispatcherInfo
public void setDispatcherInfo(String dispatcherId,
String firstMonitorId,
String secondMonitorId,
int jobCount,
int workerCount,
int workerLoad,
int dispatcherLoad,
boolean canAcceptJob,
int idleworkercount,
Vector dispatcherJob)
{
this.dispatcherId = dispatcherId;
this.firstMonitorId=firstMonitorId;
this.secondMonitorId=secondMonitorId;
this.jobCount = jobCount;
this.workerCount = workerCount;
this.workerLoad = workerLoad;
this.dispatcherLoad = dispatcherLoad;
this.canAcceptJob = canAcceptJob;
this.idleWorkerCount = idleworkercount;
this.dispatcherJob = dispatcherJob; //要用实例化??
} //DispatcherInfo
public boolean insertJob(String jobId)
{
return (this.dispatcherJob.add(jobId));
}
public String getDispatcherId()
{
return this.dispatcherId;
}
public int getWorkerCount()
{
return this.workerCount;
} // getWorkerCount
public int getJobCount()
{
return this.jobCount;
} // getJobCount
public int getWorkerLoad()
{
return this.workerLoad;
} // getWorkerLoad
public int getDispatcherLoad()
{
return this.dispatcherLoad;
} // getDispatcherLoad
public boolean getCanAcceptJob()
{
return this.canAcceptJob;
}
public int getIdleWorkerCount()
{
return this.idleWorkerCount;
}
public Vector getDispacherJob()
{
return this.dispatcherJob;
}
} // DispatcherInfo
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -