public class ScheduledCollectionsQueue<L,T extends MeasurementType<L>> extends Object
| Constructor and Description |
|---|
ScheduledCollectionsQueue() |
| Modifier and Type | Method and Description |
|---|---|
long |
getNextExpectedCollectionTime()
Returns the time when the next collection is to be done.
|
Set<MeasurementInstance<L,T>> |
popNextScheduledSet()
Pops off of the queue the set of the next measurements to be collected.
|
void |
schedule(Collection<ScheduledMeasurementInstance<L,T>> schedules)
Puts the given schedules in the queue to be prioritized for collection.
|
void |
unschedule(Collection<Resource<L>> resources)
Unschedules all measurement collections for all given resources.
|
public long getNextExpectedCollectionTime()
public Set<MeasurementInstance<L,T>> popNextScheduledSet()
getNextExpectedCollectionTime()) but could be across multiple resources.
A new set of measurements will be rescheduled according to their intervals and pushed back on the queue.
If the next scheduled set of collections is to occur in the future or there are no schedules at all
then this returns an empty set. In other words, this returns those collections that need to be performed now.public void schedule(Collection<ScheduledMeasurementInstance<L,T>> schedules)
schedules - the new schedules to addpublic void unschedule(Collection<Resource<L>> resources)
resources - all measurements for all these resources will be unscheduledCopyright © 2015–2017 Red Hat, Inc.. All rights reserved.