hu.mta.sztaki.lpds.cloud.simulator.iaas.constraints
Class ResourceConstraints

java.lang.Object
  extended by hu.mta.sztaki.lpds.cloud.simulator.iaas.constraints.ResourceConstraints
All Implemented Interfaces:
Comparable<ResourceConstraints>
Direct Known Subclasses:
AlterableResourceConstraints, ConstantConstraints, UnalterableConstraintsPropagator

public abstract class ResourceConstraints
extends Object
implements Comparable<ResourceConstraints>

This class defines the basic properties (cpu core count, per core processing power, and memory size) and operations on resoruce constraints. These constraints are expected to be used to express resource capacities of physical/virtual machines or complete infrastructures, as well as requests for resource allocations/virtual machines.

Author:
"Gabor Kecskemeti, Distributed and Parallel Systems Group, University of Innsbruck (c) 2013" "Gabor Kecskemeti, Laboratory of Parallel and Distributed Systems, MTA SZTAKI (c) 2012"

Constructor Summary
ResourceConstraints()
           
 
Method Summary
 int compareTo(ResourceConstraints o)
          offers a comparator between two constraints objects.
abstract  double getRequiredCPUs()
          Allows to query how many CPUs this constraints object represent
abstract  long getRequiredMemory()
          Allows to query how much memory this constraints object represent
abstract  double getRequiredProcessingPower()
          Allows to query the performance of a single CPU core represented by this constraints object represent
abstract  double getTotalProcessingPower()
          The total processing power of all cores represented by this constraints object: total=cpus*processingpower
abstract  boolean isRequiredProcessingIsMinimum()
          Determines if the specified amounts of resources are minimally or exactly required.
 String toString()
          provides a simple one line representation of resource constraints listing all its inherent properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceConstraints

public ResourceConstraints()
Method Detail

toString

public String toString()
provides a simple one line representation of resource constraints listing all its inherent properties. good for debugging and tracing.

Overrides:
toString in class Object

compareTo

public int compareTo(ResourceConstraints o)
offers a comparator between two constraints objects.

Specified by:
compareTo in interface Comparable<ResourceConstraints>

getRequiredCPUs

public abstract double getRequiredCPUs()
Allows to query how many CPUs this constraints object represent

Returns:
the amount of CPU cores represented by the object

getRequiredProcessingPower

public abstract double getRequiredProcessingPower()
Allows to query the performance of a single CPU core represented by this constraints object represent

Returns:
the performance of a CPU core in instructions/tick

isRequiredProcessingIsMinimum

public abstract boolean isRequiredProcessingIsMinimum()
Determines if the specified amounts of resources are minimally or exactly required.

Returns:
  • true if the specified amount of resources could be over-fulfilled
  • false if the object represents an exact amount of resources

getRequiredMemory

public abstract long getRequiredMemory()
Allows to query how much memory this constraints object represent

Returns:
the amount in bytes

getTotalProcessingPower

public abstract double getTotalProcessingPower()
The total processing power of all cores represented by this constraints object: total=cpus*processingpower

Returns:
the total processing power in instructions/tick


Copyright © 2012–2015 University of Innsbruck & MTA SZTAKI. All rights reserved.