|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectibspan.ecap.merchant.shopdecisions.forecasting.ForecastingModule
public class ForecastingModule
A subsystem responsible for preparing product sales forecasts. Designed as a singleton.
Method Summary | |
---|---|
static ForecastingModule |
getInstance()
|
boolean |
isRecordsForecasts()
|
ForecastDescription |
pollResult(long millisecondsTimeout)
Performs a blocking receive of a completed forecasting task with a timeout. |
void |
prepareForecast(java.lang.String productId)
Schedules an immediate preparation of a sales forecast for the specified product. |
void |
setRecordsForecasts(boolean recordsForecasts)
|
void |
startForecasting(java.lang.String productId)
Starts forecasting of the given product. |
void |
stopForecasting(java.lang.String productId)
Withdraws the product from periodic sales forecasting and cancels all the scheduled forecasts. |
ForecastDescription |
takeResult()
Performs a blocking receive of a completed forecasting task. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ForecastingModule getInstance()
public void startForecasting(java.lang.String productId)
productId
- the id of the product to be forecasted.public void stopForecasting(java.lang.String productId)
productId
- the id of the product to be withdrawn from forecast.public void prepareForecast(java.lang.String productId)
productId
- the id of the product to be forecasted.public ForecastDescription takeResult() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
java.lang.InterruptedException
- when the thread has been interrupted while it was waiting
for a result
java.util.concurrent.ExecutionException
- when an exception occurred during the calculation of the forecast.public ForecastDescription pollResult(long millisecondsTimeout) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
millisecondsTimeout
has elapsed or when the thread has been interrupted.
millisecondsTimeout
- the timeout after which the method should return regardless
of whether a result has been completed
null
if the timeout has
elapsed
java.lang.InterruptedException
- when the thread has been interrupted while it was waiting
for a result
java.util.concurrent.ExecutionException
- when an exception occurred during the calculation of the forecast.public boolean isRecordsForecasts()
public void setRecordsForecasts(boolean recordsForecasts)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |