For example, events with period 1s, 3s and 7s can run when the 1s event run, not every time, but some of the time. An event with period 1.5s would not belong to the same batch since it would need to run between the 1s interval.
This class should only be accessed from the periodic task thread.
| Modifier and Type | Field and Description |
|---|---|
| private long | |
| private final long | |
| private final List |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public long | |
| public long | |
| public List | |
| public boolean | |
| public void |
| delta | back to summary |
|---|---|
| private long delta | |
| period | back to summary |
|---|---|
| private final long period | |
| tasks | back to summary |
|---|---|
| private final List<PeriodicTask> tasks | |
| Batch | back to summary |
|---|---|
| public Batch(long period) | |
| add | back to summary |
|---|---|
| public void add(PeriodicTask task) | |
| clear | back to summary |
|---|---|
| public void clear() | |
| getDelta | back to summary |
|---|---|
| public long getDelta() | |
| getPeriod | back to summary |
|---|---|
| public long getPeriod() | |
| getTasks | back to summary |
|---|---|
| public List | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() | |
| setDelta | back to summary |
|---|---|
| public void setDelta(long delta) | |