public class SchedulerService extends Object implements InventoryListener
| Modifier and Type | Field and Description |
|---|---|
protected ServiceStatus |
status |
| Constructor and Description |
|---|
SchedulerService(SchedulerConfiguration configuration,
Diagnostics diagnostics,
StorageAdapter storageAdapter) |
| Modifier and Type | Method and Description |
|---|---|
<L> void |
discoveryCompleted(DiscoveryEvent<L> event)
Notifies this listener that a discovery scan has completed.
|
<L> void |
resourcesAdded(InventoryEvent<L> event)
Notifies this listener that the resources in
InventoryEvent.getPayload()
were added to the monitored endpoint. |
<L> void |
resourcesRemoved(InventoryEvent<L> event)
Notifies this listener that the resources in
InventoryEvent.getPayload()
were removed from the monitored endpoint. |
void |
start() |
void |
stop() |
<L> void |
unschedule(SamplingService<L> service,
Collection<Resource<L>> resources) |
protected volatile ServiceStatus status
public SchedulerService(SchedulerConfiguration configuration, Diagnostics diagnostics, StorageAdapter storageAdapter)
public void start()
public void stop()
public <L> void resourcesAdded(InventoryEvent<L> event)
InventoryListenerInventoryEvent.getPayload()
were added to the monitored endpoint.
Note that these resources need to be flushed to persistent storage by
calling InventoryListener.discoveryCompleted(DiscoveryEvent) after all resources have
been added (or removed).resourcesAdded in interface InventoryListenerevent - the InventoryEventpublic <L> void resourcesRemoved(InventoryEvent<L> event)
InventoryListenerInventoryEvent.getPayload()
were removed from the monitored endpoint.
Note that these resources need to be flushed to persistent storage by
calling InventoryListener.discoveryCompleted(DiscoveryEvent) after all resources have
been added (or removed).resourcesRemoved in interface InventoryListenerevent - the InventoryEventpublic <L> void discoveryCompleted(DiscoveryEvent<L> event)
InventoryListenerDiscoveryEvent.getResourceManager() were updated as part of the completed
discovery scan.
Make sure you call this after you add
and remove resources.discoveryCompleted in interface InventoryListenerevent - the DiscoveryEventpublic <L> void unschedule(SamplingService<L> service, Collection<Resource<L>> resources)
Copyright © 2015–2017 Red Hat, Inc.. All rights reserved.