|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.rmi.server.RemoteObject java.rmi.server.RemoteServer java.rmi.activation.Activatable jpl.mipl.cassini.CDRS.servers.CDRSServerBase_Impl jpl.mipl.cassini.CDRS.servers.CDRSMonitorableServerBase_Impl jpl.mipl.cassini.CDRS.servers.CDRSSubControl_Impl
public class CDRSSubControl_Impl
Purpose: CDRS SubControl is responsible for running tasks. Upon receiving a request for job execution, the sub control creates the upf file and passes it to the tasks object. The task object then looks into the rules table to find out those tasks that it should run and starts running tasks from correct tasks (skipping those that may have been ran before).
<b> Copyright 2002, California Institute of Technology. ALL RIGHTS RESERVED. U.S. Government Sponsorship acknowledge.2002. CASSINI Downlink and Reconciliation Subsystem </b> ============================================================================ <b>Modification History :</b> -------------------- <b>Date Who What</b> ---------------------------------------------------------------------------- 05/04/2002 Alice Initial Release 06/20/2002 Raj Made modifications to make code clean. 09/04/2002 Raj Bug fixes to createUPF: = between LOG_DIR and value. Removed VIMS_/ISS_SOFTWARE_VERION key. 09/04/2002 Raj Added new fei file types keyword to the UPF. 04/04/2003 Raj Removed use of ldap filter from upf as per DAR CDRS_REMOVED_LDAP_FILTER 05/13/2003 Raj Modifed to only specify INSTRUMENT, STREAM_NAME and INSTRUMENT_ID once in UPF. Also, the DB_USER_NAME was using dbName's value from jobConfig instread of userName. 11/25/2003 Raj Modified to specify BOT and EOT into the UPF to be used by SWAt. ============================================================================
Field Summary |
---|
Fields inherited from class jpl.mipl.cassini.CDRS.servers.CDRSMonitorableServerBase_Impl |
---|
logger_ |
Fields inherited from class jpl.mipl.cassini.CDRS.servers.CDRSServerBase_Impl |
---|
dbConnection_, dbConnectionRequest_, serverId_, serverName_, startUpData_, stateSeparator_ |
Fields inherited from class java.rmi.server.RemoteObject |
---|
ref |
Fields inherited from interface jpl.mipl.cassini.CDRS.servers.CDRSServerBase |
---|
CDRSControlId, CDRSFirstServerId, CDRSGapReportServerId, CDRSInvalidServerId, CDRSLastServerId, CDRSLoggerId, CDRSPrimaryMonitorId, CDRSPRPId, CDRSRequestAnalyzerId, CDRSSchedulerId, CDRSSecondaryMonitorId, CDRSServerNames, CDRSSubControlId |
Constructor Summary | |
---|---|
CDRSSubControl_Impl(ActivationID activationid,
MarshalledObject marshalledobject)
|
Method Summary | |
---|---|
void |
doPeriodicWork()
Called to do periodic work like checking database for work. |
void |
doWorkOnGroup(int groupId)
|
int |
getCurrentLoad()
|
short |
getSCID()
|
String[] |
getState()
To be used by GUI for displaying server's state. |
String[] |
getStateLabels()
This method returns the label values corresponding to the values returned by getState() method. |
boolean |
handlesJobType(String jobType)
|
boolean |
isAssigned(CDRSReqJobElement r)
Return true if job is currently assigned to this subcontrol. |
void |
reassignTask(CDRSTask task)
Reassign task. |
void |
refresh()
Used to refresh object references or other related things that need to be obtained from database or naming service when stating up. |
void |
release(CDRSTask t,
CDRSReqJobElement e)
Remove a task from list. |
protected void |
restoreStateFromDB()
This methods obtains the : separated state stored in initialData field of the processConfig table, parses it and passes the retrived fields as string to setState() method. |
boolean |
runJob(Properties jobRecord)
|
protected void |
setState(String[] state)
For restoring state from data base. |
boolean |
shutdown(boolean forceIt)
Shutdown the thread that calls doPeriodicWork regularly. |
protected void |
storeStateInDB()
Writes server state, as : separated string in the initialData field of the subControlConfig table. |
Methods inherited from class jpl.mipl.cassini.CDRS.servers.CDRSMonitorableServerBase_Impl |
---|
getPingFrequency, setPingFrequency, shutDownThreads, startup, wakeUp |
Methods inherited from class jpl.mipl.cassini.CDRS.servers.CDRSServerBase_Impl |
---|
closeDBCondConn, closeDBConnection, finalize, openDBCondConn, openDBConnection, updateState |
Methods inherited from class java.rmi.activation.Activatable |
---|
exportObject, exportObject, exportObject, exportObject, getID, inactive, register, unexportObject, unregister |
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 |
---|
clone, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jpl.mipl.cassini.CDRS.servers.CDRSMonitorableServerBase |
---|
getPingFrequency, setPingFrequency, wakeUp |
Methods inherited from interface jpl.mipl.cassini.CDRS.servers.CDRSServerBase |
---|
startup, updateState |
Constructor Detail |
---|
public CDRSSubControl_Impl(ActivationID activationid, MarshalledObject marshalledobject) throws RemoteException, ActivationException, SQLException, NamingException, ClassNotFoundException
RemoteException
ActivationException
SQLException
NamingException
ClassNotFoundException
Method Detail |
---|
public String[] getStateLabels() throws RemoteException
CDRSServerBase
getStateLabels
in interface CDRSServerBase
RemoteException
public void refresh() throws RemoteException
CDRSMonitorableServerBase
refresh
in interface CDRSMonitorableServerBase
refresh
in class CDRSMonitorableServerBase_Impl
RemoteException
public short getSCID() throws RemoteException
getSCID
in interface CDRSSubControl
RemoteException
public boolean runJob(Properties jobRecord) throws RemoteException
runJob
in interface CDRSSubControl
RemoteException
public void doPeriodicWork() throws RemoteException
CDRSMonitorableServerBase
doPeriodicWork
in interface CDRSMonitorableServerBase
RemoteException
public void doWorkOnGroup(int groupId) throws Exception
Exception
public void reassignTask(CDRSTask task) throws RemoteException
reassignTask
in interface CDRSSubControl
RemoteException
public boolean shutdown(boolean forceIt) throws RemoteException
CDRSMonitorableServerBase_Impl
shutdown
in interface CDRSServerBase
shutdown
in class CDRSMonitorableServerBase_Impl
RemoteException
protected void storeStateInDB() throws Exception
storeStateInDB
in class CDRSServerBase_Impl
Exception
protected void restoreStateFromDB() throws SQLException, ClassNotFoundException
restoreStateFromDB
in class CDRSServerBase_Impl
SQLException
ClassNotFoundException
public String[] getState() throws RemoteException
CDRSServerBase
getState
in interface CDRSServerBase
RemoteException
protected void setState(String[] state) throws SQLException
setState
in class CDRSServerBase_Impl
SQLException
public boolean isAssigned(CDRSReqJobElement r) throws RemoteException
isAssigned
in interface CDRSSubControl
RemoteException
public int getCurrentLoad() throws RemoteException
getCurrentLoad
in interface CDRSSubControl
RemoteException
public void release(CDRSTask t, CDRSReqJobElement e)
public boolean handlesJobType(String jobType) throws RemoteException
handlesJobType
in interface CDRSSubControl
RemoteException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |