Class NormalPriorityExecutor
-
- All Implemented Interfaces:
public final class NormalPriorityExecutor extends PingExecutor
Executor for handling normal priority pings.
Processes normal pings with a fixed concurrency cap (N = com.inmobi.media.core.config.models.AdConfig
maxBatchSize.normal) via runSlots. The network gate lives inside the nextBatch lambda:Online → process fresh + retry-eligible rows via PingsDao.getAllPings.
Offline → process only IDLE (fresh) rows via PingsDao.getPingsByStatus; retries stay in the DB and wait for the next online processing cycle.
When processing ends with pings still in the DB, it schedules itself after the configured interval so retries fire as they become eligible; when the DB is empty it stops. A new ping wakes a sleeping re-run immediately.
-
-
Constructor Summary
Constructors Constructor Description NormalPriorityExecutor(PingsDao dao, PingExecutor.ExecutorListener listener, OkHttpPingNetworkHandler networkHandler)
-
Method Summary
Modifier and Type Method Description final UnithandleResult(PingExecutor.PingResult result)final UnitsetStarted(Boolean started)-
-
Constructor Detail
-
NormalPriorityExecutor
NormalPriorityExecutor(PingsDao dao, PingExecutor.ExecutorListener listener, OkHttpPingNetworkHandler networkHandler)
- Parameters:
dao- The PingsDao instance for database operations.listener- The ExecutorListener to be notified of ping execution results.
-
-
Method Detail
-
handleResult
final Unit handleResult(PingExecutor.PingResult result)
-
setStarted
final Unit setStarted(Boolean started)
-
-
-
-