class ALDPortHash extends Object
This class holds for each processed data item its link into the processing history. All data items manipulated by any Alida operator during a session are stored in this hash for later documentation.
The basic concept of Alida assumes that data objects are manipulated by operators. Accordingly, to log data object manipulations it is straightforward to trace all operator calls with their configurations, i.e. input and output objects and parameter settings. If in addition also the order of operator calls is available it is possible to reconstruct the processing history for each single data object.
This hash stores for each data object a link (via a port) to the last manipulating operator. Internally, operators are further linked together allowing to trace back the whole processing history.
Modifier and Type | Field and Description |
---|---|
private static ALDConcReadWeakHashMap |
historyAnchors
Hashmap of port links into the processing history.
|
Modifier | Constructor and Description |
---|---|
private |
ALDPortHash()
Constructor without function.
|
Modifier and Type | Method and Description |
---|---|
protected static int |
getEntryNum()
Returns the number of objects currently stored in the port hash.
|
protected static ALDPort |
getHistoryLink(Object obj)
Get port to which object is currently linked in the history.
|
protected static boolean |
isRegistered(Object obj)
Returns true if the given object is already registered in the hash.
|
protected static void |
register(Object obj)
Adds the object's port to the hash.
|
protected static void |
setHistoryLink(Object obj,
ALDPort port)
Set port to which data is currently linked in the history.
|
private static ALDConcReadWeakHashMap historyAnchors
private ALDPortHash()
Note that there will only be one port hash per session and not many different objects of this type.
protected static int getEntryNum()
Note that the number can be larger than the number of objects actually referenced from the Java process due to the management of weak references by the Java Garbage Collector.
protected static void register(Object obj)
If there is no key in the database equal to the given object, a new
hashmap entry is generated, i.e. a new ALDDataPort
is initialized
and put into the port database. .
obj
- Object to be registered.protected static boolean isRegistered(Object obj)
protected static ALDPort getHistoryLink(Object obj)
protected static void setHistoryLink(Object obj, ALDPort port)
Note that if the object was not registered before, this is done now. Subsequently the port is set to the given port object.
port
- New current port the data is linked to.Copyright © 2010–2021 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.