|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
jist.runtime.RemoteJist.JobQueueServer
public static class RemoteJist.JobQueueServer
Job queue server.
| Field Summary | |
|---|---|
static java.lang.String |
JIST_JOBSERVER_RMI_NAME
RMI name of job queue server. |
private java.util.Vector |
jobs
job queue. |
private RemoteIO.RemoteOutputStreamReceiver |
rout
local server output stream. |
private int |
serversWaiting
number of server in wait lock. |
| Fields inherited from class java.rmi.server.RemoteObject |
|---|
ref |
| Constructor Summary | |
|---|---|
RemoteJist.JobQueueServer(int port,
java.io.PrintStream out)
Start new job queue server. |
|
| Method Summary | |
|---|---|
void |
addJob(RemoteJist.Job job,
boolean front)
Add job to queue. |
RemoteJist.Job |
getJob(long maxMem)
Return next job from queue, or null if queue is empty. |
static RemoteJist.JobQueueServerRemote |
getRemote(Node n)
Return stub of remote job queue server. |
RemoteIO.RemoteOutputStreamRemote |
getStdOut()
Return RMI handle to queue standard output stream. |
private int |
numJobsConstraints(long maxMem)
Return number of queued jobs that satisfy server constraints. |
private boolean |
satisfyConstraint(RemoteJist.Job j,
long maxMem)
Determine whether server resources satisfy job constraints. |
private void |
showJobs()
Show list of currently queued simulation jobs. |
void |
waitForJob(long maxMem)
Wait for job. |
private void |
writeln(java.lang.String s)
Write line to output (appending newline). |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
|---|
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
|---|
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
|---|
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String JIST_JOBSERVER_RMI_NAME
private java.util.Vector jobs
private int serversWaiting
private RemoteIO.RemoteOutputStreamReceiver rout
| Constructor Detail |
|---|
public RemoteJist.JobQueueServer(int port,
java.io.PrintStream out)
throws java.rmi.RemoteException
port - rmi listen portout - local server output stream
java.rmi.RemoteException - rpc failure| Method Detail |
|---|
public static RemoteJist.JobQueueServerRemote getRemote(Node n)
throws java.rmi.NotBoundException,
java.net.MalformedURLException,
java.rmi.RemoteException
n - node (host:port) of remote job queue server
java.rmi.NotBoundException - when jist not bound (started) on remote server
java.net.MalformedURLException - never
java.rmi.RemoteException - rpc failure
private void showJobs()
throws java.rmi.RemoteException
java.rmi.RemoteException - rpc failure
private void writeln(java.lang.String s)
throws java.rmi.RemoteException
s - text to output
java.rmi.RemoteException - rpc failureprivate int numJobsConstraints(long maxMem)
maxMem - maximum available server memory
private boolean satisfyConstraint(RemoteJist.Job j,
long maxMem)
j - job to verify against constraintsmaxMem - maximum available server memory
public void addJob(RemoteJist.Job job,
boolean front)
throws java.rmi.RemoteException
addJob in interface RemoteJist.JobQueueServerRemotejob - job to enqueuefront - whether job should be added to the front of the queue
java.rmi.RemoteException - rpc failure
public void waitForJob(long maxMem)
throws java.rmi.RemoteException
waitForJob in interface RemoteJist.JobQueueServerRemotemaxMem - maximum available server memory
java.rmi.RemoteException - rpc failure
public RemoteJist.Job getJob(long maxMem)
throws java.rmi.RemoteException
getJob in interface RemoteJist.JobQueueServerRemotemaxMem - maximum available server memory
java.rmi.RemoteException - rpc failure
public RemoteIO.RemoteOutputStreamRemote getStdOut()
throws java.rmi.RemoteException
getStdOut in interface RemoteJist.JobQueueServerRemotejava.rmi.RemoteException - rpc failure
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||