orca.controllers.jaws
Class JawsController

java.lang.Object
  extended by orca.controllers.jaws.JawsController
All Implemented Interfaces:
IController, IInitialize, ILoadSource, ISerialize

public class JawsController
extends java.lang.Object
implements IController


Nested Class Summary
protected  class JawsController.JawsEventHandler
           
protected  class JawsController.PlushManager
           
 
Field Summary
protected  long advanceTime
           
static long ClockSkew
           
protected  boolean controllerEnabled
           
protected  JawsHandler handler
           
protected  ImageDescriptor image
           
protected  LoggingTool logger
           
static java.lang.String MasterConfig
           
protected  boolean needAdvanceTime
           
protected  boolean needReservation
           
protected  int numReserveWorkers
           
protected  java.util.Hashtable<java.lang.String,CodReservation> pendingReservations
           
protected  int port
           
static java.lang.String PropertyMaster
           
static java.lang.String PropertyMasterIP
           
static java.lang.String PropertyMasterName
           
static java.lang.String PropertyReservationType
           
static java.lang.String PropertyWorker
           
protected  java.util.Hashtable<java.lang.Integer,java.lang.String> requests
           
protected  java.lang.String root
           
protected  ResourceType rtype
           
static java.lang.String ServiceName
           
protected  Slice slice
           
protected  IServiceManager sm
           
static java.lang.String TestFileName
           
protected  org.apache.xmlrpc.WebServer webserver
           
static java.lang.String WorkerConfig
           
 
Constructor Summary
JawsController()
           
 
Method Summary
protected  void bid(long cycle)
          This bidding policy bids for one master reservation and multiple worker reservations.
 void disableController()
           
 void enableController()
           
 IActor getActor()
           
protected  long getAdvanceTime()
          Calls up to a default broker to query and set the advance time.
 int getClusterSize()
           
 long getCompletedJobs()
           
 LoggingTool getLogger()
          Returns the logger associated with the controller.
 Node getMasterNode()
           
 int getNumReserveWorkers()
           
 int getNumWorkers()
           
 int getQueueLength()
           
 int getRunningJobs()
           
 Slice getSlice()
          Returns the slice the controller belongs to.
 java.util.Vector<Node> getWorkerNodes()
           
 void initialize()
          Initializes the object.
 boolean isActive()
           
 boolean isControllerEnabled()
           
protected  void jobCompleted(int port)
           
protected  void queueRequest(int port, java.lang.String fileName)
           
protected  void queueReservation(java.lang.String port, CodReservation r)
           
 void reset(java.util.Properties p)
          De-serializes the object from the given properties list.
 java.util.Properties save()
          Serializes the object into a properties list.
 void save(java.util.Properties p)
          Serializes the object into the given properties list.
 void setActor(IActor sm)
          Attach the actor
 void setNumReserveWorkers(int numReserveWorkers)
           
 void setSlice(Slice slice)
          Sets the slice this controller will be associated with.
 int submitJob()
           
 void tick(long cycle)
          Informs the load source that another cycle has passed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ClockSkew

public static long ClockSkew

WorkerConfig

public static final java.lang.String WorkerConfig
See Also:
Constant Field Values

MasterConfig

public static final java.lang.String MasterConfig
See Also:
Constant Field Values

PropertyMasterIP

public static final java.lang.String PropertyMasterIP
See Also:
Constant Field Values

PropertyMasterName

public static final java.lang.String PropertyMasterName
See Also:
Constant Field Values

PropertyReservationType

public static final java.lang.String PropertyReservationType
See Also:
Constant Field Values

PropertyMaster

public static final java.lang.String PropertyMaster
See Also:
Constant Field Values

PropertyWorker

public static final java.lang.String PropertyWorker
See Also:
Constant Field Values

ServiceName

public static final java.lang.String ServiceName
See Also:
Constant Field Values

TestFileName

public static final java.lang.String TestFileName
See Also:
Constant Field Values

image

protected ImageDescriptor image

numReserveWorkers

