public interface ResourceAvailabilityManagerLocal
| Modifier and Type | Method and Description |
|---|---|
org.rhq.core.domain.measurement.ResourceAvailability |
getLatestAvailability(int resourceId)
Returns the latest availability for the given Resource
|
org.rhq.core.domain.measurement.AvailabilityType |
getLatestAvailabilityType(org.rhq.core.domain.auth.Subject whoami,
int resourceId)
Returns the latest availability type for the given resource.
|
void |
insertNeededAvailabilityForImportedResources(List<Integer> resourceIds)
The first time an agent is started and its platform and top-level servers are discovered,
the
DiscoveryBossBean.mergeInventoryReport(InventoryReport) will use the
EntityManager to persist the resource. |
void |
updateAgentResourcesLatestAvailability(int agentId,
org.rhq.core.domain.measurement.AvailabilityType availabilityType,
boolean isPlatform)
Update latest availabilities for all resources managed by the given agent to the given availability type.
|
void insertNeededAvailabilityForImportedResources(List<Integer> resourceIds)
DiscoveryBossBean.mergeInventoryReport(InventoryReport) will use the
EntityManager to persist the resource. A PostPersist hook exists on the
Resource entity to create a corresponding default ResourceAvailability
entity. However, when a platform or top-level server is removed from inventory, the agent
might rediscover the resource so quickly that InventoryReport merges the resource
instead of persisting new ones, bypassing the PostPersist hook. As a result, this
method should be called when resources are imported from the auto-discovery portlet (the
InventoryStatus is changed from NEW to COMMITTED, which will add the necessary
default ResourceAvailability objects to those resources missing them.resourceIds - a list of resource ids which should have default ResourceAvailability
objects created for them, only if the corresponding data doesn't already exist.org.rhq.core.domain.measurement.AvailabilityType getLatestAvailabilityType(org.rhq.core.domain.auth.Subject whoami,
int resourceId)
whoami - the user asking for the dataresourceId - the id of the resourcenull if not knownorg.rhq.core.domain.measurement.ResourceAvailability getLatestAvailability(int resourceId)
resourceId - the id of the resourcevoid updateAgentResourcesLatestAvailability(int agentId,
org.rhq.core.domain.measurement.AvailabilityType availabilityType,
boolean isPlatform)
agentId - the id of the agentavailabilityType - the type that all of the agent's resources will have *isPlatform - if true, updates only the agent's top level platform, if false only the childrenCopyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.