2.17.2: 2011-06-17

net.sf.basedb.clients.jobagent.slotmanager
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 (Tue, 19 Oct 2010) $

Method Summary
 void close()
          This method is called when the job agent is shutting down.
 Slot getSlot(Job job)
          Get a slot for the specified job.
 void init(Agent agent)
          Initialize the slot manager.
 void releaseSlot(Slot slot)
          Called by the job agent when the job has finished exeuting.
 

Method Detail

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

2.17.2: 2011-06-17