protected int numReserveWorkers

sm

protected IServiceManager sm

rtype

protected ResourceType rtype

logger

protected LoggingTool logger

needAdvanceTime

protected boolean needAdvanceTime

needReservation

protected boolean needReservation

advanceTime

protected long advanceTime

slice

protected Slice slice

root

protected java.lang.String root

controllerEnabled

protected boolean controllerEnabled

webserver

protected org.apache.xmlrpc.WebServer webserver

port

protected int port

handler

protected JawsHandler handler

pendingReservations

protected java.util.Hashtable<java.lang.String,CodReservation> pendingReservations

requests

protected java.util.Hashtable<java.lang.Integer,java.lang.String> requests
Constructor Detail

JawsController

public JawsController()
Method Detail

initialize

public void initialize()
                throws java.lang.Exception
Description copied from interface: IInitialize
Initializes the object.

Specified by:
initialize in interface IInitialize
Throws:
java.lang.Exception

queueReservation

protected void queueReservation(java.lang.String port,
                                CodReservation r)

queueRequest

protected void queueRequest(int port,
                            java.lang.String fileName)

getAdvanceTime

protected long getAdvanceTime()
Calls up to a default broker to query and set the advance time.


enableController

public void enableController()

disableController

public void disableController()

isControllerEnabled

public boolean isControllerEnabled()

tick

public void tick(long cycle)
Informs the load source that another cycle has passed. Initiates the formation of demand for the service manager.

Specified by:
tick in interface ILoadSource
Parameters:
cycle - this cycle

bid

protected void bid(long cycle)
This bidding policy bids for one master reservation and multiple worker reservations. Must make sure if we are recovering we don't deploy a new master. On recovery must recover master and worker reservations.

Parameters:
cycle -

getQueueLength

public int getQueueLength()

getNumWorkers

public int getNumWorkers()

getRunningJobs

public int getRunningJobs()

getCompletedJobs

public long getCompletedJobs()

getMasterNode

public Node getMasterNode()

getWorkerNodes

public java.util.Vector<Node> getWorkerNodes()

save

public java.util.Properties save()
                          throws java.lang.Exception
Description copied from interface: ISerialize
Serializes the object into a properties list.

Specified by:
save in interface ISerialize
Returns:
properties list representing this object
Throws:
java.lang.Exception

save

public void save(java.util.Properties p)
          throws java.lang.Exception
Description copied from interface: ISerialize
Serializes the object into the given properties list.

Specified by:
save in interface ISerialize
Parameters:
p - properties list to serialize the object into
Throws:
java.lang.Exception

reset

public void reset(java.util.Properties p)
           throws java.lang.Exception
Description copied from interface: ISerialize
De-serializes the object from the given properties list.

Specified by:
reset in interface ISerialize
Parameters:
p - properties list containing the serialized version of the object
Throws:
java.lang.Exception

getClusterSize

public int getClusterSize()

setActor

public void setActor(IActor sm)
Description copied from interface: ILoadSource
Attach the actor

Specified by:
setActor in interface ILoadSource
Parameters:
sm - the service manager

setSlice

public void setSlice(Slice slice)
Description copied from interface: IController
Sets the slice this controller will be associated with.

Specified by:
setSlice in interface IController

getSlice

public Slice getSlice()
Description copied from interface: IController
Returns the slice the controller belongs to.

Specified by:
getSlice in interface IController
Returns:
slice the controller belongs to

submitJob

public int submitJob()

getLogger

public LoggingTool getLogger()
Description copied from interface: ILoadSource
Returns the logger associated with the controller.

Specified by:
getLogger in interface ILoadSource
Returns:
logger associated with the controller

getActor

public IActor getActor()

isActive

public boolean isActive()

jobCompleted

protected void jobCompleted(int port)

getNumReserveWorkers

public int getNumReserveWorkers()

setNumReserveWorkers

public void setNumReserveWorkers(int numReserveWorkers)


Copyright © 2007 Network/Internet Computing Lab. All Rights Reserved.