@Service public class OrderbookRepo extends Object implements DomainRepo
Constructor and Description |
---|
OrderbookRepo()
Standard constructor
|
Modifier and Type | Method and Description |
---|---|
List<Orderbook> |
findAllByTimeslot(Timeslot timeslot) |
Orderbook |
findByTimeslot(Timeslot timeslot)
Returns the most recent Orderbook that has been created for the specified
timeslot.
|
Orderbook |
findSpotByTimeslot(Timeslot timeslot)
Returns the most recent orderbook with a non-null clearing price.
|
Double[] |
getMaxAskPrices()
Returns maxAskPrices array, representing the maximum ask prices
for the most recent clearing of the wholesale market.
|
Double[] |
getMinAskPrices()
Returns the minAskPrices array, representing the minimum ask prices
for the most recent clearing of the wholesale market.
|
Orderbook |
makeOrderbook(Timeslot timeslot,
Double clearingPrice)
Creates a new Orderbook, with standard defaults (productType = Future,
dateExecuted = now).
|
void |
recycle()
Clears the index in preparation for a new simulation
|
void |
setMaxAskPrices(Double[] values) |
void |
setMinAskPrices(Double[] values)
Set the minAskPrices array.
|
int |
size()
Returns the count of instances in this repo
|
public Orderbook makeOrderbook(Timeslot timeslot, Double clearingPrice)
public Orderbook findByTimeslot(Timeslot timeslot)
public Orderbook findSpotByTimeslot(Timeslot timeslot)
public void setMinAskPrices(Double[] values)
public void setMaxAskPrices(Double[] values)
values
- public Double[] getMinAskPrices()
public Double[] getMaxAskPrices()
public int size()
public void recycle()
recycle
in interface DomainRepo
Copyright © 2019 Power TAC. All rights reserved.