de.bsvrz.ars.ars.mgmt.tasks
Class ArchiveInfoQueryTask
java.lang.Object
java.lang.Thread
de.bsvrz.ars.ars.mgmt.tasks.Task
de.bsvrz.ars.ars.mgmt.tasks.MultiTask
de.bsvrz.ars.ars.mgmt.tasks.QueryTask
de.bsvrz.ars.ars.mgmt.tasks.ArchiveInfoQueryTask
- All Implemented Interfaces:
- SuspendableTask, ClientSenderInterface, Runnable
public class ArchiveInfoQueryTask
- extends QueryTask
Task zur Bearbeitung von Archiv-Informationsanfragen.
- Author:
- beck et al. projects GmbH, Alexander Schmidt
Fields inherited from class de.bsvrz.ars.ars.mgmt.tasks.QueryTask |
atgQuery, bosResult, ddResponse, deserializer, gData, gResultData, MIN_CONTAINER_FILES, NA, NN, OA, ON, queryAppObj, queryIdx, sendingState, serializer, serializerVersion, syncObj, t_lsMax, tempMem |
Method Summary |
private void |
addEntry(long startDIdx,
long startAT,
long startDT,
long endDIdx,
long endAT,
long endDT,
TimingType tt,
boolean gap,
boolean direct,
int volID,
int idx)
|
private void |
analyze()
|
private long |
calcLastDIdx(long obj,
long atg,
long asp,
short sv,
ArchiveTimeSpecification ats,
IndexResult oa,
IndexResult on,
IndexResult na,
IndexResult nn)
Errechnet den groessten Datenindex aus allen Containerlisten, der unter dem angegebenen TimingType noch innerhalb des angefragten Bereichs liegt. |
private void |
closeMultiContIter(MultiContainerDataIterator multiContIt)
|
private void |
extendLoeschschutz(long obj,
long atg,
long asp,
int sv,
ArchiveDataKind adk,
long contID)
|
private boolean |
getDirAccess(MultiContainerDataIterator mci)
|
private IndexResult |
getIndexResult(long obj,
long atg,
long asp,
short sv,
ArchiveTimeSpecification ats,
DataIdentNode din,
ArchiveDataKind adk)
|
private long |
getMaxContainerDataIndexMaxArchiveTime(long maxTime,
File containerFile)
Gibt von einer Containerdatei den höchsten DataIndex zurück, von dem die ArchiveTime nicht älter als die angegebene Zeit ist |
private long |
getMaxContainerDataIndexMaxDataTime(long maxTime,
File containerFile)
Gibt von einer Containerdatei den höchsten DataIndex zurück, von dem die DataTime nicht älter als die angegebene Zeit ist |
private int |
getMedienID(MultiContainerDataIterator mci)
|
private byte[] |
insertNumOfEntries(int numOfEntries)
|
private boolean |
isGap(long start,
ContainerDataIterator it)
|
private void |
printError(String msg)
|
private void |
sendResponse()
Beantwortet die Archivinformationsanfragen. |
private long |
ttVal(TimingType tt,
long dIdx,
long aTime,
long dTime)
|
void |
work()
Diese Methode ist zu überschreiben, um die konkrete Aufgabe der Task zu implementieren. |
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 |
GAP
private static final boolean GAP
- See Also:
- Constant Field Values
NO_GAP
private static final boolean NO_GAP
- See Also:
- Constant Field Values
NO_DIR_ACCESS
private static final boolean NO_DIR_ACCESS
- See Also:
- Constant Field Values
NO_MEDIUM_ID
private static final int NO_MEDIUM_ID
- See Also:
- Constant Field Values
adsList
private ArchiveDataSpecification[] adsList
indexMem
private byte[] indexMem
entryCounter
private int entryCounter
dummyTask
private ArchiveInfoQueryTask.DummyTask dummyTask
ArchiveInfoQueryTask
public ArchiveInfoQueryTask(ArchiveManager archiveMgr,
MultiTaskManager tMgr)
analyze
private void analyze()
throws Exception
- Throws:
Exception
getIndexResult
private IndexResult getIndexResult(long obj,
long atg,
long asp,
short sv,
ArchiveTimeSpecification ats,
DataIdentNode din,
ArchiveDataKind adk)
throws Exception
- Throws:
Exception
calcLastDIdx
private long calcLastDIdx(long obj,
long atg,
long asp,
short sv,
ArchiveTimeSpecification ats,
IndexResult oa,
IndexResult on,
IndexResult na,
IndexResult nn)
throws PersistenceException
- Errechnet den groessten Datenindex aus allen Containerlisten, der unter dem angegebenen TimingType noch innerhalb des angefragten Bereichs liegt.
- Parameters:
obj
- ObjektIDatg
- AttributgruppenIDasp
- AspektIDsv
- imVarats
- Bereichoa
- Liste der OA-Container (mit Hilfe der Indexe ermittelt)on
- Liste der ON-Container (mit Hilfe der Indexe ermittelt)na
- Liste der NA-Container (mit Hilfe der Indexe ermittelt)nn
- Liste der NN-Container (mit Hilfe der Indexe ermittelt)
- Returns:
- groessten passenden Datenindex
- Throws:
PersistenceException
getMaxContainerDataIndexMaxDataTime
private long getMaxContainerDataIndexMaxDataTime(long maxTime,
File containerFile)
throws PersistenceException
- Gibt von einer Containerdatei den höchsten DataIndex zurück, von dem die DataTime nicht älter als die angegebene Zeit ist
- Parameters:
maxTime
- Maximalzeit der Datenindexe, die berücksichtigt werdencontainerFile
- Die zu öffnende Containerdatei
- Returns:
- Den maximalen Datenindex innerhalb der Containerdatei oder -1 falls die Containerdatei gelöscht ist oder keine Daten enthält
- Throws:
PersistenceException
- Fehler in der Persistenz
getMaxContainerDataIndexMaxArchiveTime
private long getMaxContainerDataIndexMaxArchiveTime(long maxTime,
File containerFile)
throws PersistenceException
- Gibt von einer Containerdatei den höchsten DataIndex zurück, von dem die ArchiveTime nicht älter als die angegebene Zeit ist
- Parameters:
maxTime
- Maximalzeit der Datenindexe, die berücksichtigt werdencontainerFile
- Die zu öffnende Containerdatei
- Returns:
- Den maximalen Datenindex innerhalb der Containerdatei oder -1 falls die Containerdatei gelöscht ist oder keine Daten enthält
- Throws:
PersistenceException
- Fehler in der Persistenz
isGap
private boolean isGap(long start,
ContainerDataIterator it)
sendResponse
private void sendResponse()
throws IOException,
DataNotSubscribedException,
ConfigurationException,
SendSubscriptionNotConfirmed
- Beantwortet die Archivinformationsanfragen. Die einzelnen Archivinformationsanfragen aus
adsList
werden bearbeitet und beantwortet.
- Throws:
IOException
DataNotSubscribedException
ConfigurationException
SendSubscriptionNotConfirmed
extendLoeschschutz
private void extendLoeschschutz(long obj,
long atg,
long asp,
int sv,
ArchiveDataKind adk,
long contID)
throws PersistenceException
- Throws:
PersistenceException
closeMultiContIter
private void closeMultiContIter(MultiContainerDataIterator multiContIt)
getDirAccess
private boolean getDirAccess(MultiContainerDataIterator mci)
throws PersistenceException
- Throws:
PersistenceException
getMedienID
private int getMedienID(MultiContainerDataIterator mci)
throws PersistenceException
- Throws:
PersistenceException
ttVal
private long ttVal(TimingType tt,
long dIdx,
long aTime,
long dTime)
insertNumOfEntries
private byte[] insertNumOfEntries(int numOfEntries)
throws IOException
- Throws:
IOException
printError
private void printError(String msg)
throws IOException
- Throws:
IOException
addEntry
private void addEntry(long startDIdx,
long startAT,
long startDT,
long endDIdx,
long endAT,
long endDT,
TimingType tt,
boolean gap,
boolean direct,
int volID,
int idx)
throws IOException
- Throws:
IOException
work
public void work()
- Description copied from class:
MultiTask
- Diese Methode ist zu überschreiben, um die konkrete Aufgabe der Task zu implementieren. In der Methode soll keine weitere Synchronisation stattfinden.
- Specified by:
work
in class MultiTask