Package org.powertac.common.repo
Class BootstrapDataRepo
- java.lang.Object
- 
- org.powertac.common.repo.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 SummaryConstructors Constructor Description BootstrapDataRepo()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Object item)Adds a single item to the repo.voidadd(List<Object> items)Adds a list of objects to the repo.PropertiesgetBootState()Returns the Properties recorded in the boot record, including various values representing the state of the sim at the end of the boot session.CompetitiongetBootstrapCompetition()Returns the Competition instances from the boot recordList<Object>getData()Returns the entire list of objectsList<Object>getData(Class<?> type)Returns the list of items of a particular classvoidreadBootRecord(URL bootUrl)voidrecycle()Implementations must clear out the repository in preparation for a new simulation.
 
- 
- 
- 
Method Detail- 
addpublic void add(Object item) Adds a single item to the repo.
 - 
getBootstrapCompetitionpublic Competition getBootstrapCompetition() Returns the Competition instances from the boot record
 - 
getBootStatepublic 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.
 - 
recyclepublic void recycle() Description copied from interface:DomainRepoImplementations must clear out the repository in preparation for a new simulation.- Specified by:
- recyclein interface- DomainRepo
 
 - 
readBootRecordpublic void readBootRecord(URL bootUrl) 
 
- 
 
-