001    /*
002     * $RCSfile: Resource.java,v $ 
003     *
004     * Created on Dec 17 2006, 11:05 AM 
005     *
006     * This file is part of the STAR Scheduler.
007     * Copyright (c) 2004 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    package gov.bnl.star.offline.scheduler.request.rdl;
024    
025    /** Represents a resource value defined by a request
026     * Resources may have min, max, rate, and average size values
027     *
028     * @author  paulh
029     * @version $Revision: 1.2 $ $Date: 2006/11/21 00:41:30 $
030     */
031    public class Resource implements java.io.Serializable {
032    
033       /** Constructor
034        * @param tag resource name
035        */
036        public Resource(String tag) {
037            name = tag;
038            min = -1;
039            max = -1;
040            rate = -1;
041            size = -1.0;
042        }
043        
044        public Resource(){}
045    
046       /** Get methods
047        */
048        public String getName() { return name; }
049        public int getMin() { return min; }
050        public int getMax() { return max; }
051        public int getRate() { return rate; }
052        public double getSize() { return size; }
053    
054       /** Set methods
055        */
056        public void setName(String name) {this.name = name;}
057        public void setMin(int m) { min = m; }
058        public void setMax(int m) { max = m; }
059        public void setRate(int r) { rate = r; }
060        public void setSize(double s) { size = s; }
061    
062        private String name;
063        private int min, max, rate;
064        private double size;
065    
066    }