public class OrderManagerDeviceWorker extends AsyncEventWorker<Event>
batchPause, batchSize, errorCount, needAcknowledge, waitNextTask
batchWait, consumer, errorPause, moduleId, working
Constructor and Description |
---|
OrderManagerDeviceWorker(ru.bitel.bgbilling.modules.tv.access.TvAccess access,
java.util.concurrent.ScheduledExecutorService scheduledExecutorService,
int deviceId) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
doTask(java.lang.Object task)
Выполнение отдельной задачи.
|
protected void |
processDoTaskException(java.lang.Object task,
boolean inDoTask,
boolean putFirstIfInDoTask,
ru.bitel.bgbilling.common.BGException ex,
boolean throwException) |
protected void |
runImpl() |
protected boolean |
runWorker()
Вызывается, когда появляются задачи.
|
protected void |
taskDone(java.lang.Object task,
java.lang.Object result) |
java.lang.String |
toString() |
doTasks, internalDoTask, notify, poll, putFirst, putLast, taskTimeout
internalRunWorker, pollFirstTask, setConsumer, shutdown
public OrderManagerDeviceWorker(ru.bitel.bgbilling.modules.tv.access.TvAccess access, java.util.concurrent.ScheduledExecutorService scheduledExecutorService, int deviceId) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
protected void runImpl() throws java.lang.Exception
runImpl
in class EventWorker
java.lang.Exception
protected boolean runWorker() throws ru.bitel.bgbilling.common.BGException
EventWorker
EventWorker.doTasks()
, который выполняет последовательно появившиеся задачи.
А перед и после вызова EventWorker.doTasks()
можно инициализировать и освободить DAO.runWorker
in class EventWorker
ru.bitel.bgbilling.common.BGException
public java.lang.Object doTask(java.lang.Object task) throws ru.bitel.bgbilling.common.BGException
doTask
in class EventWorker
ru.bitel.bgbilling.common.BGException
protected void taskDone(java.lang.Object task, java.lang.Object result) throws ru.bitel.bgbilling.common.BGException
taskDone
in class AsyncEventWorker<Event>
ru.bitel.bgbilling.common.BGException
public java.lang.String toString()
toString
in class java.lang.Object
protected void processDoTaskException(java.lang.Object task, boolean inDoTask, boolean putFirstIfInDoTask, ru.bitel.bgbilling.common.BGException ex, boolean throwException) throws ru.bitel.bgbilling.common.BGException
processDoTaskException
in class AsyncEventWorker<Event>
inDoTask
- ошибка произошла в doTask или позжеru.bitel.bgbilling.common.BGException