Package com.adobe.marketing.mobile.util
Interface SerialWorkDispatcher.WorkHandler
-
- All Implemented Interfaces:
public interface SerialWorkDispatcher.WorkHandler<W extends Object>Represents the functional interface that is responsible for doing the desired work on each item of the workQueue. WorkHandler.doWork is called from the background worker thread that the SerialWorkDispatcher maintains.
-
-
Method Summary
-
-
Method Detail
-
doWork
abstract Boolean doWork(W item)
Handles processing on item
- Parameters:
item- the work item which is dispatched for processing.- Returns:
Boolean A boolean variable denoting whether the item has completed processing. If WorkHandler.doWork returns false after processing an item, the SerialWorkDispatcher stops processing the work queue without removing the item. It restarts when resume is called or a new item is enqueued. If WorkHandler.doWork returns true after processing an item, it removes it from work queue and continues processing other queued items.
-
-
-
-