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 long
interval
protected long
offset
protected TimeService
timeService
-
Constructor Summary
Constructors Constructor Description ManagedRepo()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
doCleanup()
void
recycle()
Implementations must clear out the repository in preparation for a new simulation.protected void
setup()
-
-
-
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:DomainRepo
Implementations must clear out the repository in preparation for a new simulation.- Specified by:
recycle
in interfaceDomainRepo
-
doCleanup
protected abstract void doCleanup()
-
-