public final class Trigger
extends java.lang.Object
More specifically, a Trigger is an opaque, abstract class used to root the type hierarchy.
| Modifier and Type | Field and Description |
|---|---|
static JobTrigger.ImmediateTrigger |
NOW
Immediate is a Trigger that's immediately available.
|
| Constructor and Description |
|---|
Trigger() |
| Modifier and Type | Method and Description |
|---|---|
static JobTrigger.ContentUriTrigger |
contentUriTrigger(java.util.List<ObservedUri> uris)
Creates a new ContentUriTrigger based on the provided list of
ObservedUri. |
static JobTrigger.ExecutionWindowTrigger |
executionWindow(int windowStart,
int windowEnd)
Creates a new ExecutionWindow based on the provided time interval.
|
public static final JobTrigger.ImmediateTrigger NOW
It is invalid to schedule an Immediate with a recurring Job.
public static JobTrigger.ExecutionWindowTrigger executionWindow(int windowStart, int windowEnd)
windowStart - The earliest time (in seconds) the job should be considered eligible to run.
Calculated from when the job was scheduled (for new jobs) or last run (for recurring jobs).windowEnd - The latest time (in seconds) the job should be run in an ideal world.
Calculated in the same way as windowStart.java.lang.IllegalArgumentException - if the provided parameters are too restrictive.public static JobTrigger.ContentUriTrigger contentUriTrigger(java.util.List<ObservedUri> uris)
ObservedUri.uris - The list of URIs to observe. The trigger will be available if a piece of content,
corresponding to any of provided URIs, is updated.java.lang.IllegalArgumentException - if provided list of URIs is null or empty.