001 /* 002 * Gateway.java 003 * 004 * Created on July 8, 2005, 1:52 PM 005 * 006 * This file is part of the STAR Scheduler. 007 * Copyright (c) 2002-2006 STAR Collaboration - Brookhaven National Laboratory 008 * 009 * STAR Scheduler is free software; you can redistribute it and/or modify 010 * it under the terms of the GNU General Public License as published by 011 * the Free Software Foundation; either version 2 of the License, or 012 * (at your option) any later version. 013 * 014 * STAR Scheduler is distributed in the hope that it will be useful, 015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 017 * GNU General Public License for more details. 018 * 019 * You should have received a copy of the GNU General Public License 020 * along with STAR Scheduler; if not, write to the Free Software 021 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 022 */ 023 024 package gov.bnl.star.offline.scheduler; 025 026 027 /** A configuration object used to describe how to access a site from a gatekeeper. 028 * @author Levente Hajdu 029 */ 030 public class GateKeeperAccessPoint extends LocalAccessPoint implements java.io.Serializable{ 031 032 /** Creates a new instance of Gateway */ 033 public GateKeeperAccessPoint() {} 034 035 private String name; 036 private int utilization = 50; 037 038 /**Returns the name of this gatekeeper 039 * Example: "stargrid03.bnl.gov" */ 040 public String getName(){return name;} 041 /**Sets the name for a gatekeeper 042 * This function is used primarily for configuration in the config file. */ 043 public void setName(String name){this.name = name;} 044 045 046 /**Sets the percent utilization of a gateKeeper 047 *The defalt is 50 048 * 049 * Example: 050 * if gateKeeper Z if utilization is set to 90% and gateKeeper Y's is utilization is set to 10% 051 * Then one out of 9 jobs will go to gateKeeper Y and the rest to gateKeeper Z. 052 */ 053 public void setUtilization(int utilization){this.utilization = utilization;} 054 /**Returns the percent utilization of this gatekeeper relative to other gatekeepers.*/ 055 public int getUtilization(){return utilization;} 056 057 /**Returns true if access point is local, if it is a grid access point in return false**/ 058 public boolean isLocal(){return false;} 059 060 }