Package org.powertac.common.repo
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 Summary
Constructors Constructor Description BootstrapDataRepo() -
Method Summary
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.org.powertac.common.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()
-
Constructor Details
-
BootstrapDataRepo
public BootstrapDataRepo()
-
-
Method Details
-
add
Adds a single item to the repo. -
add
Adds a list of objects to the repo. -
getData
Returns the entire list of objects -
getData
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
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:
recyclein interfaceorg.powertac.common.repo.DomainRepo
-
readBootRecord
-