Class BootstrapDataRepo

  • All Implemented Interfaces:
    DomainRepo

    @Service
    public class BootstrapDataRepo
    extends Object
    implements DomainRepo
    Repository for data contained in a bootstrap record. Presumably this will be unused during a boot session. The bootstrap data is simply an array of various types of objects. The repo allows retrieval of the entire array, or just the items of a particular class. It also reads a boot record, allowing it to be used outside the server without duplicating this functionality.
    Author:
    John Collins
    • Constructor Detail

      • BootstrapDataRepo

        public BootstrapDataRepo()
    • Method Detail

      • add

        public void add​(Object item)
        Adds a single item to the repo.
      • add

        public void add​(List<Object> items)
        Adds a list of objects to the repo.
      • getData

        public List<Object> getData()
        Returns the entire list of objects
      • getData

        public List<Object> getData​(Class<?> type)
        Returns the list of items of a particular class
      • getBootstrapCompetition

        public Competition getBootstrapCompetition()
        Returns the Competition instances from the boot record
      • getBootState

        public Properties getBootState()
        Returns the Properties recorded in the boot record, including various values representing the state of the sim at the end of the boot session.
      • recycle

        public void recycle()
        Description copied from interface: DomainRepo
        Implementations must clear out the repository in preparation for a new simulation.
        Specified by:
        recycle in interface DomainRepo
      • readBootRecord

        public void readBootRecord​(URL bootUrl)