uk.ac.soton.itinnovation.grid.service.sla.upgrade.v5_1_x.model
Class ResourcePool5_1alpha

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.service.sla.upgrade.v5_1_x.model.ResourcePool5_1alpha

public class ResourcePool5_1alpha
extends Object

ResourcePool.java


Constructor Summary
ResourcePool5_1alpha()
           
 
Method Summary
 void addAllocationSummary(UsageSummary5_1alpha u)
           
 void addConstraint(Constraint5_1alpha argConstraint)
           
 void addSLA(SLA5_1alpha sla)
           
 void addUsageReport(Usage report)
           
 void addUsageSummary(UsageSummary5_1alpha u)
           
 void closeSLA(SLA5_1alpha 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)
           
 List<UsageSummaryElement5_1alpha> getAllocationEvents(Metric metric, GregorianCalendar start, GregorianCalendar end)
           
 Set<Metric> getAllocationMetrics()
           
 double getAllocationSafe(Metric m, GregorianCalendar time)
           
 UsageSummary5_1alpha getAllocationSummary(Metric m)
           
 Set<UsageSummary5_1alpha> getAllocationSummarys()
           
 UsageSummary5_1alpha getAllocationSummarySafe(Metric m)
           
 Set<Metric> getConstrainedMetrics()
           
 Constraint5_1alpha getConstraint(Metric m)
           
 Set<Constraint5_1alpha> getConstraints()
           
 Long getId()
           
 List<InstantaneousRateReport> getRatesForSLA(SLA5_1alpha sla, boolean adding)
           
 Set<SLA5_1alpha> getSlas()
          Get all the SLAs in the ResourcePool, regardless of their state.
 List<UsageSummaryElement5_1alpha> getUsageEvents(Metric metric, GregorianCalendar start, GregorianCalendar end)
           
 Set<Metric> getUsageMetrics()
           
 double getUsageSafe(Metric m, GregorianCalendar time)
           
 UsageSummary5_1alpha getUsageSummary(Metric m)
           
 Set<UsageSummary5_1alpha> getUsageSummarys()
           
 UsageSummary5_1alpha getUsageSummarySafe(Metric m)
           
 Iterator<SLA5_1alpha> iterateSLAs()
          Get an iterator for all the SLAs in this resource pool.
 void removeSLA(SLA5_1alpha sla)
          Remove an SLA from the ResourcePool.
 void setAllocationSummarys(Set<UsageSummary5_1alpha> argAllocationSummarys)
           
 void setConstraints(Set<Constraint5_1alpha> argConstraints)
           
 void setId(Long argId)
           
 void setSlas(Set<SLA5_1alpha> argSlas)
           
 void setUsageSummarys(Set<UsageSummary5_1alpha> argUsageSummarys)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourcePool5_1alpha

public ResourcePool5_1alpha()
Method Detail

getId

public Long getId()

setId

public void setId(Long argId)

getConstraints

public Set<Constraint5_1alpha> getConstraints()

setConstraints

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

addConstraint

public void addConstraint(Constraint5_1alpha 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<SLA5_1alpha> getSlas()
Get all the SLAs in the ResourcePool, regardless of their state.


setSlas

public void setSlas(Set<SLA5_1alpha> argSlas)

getAllocationSummarys

public Set<UsageSummary5_1alpha> getAllocationSummarys()

setAllocationSummarys

public void setAllocationSummarys(Set<UsageSummary5_1alpha> argAllocationSummarys)

getUsageSummarys

public Set<UsageSummary5_1alpha> getUsageSummarys()

setUsageSummarys

public void setUsageSummarys(Set<UsageSummary5_1alpha> argUsageSummarys)

getAllocationMetrics

public Set<Metric> getAllocationMetrics()

getConstrainedMetrics

public Set<Metric> getConstrainedMetrics()

getUsageMetrics

public Set<Metric> getUsageMetrics()

getConstraint

public Constraint5_1alpha getConstraint(Metric m)

addAllocationSummary

public void addAllocationSummary(UsageSummary5_1alpha u)

getAllocationSummary

public UsageSummary5_1alpha getAllocationSummary(Metric m)

getAllocationSummarySafe

public UsageSummary5_1alpha getAllocationSummarySafe(Metric m)

getAllocationSafe

public double getAllocationSafe(Metric m,
                                GregorianCalendar time)

getAllocationEvents

public List<UsageSummaryElement5_1alpha> getAllocationEvents(Metric metric,
                                                             GregorianCalendar start,
                                                             GregorianCalendar end)

addUsageSummary

public void addUsageSummary(UsageSummary5_1alpha u)

getUsageSummary

public UsageSummary5_1alpha getUsageSummary(Metric m)

getUsageSummarySafe

public UsageSummary5_1alpha getUsageSummarySafe(Metric m)

getUsageSafe

public double getUsageSafe(Metric m,
                           GregorianCalendar time)

getUsageEvents

public List<UsageSummaryElement5_1alpha> getUsageEvents(Metric metric,
                                                        GregorianCalendar start,
                                                        GregorianCalendar end)

addSLA

public void addSLA(SLA5_1alpha sla)

closeSLA

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


getRatesForSLA

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

removeSLA

public void removeSLA(SLA5_1alpha 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.


addUsageReport

public void addUsageReport(Usage report)

iterateSLAs

public Iterator<SLA5_1alpha> 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.



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