⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dispatcherinfo.java

📁 分布式计算平台P2HP-1的源代码;P2HP-1是基于P2P的高性能计算平台
💻 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 + -