public class BatchingScheduler extends Scheduler
This BatchingScheduler wraps a generic scheduler and avoid calling the system service if a request is made that has the same criteria as the previous one.
Scheduler.Callback| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_BATCHING_PERIOD_IN_MS |
| Constructor and Description |
|---|
BatchingScheduler(Scheduler delegate,
Timer timer) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelAll()
When called, should cancel all pending jobs
|
void |
init(android.content.Context context,
Scheduler.Callback callback) |
void |
onFinished(SchedulerConstraint constraint,
boolean reschedule)
Called by the JobManager when a scheduled constraint is handled.
|
void |
request(SchedulerConstraint constraint) |
public void init(android.content.Context context,
Scheduler.Callback callback)
public void request(SchedulerConstraint constraint)
public void onFinished(SchedulerConstraint constraint, boolean reschedule)
ScheduleronFinished in class Schedulerconstraint - The original constraintreschedule - True if the job should be rescheduled