Class HistoryManager

  • Direct Known Subclasses:
    HistoryManagerDEVS

    public abstract class HistoryManager
    extends Object
    History manager with automatic garbage collection by the java garbage collector using weak references to the Historicals.

    Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
    BSD-style license. See OpenTrafficSim License.

    Version:
    $Revision$, $LastChangedDate$, by $Author$, initial version 18 jan. 2018
    Author:
    Alexander Verbraeck, Peter Knoppers, Wouter Schakel
    • Constructor Detail

      • HistoryManager

        public HistoryManager()
    • Method Detail

      • registerHistorical

        public void registerHistorical​(HistoryManager.HistoricalElement historical)
        Registers a historical.
        Parameters:
        historical - HistoricalElement; historical to register.
      • getHistoricals

        protected final Set<HistoryManager.HistoricalElement> getHistoricals()
        Returns the historicals. TODO specify if the result may be modified.
        Returns:
        Set<HistoricalElement>; the historicals
      • endOfSimulation

        protected final void endOfSimulation()
        Clear all stored data. To be called at simulation end to free used memory.