|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.clients.jobagent.slotmanager.RemoteSlotManager
public class RemoteSlotManager
Slot manager implementation that requests slots from another
job agent. The other job agent should be using the MasterSlotManager
.
Communication between the job agents is made on the remote control
port on the master job agent. Make sure that the master slot manager
allows connections from this host by including it's ip address in the
'agent.remotecontrol' setting.
Configuration options for this slot manager:
Nested Class Summary | |
---|---|
(package private) static class |
RemoteSlotManager.RemoteSlotPinger
Task that is scheduled at regular intervals to send ping commands to the remote host. |
Field Summary | |
---|---|
private Agent |
agent
|
private int |
connectTimeout
|
private static Logger |
log
|
private TimerTask |
pingerTask
|
private String |
remoteHost
|
private int |
remotePort
|
private Map<String,Slot> |
remoteSlots
|
Constructor Summary | |
---|---|
RemoteSlotManager()
|
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. |
(package private) void |
pingRemoteSlots()
Ping the the remote host with all active slots. |
void |
releaseSlot(Slot slot)
Called by the job agent when the job has finished exeuting. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final Logger log
private Agent agent
private String remoteHost
private int remotePort
private int connectTimeout
private Map<String,Slot> remoteSlots
private TimerTask pingerTask
Constructor Detail |
---|
public RemoteSlotManager()
Method Detail |
---|
public void init(Agent agent)
SlotManager
init
in interface SlotManager
agent
- The job agentpublic void close()
SlotManager
close
in interface SlotManager
public Slot getSlot(Job job)
SlotManager
getSlot
in interface SlotManager
job
- The job that the job agent wants to execute
public void releaseSlot(Slot slot)
SlotManager
releaseSlot
in interface SlotManager
slot
- The slot that was assigned to the jobvoid pingRemoteSlots()
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |