uk.ac.soton.itinnovation.grid.service.sla
Class ResourcePool

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.service.sla.ResourcePool

public class ResourcePool
extends Object

ResourcePool.java


Constructor Summary
ResourcePool()
           
 
Method Summary
 void addConstraint(Constraint argConstraint)
           
 void addSLA(SLA sla)
           
 void closeSLA(SLA sla)
          Return resources to the ResourcePool once an SLA has gone into the CLOSED state.
 boolean constraintWithMetricExists(String argUri)
          Returns true if the metric with the given URI is constrained.
 void deleteConstraint(String uri, org.hibernate.Session hibSession)
           
 boolean equalsByValue(Object obj)
           
 ResourceWithUsageByMetric getAllocationPool()
           
 Set<Metric> getConstrainedMetrics()
           
 Constraint getConstraint(Metric m)
           
 Set<Constraint> getConstraints()
           
 Long getId()
           
 List<InstantaneousRateReport> getRatesForSLA(SLA sla, boolean adding)
           
 Set<SLA> getSlas()
          Get all the SLAs in the ResourcePool, regardless of their state.
 ResourceWithUsageByMetric getUsagePool()
           
 Iterator<SLA> iterateSLAs()
          Get an iterator for all the SLAs in this resource pool.
 void removeSLA(SLA sla)
          Remove an SLA from the ResourcePool.
 void setAllocationPool(ResourceWithUsageByMetric allocations)
           
 void setConstraints(Set<Constraint> argConstraints)
           
 void setId(Long argId)
           
 void setSlas(Set<SLA> argSlas)
           
 void setUsagePool(ResourceWithUsageByMetric usage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourcePool

public ResourcePool()
Method Detail

getId

public Long getId()

setId

public void setId(Long argId)

getConstraints

public Set<Constraint> getConstraints()

setConstraints

public void setConstraints(Set<Constraint> argConstraints)
                    throws GridFailureException
Throws:
GridFailureException

addConstraint

public void addConstraint(Constraint argConstraint)
                   throws GridFailureException
Throws:
GridFailureException

deleteConstraint

public void deleteConstraint(String uri,
                             org.hibernate.Session hibSession)

constraintWithMetricExists

public boolean constraintWithMetricExists(String argUri)
Returns true if the metric with the given URI is constrained.


getSlas

public Set<SLA> getSlas()
Get all the SLAs in the ResourcePool, regardless of their state.


setSlas

public void setSlas(Set<SLA> argSlas)

getAllocationPool

public ResourceWithUsageByMetric getAllocationPool()

setAllocationPool

public void setAllocationPool(ResourceWithUsageByMetric allocations)

getUsagePool

public ResourceWithUsageByMetric getUsagePool()

setUsagePool

public void setUsagePool(ResourceWithUsageByMetric usage)

getConstrainedMetrics

public Set<Metric> getConstrainedMetrics()

getConstraint

public Constraint getConstraint(Metric m)

addSLA

public void addSLA(SLA sla)

closeSLA

public void closeSLA(SLA sla)
Return resources to the ResourcePool once an SLA has gone into the CLOSED state.


getRatesForSLA

public List<InstantaneousRateReport> getRatesForSLA(SLA sla,
                                                    boolean adding)

removeSLA

public void removeSLA(SLA sla)
Remove an SLA from the ResourcePool. This should not be used if there has been any usage on the SLA, use closeSLA() for that.


iterateSLAs

public Iterator<SLA> iterateSLAs()
Get an iterator for all the SLAs in this resource pool. Calling next() on the iterator returned will evict each previous SLA. Must have a current session.


equalsByValue

public boolean equalsByValue(Object obj)


Copyright © 2001-2007 University of Southampton IT Innovation Centre. All Rights Reserved.