Provides a self-populating
OrderHistoryManager implementation.
Instantiate this class with an origin date. The origin date establishes how far back
to look for order history.
This class will receive new reports on its own - it is not necessary nor is it permitted to manually
#add(ReportBase).
Note that there are significant performance and resource implications when using this class.
Depending on historical order volume, this class may be required to process thousands or millions
of reports. There are two ramifications of this:
- Make an effort to limit the number of instances of this class. Each instance in the same process
has access to the same reports. The only reason to have more than one instance of this class is
if more than one historical range is required. Even then, it is preferable to use a single instance
with the oldest origin date.
- Use the most recent origin date feasible. Ideally, make this midnight of the current day, or whatever
makes sense for the current trading session. Obviously, business requirements will dictate what
the origin date is.
It may take a significant amount of time to
#start() this object as it must process historical
order history. Callers may choose to make this operation asynchronous. The object will report that it
#isRunning() when the processing is complete.