Class BootstrapDataRepo

java.lang.Object
org.powertac.common.repo.BootstrapDataRepo
All Implemented Interfaces:
org.powertac.common.repo.DomainRepo

@Service
public class BootstrapDataRepo
extends Object
implements org.powertac.common.repo.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 Details

  • Method Details

    • 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 org.powertac.common.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()
      Specified by:
      recycle in interface org.powertac.common.repo.DomainRepo
    • readBootRecord

      public void readBootRecord​(URL bootUrl)