Class ASimpleActiveResource

  • Direct Known Subclasses:
    SimpleCPUResource

    public abstract class ASimpleActiveResource
    extends Observable
    Represents an abstract active resource for demonstration purposes.

    The state of a concrete example active resource can be manually controlled.

    • Constructor Detail

      • ASimpleActiveResource

        public ASimpleActiveResource()
    • Method Detail

      • getJobs

        public int getJobs()
        Returns the amount of currently assigned jobs.
        Returns:
        the currently assigned job count
      • setJobs

        public void setJobs​(int jobs)
        Sets the amount of currently assigned jobs.
        Parameters:
        jobs - the job count to be assigned
      • demand

        public void demand​(double demand)
        Puts demand on the active resource.
        Parameters:
        demand - Demand to the resource.