|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectibspan.ecap.merchant.shopdecisions.forecasting.ScheduledForecastRunner
public class ScheduledForecastRunner
A class responsible for running forecast tasks at the specified times.
Constructor Summary | |
---|---|
ScheduledForecastRunner()
|
Method Summary | |
---|---|
void |
cancelProductForecasts(java.lang.String productId)
Cancels forecasts for the specified product. |
java.util.concurrent.Future<ForecastDescription> |
executeForecast(ForecastTask task)
Immediately executes the specified task. |
ForecastTask |
pollForecastResult()
Performs a non-blocking receive of a finished task. |
ForecastTask |
pollForecastResult(long millisecondsTimeout)
Performs a blocking receive of a finished task with a timeout. |
java.util.concurrent.Future<ForecastDescription> |
scheduleForecast(ForecastTask task)
Schedules a ForecastTask for execution. |
ForecastTask |
takeCompletedTask()
Performs a blocking receive of a finished task. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScheduledForecastRunner()
Method Detail |
---|
public java.util.concurrent.Future<ForecastDescription> scheduleForecast(ForecastTask task)
ForecastTask
for execution. The task will be run at the time specified
by its forecast start date retrieved with the task.getForecastStart
method.
task
- the task to be executed
Future
describing the future result of the task.public java.util.concurrent.Future<ForecastDescription> executeForecast(ForecastTask task)
task
- the task to be executed
Future
describing the future result of the task.public ForecastTask takeCompletedTask() throws java.lang.InterruptedException
java.lang.InterruptedException
- when the calling thread has been interrupted while waiting
for the resultpublic ForecastTask pollForecastResult(long millisecondsTimeout) throws java.lang.InterruptedException
millisecondsTimeout
- the timeout in millis after which the method should return
regardless of the availability of the result.
java.lang.InterruptedException
- when the calling thread has been interrupted while waiting
for the resultpublic ForecastTask pollForecastResult()
public void cancelProductForecasts(java.lang.String productId)
productId
- the global id of the product, which forecasts are to be
cancelled.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |