edu.cmu.emulator.sched
Class SchedServerImpl

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by edu.cmu.emulator.sched.SchedServerImpl
All Implemented Interfaces:
SchedServer, Serializable, Runnable, Remote

public class SchedServerImpl
extends UnicastRemoteObject
implements SchedServer, Runnable

See Also:
Serialized Form

Field Summary
protected static String[] batchUsers
           
protected  String dbHost
           
protected static int END_NOTIFICATION_INTERVAL_MILLIS
           
protected static int END_NOTIFICATION_THRESH_SECS
           
protected static int inactivityThresh
           
protected  boolean inStartup
           
protected  long lastActivity
           
protected  long lastUserListTime
           
protected static int reservationClaimThresh
           
protected  boolean running
           
protected  Runtime runtime
           
protected static int SCHED_CHECK_INTERVAL
           
protected  SchedDBMonitor schedDBMonitor
           
protected  SSHWorker sshWorker
           
protected static String[] systemUsers
           
protected  HashMap<String,String> tokenToUserMap
           
protected static int USER_LIST_INTERVAL
           
protected  ArrayList<String> userList
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface edu.cmu.emulator.sched.SchedServer
REG_NAME
 
Constructor Summary
SchedServerImpl()
           
SchedServerImpl(String dbHost)
           
 
Method Summary
protected  void checkForInactivity(Reservation curRes)
           
 void clean(String host)
           
protected  void findUserTokens()
           
protected  boolean getActive(Reservation curRes)
           
protected  void init()
           
protected  boolean isBatchUser(String userName)
           
static void main(String[] args)
           
protected  void notifyTimeRemaining(Reservation curRes)
           
protected  void notifyTimeRemaining(String userName, long secondsRemaining)
           
 void reboot(String host)
           
 void rExec(String host, String rCmd)
           
 void run()
           
 int secondsRemaining(String userToken)
           
protected  void sendUserMessage(String userName, String message)
           
 void start()
           
 void startBatch(Reservation batchRes)
           
protected  void startReservation(Reservation res)
           
protected  void startUser(Reservation res)
           
protected  void startUserOnHost(String userName, String host)
           
 void stopBatch(Reservation batchRes)
           
protected  void stopReservation(Reservation res)
           
protected  void stopUser(Reservation res)
           
protected  void stopUserOnHost(String userName, int userID, String host)
           
 
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

tokenToUserMap

protected HashMap<String,String> tokenToUserMap

running

protected boolean running

runtime

protected Runtime runtime

dbHost

protected String dbHost

schedDBMonitor

protected SchedDBMonitor schedDBMonitor

userList

protected ArrayList<String> userList

lastUserListTime

protected long lastUserListTime

inStartup

protected boolean inStartup

sshWorker

protected SSHWorker sshWorker

lastActivity

protected long lastActivity

USER_LIST_INTERVAL

protected static final int USER_LIST_INTERVAL
See Also:
Constant Field Values

SCHED_CHECK_INTERVAL

protected static final int SCHED_CHECK_INTERVAL
See Also:
Constant Field Values

END_NOTIFICATION_THRESH_SECS

protected static final int END_NOTIFICATION_THRESH_SECS
See Also:
Constant Field Values

END_NOTIFICATION_INTERVAL_MILLIS

protected static final int END_NOTIFICATION_INTERVAL_MILLIS
See Also:
Constant Field Values

inactivityThresh

protected static final int inactivityThresh
See Also:
Constant Field Values

reservationClaimThresh

protected static final int reservationClaimThresh
See Also:
Constant Field Values

batchUsers

protected static final String[] batchUsers

systemUsers

protected static final String[] systemUsers
Constructor Detail

SchedServerImpl

public SchedServerImpl()
                throws RemoteException
Throws:
RemoteException

SchedServerImpl

public SchedServerImpl(String dbHost)
                throws RemoteException
Throws:
RemoteException
Method Detail

start

public void start()
           throws Exception
Throws:
Exception

init

protected void init()
             throws Exception
Throws:
Exception

findUserTokens

protected void findUserTokens()
                       throws Exception
Throws:
Exception

secondsRemaining

public int secondsRemaining(String userToken)
Specified by:
secondsRemaining in interface SchedServer

run

public void run()
Specified by:
run in interface Runnable

notifyTimeRemaining

protected void notifyTimeRemaining(Reservation curRes)

notifyTimeRemaining

protected void notifyTimeRemaining(String userName,
                                   long secondsRemaining)

sendUserMessage

protected void sendUserMessage(String userName,
                               String message)

checkForInactivity

protected void checkForInactivity(Reservation curRes)

getActive

protected boolean getActive(Reservation curRes)

isBatchUser

protected boolean isBatchUser(String userName)

startBatch

public void startBatch(Reservation batchRes)

stopBatch

public void stopBatch(Reservation batchRes)

startReservation

protected void startReservation(Reservation res)

stopReservation

protected void stopReservation(Reservation res)

startUser

protected void startUser(Reservation res)

stopUser

protected void stopUser(Reservation res)

stopUserOnHost

protected void stopUserOnHost(String userName,
                              int userID,
                              String host)

startUserOnHost

protected void startUserOnHost(String userName,
                               String host)

clean

public void clean(String host)

reboot

public void reboot(String host)

rExec

public void rExec(String host,
                  String rCmd)

main

public static void main(String[] args)


Copyright © 2013. All Rights Reserved.