Interface SlotManager

All Known Implementing Classes:
InternalSlotManager, MasterSlotManager, RemoteSlotManager

public interface SlotManager
A slot manager is responsible for slot assigment to jobs. This is an important part of the job agent since a job may not be executed without a slot has been assigned to it and the slot manager ususally has a limited number of slots. The default slot manager for a job agent is the InternalSlotManager. It is also possible for several job agents to cooperate on slot assignment by using MasterSlotManager and RemoteSlotManager.
Since:
2.16
Author:
Nicklas
Last modified
$Date: 2010-10-19 13:02:17 +0200 (ti, 19 okt 2010) $
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method is called when the job agent is shutting down.
    getSlot(Job job)
    Get a slot for the specified job.
    void
    init(Agent agent)
    Initialize the slot manager.
    void
    Called by the job agent when the job has finished exeuting.
  • Method Details

    • init

      void init(Agent agent)
      Initialize the slot manager. This method is called once when the job agent is starting up. The slot manager may read configuration settings, and intialize local resources.
      Parameters:
      agent - The job agent
    • close

      void close()
      This method is called when the job agent is shutting down. The slot manager should clean up any resources it is using.
    • getSlot

      Slot getSlot(Job job)
      Get a slot for the specified job. If no free slot is available null is returned.
      Parameters:
      job - The job that the job agent wants to execute
      Returns:
      A slot or null if no slot is available
    • releaseSlot

      void releaseSlot(Slot slot)
      Called by the job agent when the job has finished exeuting.
      Parameters:
      slot - The slot that was assigned to the job