public abstract class MutableSetStorage extends Object
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
MutableSetStorage.MutableElement
Repräsentiert ein Element der Menge mit dem Zeitstempel, ab dem das Element zur Menge gehört und dem Zeitstempel, ab dem das Element
nicht mehr zur Menge gehört.
|
| Modifier and Type | Field and Description |
|---|---|
private SoftReference<List<MutableSetStorage.MutableElement>> |
_elements |
| Constructor and Description |
|---|
MutableSetStorage() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Collection<SystemObject> addedElements,
short simulationVariant)
Fügt Objekte zu der Menge hinzu
|
private static void |
cleanTailElements(List<MutableSetStorage.MutableElement> mutableElements)
Entfernt überflüssige leere/ungültige Einträge am Ende der Liste der referenzierten Objekte
|
List<SystemObject> |
deleteElements(short simulationVariant)
Löscht Objekte eienr angegebenen Simulation permanent und vollständig aus dieser Menge (z.
|
List<SystemObject> |
deleteElementsOlderThan(long deletionTime)
Entfernt alle historischen (ungültigen) Elemente, die vor dem angegebenen Zeitstempel auf ungültig gesetzt wurden
|
List<MutableSetStorage.MutableElement> |
getMutableElements()
Gibt alle aktuell enthaltenen Elemente zurück.
|
void |
invalidate(Collection<SystemObject> removedElements,
short simulationVariant)
Macht Objektreferenzen in der Menge ungültig
|
void |
purgeCache() |
protected abstract List<MutableSetStorage.MutableElement> |
readElements()
Gibt alle bisher gespeicherten Elemente (auch ungültige/gelöschte) zurück.
|
protected abstract void |
writeElements(List<MutableSetStorage.MutableElement> mutableElements)
Schreibt eine Menge von Mengenelementen in den dahinterliegenden Speicher (etweder Konfigurationsdaten oder externe Datei).
|
private SoftReference<List<MutableSetStorage.MutableElement>> _elements
private static void cleanTailElements(List<MutableSetStorage.MutableElement> mutableElements)
mutableElements - Liste mit allen elemente, wird modifiziertpublic final void add(Collection<SystemObject> addedElements, short simulationVariant) throws ConfigurationChangeException
addedElements - ObjektesimulationVariant - SimulationsvarianteConfigurationChangeExceptionpublic final void invalidate(Collection<SystemObject> removedElements, short simulationVariant) throws ConfigurationChangeException
removedElements - Objekte, die nicht mehr in der Menge enthalten sein sollensimulationVariant - SimulationsvarianteConfigurationChangeExceptionpublic final List<SystemObject> deleteElements(short simulationVariant) throws ConfigurationChangeException
simulationVariant - SimulationsvarianteConfigurationChangeExceptionpublic final List<SystemObject> deleteElementsOlderThan(long deletionTime) throws ConfigurationChangeException
deletionTime - Zeitstempel analog zu System.currentTimeMillis()ConfigurationChangeExceptionprotected abstract void writeElements(List<MutableSetStorage.MutableElement> mutableElements) throws ConfigurationChangeException
mutableElements - Liste mit zu schreibenen ElementenConfigurationChangeExceptionprotected abstract List<MutableSetStorage.MutableElement> readElements()
public final List<MutableSetStorage.MutableElement> getMutableElements()
public void purgeCache()