|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
de.bsvrz.ars.ars.mgmt.tasks.Task
de.bsvrz.ars.ars.mgmt.tasks.ArchiveTask
public class ArchiveTask
Task zur Archivierung von Datensaetzen. Ist nicht von SingleTask abgeleitet, weil ein spezieller ArchiveRingBuffer verwendet wird, der zwei Objekte (ResultData und Archivzeit) speichern kann. Die work()-Methode hat deswegen zwei Parameter.
Nested Class Summary | |
---|---|
static class |
ArchiveTask.CloseContainerObject
Eine Instanz dieser Klasse wird eingefuegt, wenn ein Container aufgrund einer Parametrierungs-Aenderung abgeschlossen werden soll. |
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
protected ArchiveDataKind |
adk
|
protected long |
arsTime
|
protected long |
aspID
|
protected AttributeGroup |
atg
|
protected Deflater |
compresser
|
protected int |
dataEntryLen
Laenge des serislisierten Datensatzes inklusive Datensatz-Header |
protected long |
dataIdx
|
protected long |
dataTime
|
protected String |
didPath
|
protected String |
didPathA
|
protected String |
didPathN
|
protected DataIdentNode |
din
|
protected byte[] |
idxBuffer
|
static String |
MSG_PID_DATAINDEX_ANOMALY
Kennzeichen der Betriebsmeldung |
protected static ArchiveDataKind |
NA
|
protected static ArchiveDataKind |
NN
|
protected long |
objID
|
protected static boolean |
ONLINE
|
protected long |
openContID
|
protected static boolean |
REQUESTED
|
protected int |
sv
|
Fields inherited from class de.bsvrz.ars.ars.mgmt.tasks.Task |
---|
archMgr, didTree, INDEX_MEMORY_SIZE, isTerminated, logger, persMgr, ringOfDeathListener, taskStepListeners |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
ArchiveTask(ArchiveManager archiveMgr,
RingOfDeathListener rodl,
int tskIdx,
ArchiveRingBuffer inQueue)
Konstruktor des Archiv-Tasks. |
Method Summary | |
---|---|
protected void |
assignIndexes(boolean requested)
|
protected void |
createRebuildIndexFlagFile()
Erzeugt die Kennzeichen-Datei, ob die Indexe veraendert wurden, um nach einem Absturz den Wiederanlauf zu beschleunigen. |
static long |
getCloseContainerSuccess()
|
static ContainerSettings |
getContainerSettings()
Liefert die Container-Einstellungen des Archivsystems. |
static long |
getLastArchiveTime()
|
static long |
getTotalDS_Fail()
|
static long |
getTotalDS_Processed()
|
static long |
getTotalDS_Queued()
|
static long |
getTotalDS_Success()
|
protected void |
handleErr(Exception e,
ArchiveTask.CloseContainerObject cco)
|
protected void |
handleErr(Exception e,
String corpusDelicti)
|
protected void |
handleSevereErr(Throwable e,
String corpusDelicti)
|
static void |
incrementTotalDS_Queued()
Wird vom InQueuesMgr.ArchiveDataReceiver aufgerufen, nachdem er einen zu archivierenden Datensatz in eine der Queues gelegt
hat. |
protected void |
logManualCloseContainer(long closeObjID,
ArchiveTask.CloseContainerObject cco)
|
protected void |
logNewContainer()
|
protected void |
logReceivedData(ResultData rd)
|
protected void |
logWriteData()
|
protected void |
lookupLastDataIdxes(boolean requested)
Sucht die letzten Datenindexe im Index sowie den Container aus dem . |
protected boolean |
mustCloseContainer(boolean requested)
Prueft ob ein Container abgeschlossen werden muss. |
static void |
resetDSCounter()
Setzt alle Zaehler auf 0. |
void |
run()
|
static void |
setContainerSettings(ContainerSettings cs)
Setzt die Container-Einstellungen des Archivsystems. |
static void |
setLastArchiveTime(long atime)
|
protected boolean |
storeData()
|
protected boolean |
tooLargeForNewContainer()
Prueft extra auf Containergroesse. |
void |
work(Object resultData,
long archTime)
Archiviert den uebergebenen Datensatz unter dem angegebenen Archivzeitstempel. |
Methods inherited from class de.bsvrz.ars.ars.mgmt.tasks.Task |
---|
addTaskStepListener, getArchMgr, isTaskTerminated, removeTaskStepListener, suspendTaskIfNecessary, terminateTask |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, 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 |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final boolean REQUESTED
protected static final boolean ONLINE
protected static final ArchiveDataKind NA
protected static final ArchiveDataKind NN
public static final String MSG_PID_DATAINDEX_ANOMALY
protected byte[] idxBuffer
protected long objID
protected long aspID
protected long arsTime
protected long dataTime
protected long dataIdx
protected long openContID
protected AttributeGroup atg
protected int sv
protected ArchiveDataKind adk
protected String didPath
protected String didPathA
protected String didPathN
protected DataIdentNode din
protected int dataEntryLen
protected Deflater compresser
Constructor Detail |
---|
public ArchiveTask(ArchiveManager archiveMgr, RingOfDeathListener rodl, int tskIdx, ArchiveRingBuffer inQueue)
tMgr
- Task-ManagerpMgr
- Persistenz-ManagerMethod Detail |
---|
public static void setContainerSettings(ContainerSettings cs)
cs
- Container-Einstellungenpublic static ContainerSettings getContainerSettings()
public void run()
run
in interface Runnable
run
in class Thread
public static void incrementTotalDS_Queued()
InQueuesMgr.ArchiveDataReceiver
aufgerufen, nachdem er einen zu archivierenden Datensatz in eine der Queues gelegt
hat.
public static long getTotalDS_Queued()
public static long getTotalDS_Processed()
public static long getTotalDS_Success()
public static long getTotalDS_Fail()
public static long getCloseContainerSuccess()
resetDSCounter()
erfolgreich verarbeiteten Close-Container-Datensaetze. Kann zur
Test-Synchronisation verwendet werden.public static void resetDSCounter()
public static void setLastArchiveTime(long atime)
public static long getLastArchiveTime()
protected void assignIndexes(boolean requested) throws DIdNodeNotFoundException, IndexException, PersistenceException
DIdNodeNotFoundException
IndexException
PersistenceException
public void work(Object resultData, long archTime)
resultData
- ErgebnisdatensatzarchTime
- Archivzeitstempelprotected boolean storeData() throws PersistenceException, IndexException
PersistenceException
IndexException
protected void lookupLastDataIdxes(boolean requested) throws IndexException
IndexException
protected void handleErr(Exception e, String corpusDelicti)
protected void handleErr(Exception e, ArchiveTask.CloseContainerObject cco)
protected void handleSevereErr(Throwable e, String corpusDelicti)
protected void createRebuildIndexFlagFile() throws PersistenceException
PersistenceException
protected void logReceivedData(ResultData rd)
protected void logWriteData() throws IndexException
IndexException
protected void logNewContainer()
protected void logManualCloseContainer(long closeObjID, ArchiveTask.CloseContainerObject cco)
protected boolean mustCloseContainer(boolean requested) throws PersistenceException, IndexException
containerSettings
und dem mit de.bsvrz.ars.ars.persistence.PersistenceManager#accessContainer()
im Zugriff befindlichen Daten. Der Aufrufer dieser Methode muss die Synchronisierung
ueber den DataIdentNode durchfuehren.
requested
- Wahr fuer nachgeforderte, falsch fuer aktuelle Daten.
PersistenceException
IndexException
protected boolean tooLargeForNewContainer() throws PersistenceException
PersistenceException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |