|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
de.bsvrz.pua.prot.manager.datamanager.DataManager
public class DataManager
Submodul Daten Manager.
1. Übernimmt die Verwaltung von Dateisystem-Operationen:
- Schreiben von Protokollen
- Herausfinden, ob eine bestimmte Protokoll-Id bereits vergeben wurde
- Lesen und Schreiben von Skriptquelltexten
2. Zugriff auf die Konfiguration zur Verwaltung von Skript-Quelltexten
3. Zugriff auf den Skript-Interpreter
Geht eine Anfrage über die Methoden addProtocolRequest(ResultData[]) oder
addScriptRequest(ResultData[]) ein, so wird diese Anfrage in einem Ringpuffer abgelegt.
Ist der Thread unbeschäftigt, werden sie der Reihe nach (FIFO) abgearbeitet.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
DataManager(ClientDavInterface dav,
java.lang.String path,
int quota,
boolean prettyPrinter)
Erzeugen des Data Managers. |
|
| Method Summary | |
|---|---|
void |
addProtocolRequest(ResultData[] resultData)
Übergeben einer Protokoll-bezogenen Anfrage. |
void |
addScriptRequest(ResultData[] resultData)
Übergeben einer Skript-bezogenen Anfrage. |
void |
addScriptRequest(ScriptRequest request)
Übergeben einer Skript-bezogenen Anfrage |
ProtocolOutputStream |
createProtocolStream(long protocolId,
ProcessingParameter pp)
Erzeugt einen Ausgabestream für ein Protokoll. |
void |
deleteProtocol(long protocolId)
Löscht ein gespeichertes Protokoll. |
java.lang.String |
getAbsolutFileNameMeta(SystemObject script)
Liefert Pfad und Dateiname der Metainformation |
java.lang.String |
getAbsolutFileNameSource(SystemObject script)
Liefert Pfad und Dateiname des Skriptquelltextes |
java.lang.String |
getFileNameMeta(SystemObject script)
Liefert den Dateinamen der Metainformationen. |
java.lang.String |
getFileNameSource(SystemObject script)
Liefert den Dateinamen des Skriptquelltexts. |
AtlMeta |
getMetaInformation(SystemObject script)
Liefert die zum Skript gehörenden Metainformationen. |
java.lang.String |
getPath()
Gibt den Pfad der Protokoll- und Skriptdateien zurück. |
ProtocolInputStream |
getSavedProtocol(long protocolId)
Liefert ein Objekt zum Zugriff auf ein gespeichertes Protokoll zurück. |
ProtocolInputStream |
getUnreadProtocol(long protocolId)
Liefert ein Objekt zum Zugriff auf ein gespeichertes Protokoll zurück. |
DataManagerRequest[] |
getUpcomingOps(DataManagerRequest[] dmr)
Liefert eine Liste mit anstehenden Aufgaben. |
boolean |
isUnique(long protocolId)
Überprüft ob es zu der gegebenen Protokoll-Id bereits ein gespeichertes Protokoll gibt. |
ProcessingInformation |
process(ProcessingParameter parameter)
Startet die Interpretation eines Skriptes: 1. |
ProcessingInformation |
process(java.lang.String source)
Startet die Interpretation eines Skriptes. |
void |
run()
Arbeitet die Aufträge ab. |
void |
shutdown()
Fährt den Data-Manager herunter. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DataManager(ClientDavInterface dav,
java.lang.String path,
int quota,
boolean prettyPrinter)
throws FailureException
Thread.start() gestartet werden.
dav - Verbindung zum Datenverteilerpath - Pfad unter dem die Dateien (Skriptquelltexte und Protokolldateien) verwaltet werden.quota - Minimaler verbleibender Speicherplatz auf dem Datenträgern (in MB)prettyPrinter - Steuert ob der Pretty Printer verwendet werden soll.
FailureException - Falls ein ungültiger Pfad übergeben wird.| Method Detail |
|---|
public ProcessingInformation process(ProcessingParameter parameter)
throws FailureException
process in interface DataManagerInterfaceparameter - Auftragsparameter
FailureException - Fehler beim Interpretieren des Skripts.
public AtlMeta getMetaInformation(SystemObject script)
throws FailureException
DataManagerInterface
getMetaInformation in interface DataManagerInterfacescript - Skriptobjekt.
null falls keine Metainformation existiert.
FailureException - Korrupte Metainformation.DataManagerInterface.getMetaInformation(SystemObject)public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic boolean isUnique(long protocolId)
isUnique in interface DataManagerInterfaceprotocolId - Protokoll-Id
public void addScriptRequest(ResultData[] resultData)
addScriptRequest in interface DataManagerInterfaceresultData - Objekt mit den Anfrageparameternpublic java.lang.String getPath()
DataManagerInterfaceFile.separator
getPath in interface DataManagerInterfaceDataManagerInterface.getPath()
public ProcessingInformation process(java.lang.String source)
throws CriticalParserException
DataManagerInterface
process in interface DataManagerInterfacesource - Source des Skriptobjekts
CriticalParserException - FehlermeldungDataManagerInterface.process(java.lang.String)public void addProtocolRequest(ResultData[] resultData)
addProtocolRequest in interface DataManagerInterfaceresultData - Objekt mit den Anfrageparameternpublic java.lang.String getFileNameSource(SystemObject script)
DataManagerInterface
getFileNameSource in interface DataManagerInterfacescript - Skriptobjekt
DataManagerInterface.getFileNameSource(SystemObject)public java.lang.String getFileNameMeta(SystemObject script)
DataManagerInterface
getFileNameMeta in interface DataManagerInterfacescript - Skriptobjekt
DataManagerInterface.getFileNameMeta(SystemObject)public java.lang.String getAbsolutFileNameMeta(SystemObject script)
DataManagerInterface
getAbsolutFileNameMeta in interface DataManagerInterfacescript - Skriptobjekt
DataManagerInterface.getAbsolutFileNameMeta(SystemObject)public java.lang.String getAbsolutFileNameSource(SystemObject script)
DataManagerInterface
getAbsolutFileNameSource in interface DataManagerInterfacescript - Skriptobjekt
DataManagerInterface.getAbsolutFileNameSource(SystemObject)public void addScriptRequest(ScriptRequest request)
DataManagerInterface
addScriptRequest in interface DataManagerInterfacerequest - AnfrageDataManagerInterface.addScriptRequest(de.bsvrz.pua.prot.manager.requests.ScriptRequest)public void shutdown()
DataManagerInterface
shutdown in interface DataManagerInterfaceDataManagerInterface.shutdown()
public void deleteProtocol(long protocolId)
throws NoncriticalException
DataManagerInterface
deleteProtocol in interface DataManagerInterfaceNoncriticalException - Fehler beim Löschen.DataManagerInterface.deleteProtocol(long)
public ProtocolInputStream getSavedProtocol(long protocolId)
throws FailureException
DataManagerInterface
getSavedProtocol in interface DataManagerInterfaceprotocolId - Id des Protokolls, das gelesen werden soll.
FailureException - Fehler.DataManagerInterface.getSavedProtocol(long)
public ProtocolInputStream getUnreadProtocol(long protocolId)
throws FailureException
DataManagerInterface
getUnreadProtocol in interface DataManagerInterfaceprotocolId - Id des Protokolls, das gelesen werden soll.
FailureException - Fehler.DataManagerInterface.getUnreadProtocol(long)
public ProtocolOutputStream createProtocolStream(long protocolId,
ProcessingParameter pp)
throws NoncriticalException
DataManagerInterface
createProtocolStream in interface DataManagerInterfaceprotocolId - Protokoll-Id.pp - Auftragsparameter.
NoncriticalException - Die Datei kann nicht angelegt werden; Fehler beim Schreiben der Protokollinformationen.DataManagerInterface.createProtocolStream(long, de.bsvrz.pua.prot.util.ProcessingParameter)public DataManagerRequest[] getUpcomingOps(DataManagerRequest[] dmr)
DataManagerInterface
getUpcomingOps in interface DataManagerInterfacedmr - Array, in den das Ergebnis kopiert wird. Ist der Array zu klein, so wird ein neuer Array angelegt.
DataManagerInterface.getUpcomingOps(DataManagerRequest[])
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||