|
||||||||||
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 DataManagerInterface
parameter
- Auftragsparameter
FailureException
- Fehler beim Interpretieren des Skripts.public AtlMeta getMetaInformation(SystemObject script) throws FailureException
DataManagerInterface
getMetaInformation
in interface DataManagerInterface
script
- Skriptobjekt.
null
falls keine Metainformation existiert.
FailureException
- Korrupte Metainformation.DataManagerInterface.getMetaInformation(SystemObject)
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public boolean isUnique(long protocolId)
isUnique
in interface DataManagerInterface
protocolId
- Protokoll-Id
public void addScriptRequest(ResultData[] resultData)
addScriptRequest
in interface DataManagerInterface
resultData
- Objekt mit den Anfrageparameternpublic java.lang.String getPath()
DataManagerInterface
File.separator
getPath
in interface DataManagerInterface
DataManagerInterface.getPath()
public ProcessingInformation process(java.lang.String source) throws CriticalParserException
DataManagerInterface
process
in interface DataManagerInterface
source
- Source des Skriptobjekts
CriticalParserException
- FehlermeldungDataManagerInterface.process(java.lang.String)
public void addProtocolRequest(ResultData[] resultData)
addProtocolRequest
in interface DataManagerInterface
resultData
- Objekt mit den Anfrageparameternpublic java.lang.String getFileNameSource(SystemObject script)
DataManagerInterface
getFileNameSource
in interface DataManagerInterface
script
- Skriptobjekt
DataManagerInterface.getFileNameSource(SystemObject)
public java.lang.String getFileNameMeta(SystemObject script)
DataManagerInterface
getFileNameMeta
in interface DataManagerInterface
script
- Skriptobjekt
DataManagerInterface.getFileNameMeta(SystemObject)
public java.lang.String getAbsolutFileNameMeta(SystemObject script)
DataManagerInterface
getAbsolutFileNameMeta
in interface DataManagerInterface
script
- Skriptobjekt
DataManagerInterface.getAbsolutFileNameMeta(SystemObject)
public java.lang.String getAbsolutFileNameSource(SystemObject script)
DataManagerInterface
getAbsolutFileNameSource
in interface DataManagerInterface
script
- Skriptobjekt
DataManagerInterface.getAbsolutFileNameSource(SystemObject)
public void addScriptRequest(ScriptRequest request)
DataManagerInterface
addScriptRequest
in interface DataManagerInterface
request
- AnfrageDataManagerInterface.addScriptRequest(de.bsvrz.pua.prot.manager.requests.ScriptRequest)
public void shutdown()
DataManagerInterface
shutdown
in interface DataManagerInterface
DataManagerInterface.shutdown()
public void deleteProtocol(long protocolId) throws NoncriticalException
DataManagerInterface
deleteProtocol
in interface DataManagerInterface
NoncriticalException
- Fehler beim Löschen.DataManagerInterface.deleteProtocol(long)
public ProtocolInputStream getSavedProtocol(long protocolId) throws FailureException
DataManagerInterface
getSavedProtocol
in interface DataManagerInterface
protocolId
- Id des Protokolls, das gelesen werden soll.
FailureException
- Fehler.DataManagerInterface.getSavedProtocol(long)
public ProtocolInputStream getUnreadProtocol(long protocolId) throws FailureException
DataManagerInterface
getUnreadProtocol
in interface DataManagerInterface
protocolId
- 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 DataManagerInterface
protocolId
- 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 DataManagerInterface
dmr
- 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 |