Package org.powertac.common.repo
Class ManagedRepo
- java.lang.Object
-
- org.powertac.common.repo.ManagedRepo
-
- All Implemented Interfaces:
DomainRepo
- Direct Known Subclasses:
OrderbookRepo
public abstract class ManagedRepo extends Object implements DomainRepo
Domain repos that do active memory management. This works by waking up every few timeslots and running a cleanup method.- Author:
- John Collins
-
-
Field Summary
Fields Modifier and Type Field Description protected longintervalprotected longoffsetprotected TimeServicetimeService
-
Constructor Summary
Constructors Constructor Description ManagedRepo()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voiddoCleanup()voidrecycle()Implementations must clear out the repository in preparation for a new simulation.protected voidsetup()
-
-
-
Field Detail
-
timeService
@Autowired protected TimeService timeService
-
interval
protected long interval
-
offset
protected long offset
-
-
Method Detail
-
setup
protected void setup()
-
recycle
public void recycle()
Description copied from interface:DomainRepoImplementations must clear out the repository in preparation for a new simulation.- Specified by:
recyclein interfaceDomainRepo
-
doCleanup
protected abstract void doCleanup()
-
-