|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ResourceAvailabilityManagerLocal
A manager that provides methods for manipulating and querying the cached current availability for resources.
| Method Summary | |
|---|---|
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 |
updateAllResourcesAvailabilitiesForAgent(int agentId,
org.rhq.core.domain.measurement.AvailabilityType availabilityType)
Marks all resources managed by the specified agent as down |
| Method Detail |
|---|
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 resource
null if not knownorg.rhq.core.domain.measurement.ResourceAvailability getLatestAvailability(int resourceId)
resourceId - the id of the resource
void updateAllResourcesAvailabilitiesForAgent(int agentId,
org.rhq.core.domain.measurement.AvailabilityType availabilityType)
agentId - the id of the agent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||