compres
Class Pool

java.lang.Object
  extended by compres.Pool

public class Pool
extends java.lang.Object


Constructor Summary
Pool(java.lang.String poolName)
           
 
Method Summary
 void add(MachineBean m)
          Adds a machine to the pool.
 void add(Pool p)
          Adds a subpool to the pool.
 void allocate(java.lang.String job)
           
 void deallocate()
           
 java.util.LinkedList<Pool> getAllPools()
          Retrieves a list which includes all subpools of subpools.
 java.lang.String getCurrentJob()
           
 java.lang.Boolean getHasJob()
           
 java.util.LinkedList<MachineBean> getMachineList()
           
 java.lang.String getName()
           
 int getNumberOfUnits()
           
 java.util.LinkedList<Pool> getPoolList()
           
 void setCurrentJob(java.lang.String currentJob)
           
 void setHasJob(java.lang.Boolean hasJob)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pool

public Pool(java.lang.String poolName)
Method Detail

add

public void add(MachineBean m)
Adds a machine to the pool.

Parameters:
m - The machine to add

add

public void add(Pool p)
Adds a subpool to the pool.

Parameters:
p - The pool to add

getName

public java.lang.String getName()

getNumberOfUnits

public int getNumberOfUnits()

getMachineList

public java.util.LinkedList<MachineBean> getMachineList()

getPoolList

public java.util.LinkedList<Pool> getPoolList()

getAllPools

public java.util.LinkedList<Pool> getAllPools()
Retrieves a list which includes all subpools of subpools.

Returns:
A list of all pools in this hierarchy

getCurrentJob

public java.lang.String getCurrentJob()

allocate

public void allocate(java.lang.String job)

deallocate

public void deallocate()

setCurrentJob

public void setCurrentJob(java.lang.String currentJob)

getHasJob

public java.lang.Boolean getHasJob()

setHasJob

public void setHasJob(java.lang.Boolean hasJob)