public class AvailabilityManagerBean extends Object implements AvailabilityManagerLocal, AvailabilityManagerRemote
| Constructor and Description |
|---|
AvailabilityManagerBean() |
| Modifier and Type | Method and Description |
|---|---|
List<AvailabilityPoint> |
findAvailabilitiesForAutoGroup(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
int resourceTypeId,
long fullRangeBeginTime,
long fullRangeEndTime,
int numberOfPoints,
boolean withCurrentAvailability)
Get the individual availability data points for the given auto group.
|
List<AvailabilityPoint> |
findAvailabilitiesForResource(org.rhq.core.domain.auth.Subject subject,
int resourceId,
long fullRangeBeginTime,
long fullRangeEndTime,
int numberOfPoints,
boolean withCurrentAvailability)
Get the individual availability data points for the given resource.
|
List<AvailabilityPoint> |
findAvailabilitiesForResourceGroup(org.rhq.core.domain.auth.Subject subject,
int groupId,
long fullRangeBeginTime,
long fullRangeEndTime,
int numberOfPoints,
boolean withCurrentAvailability)
Get the individual availability data points for the given resource group.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.Availability> |
findAvailabilityByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.AvailabilityCriteria criteria) |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.Availability> |
findAvailabilityForResource(org.rhq.core.domain.auth.Subject subject,
int resourceId,
org.rhq.core.domain.util.PageControl pageControl)
Deprecated.
|
List<org.rhq.core.domain.measurement.Availability> |
findAvailabilityWithinInterval(int resourceId,
Date startDate,
Date endDate)
Deprecated.
|
List<org.rhq.core.domain.measurement.Availability> |
getAvailabilitiesForResource(org.rhq.core.domain.auth.Subject subject,
int resourceId,
long startTime,
long endTime)
Get Availability records for a resource covering the desired time span.
|
List<org.rhq.core.domain.resource.group.composite.ResourceGroupAvailability> |
getAvailabilitiesForResourceGroup(org.rhq.core.domain.auth.Subject subject,
int groupId,
long startTime,
long endTime)
Get ResourceGroupAvailability records for a resource group covering the desired time span.
|
org.rhq.core.domain.measurement.Availability |
getCurrentAvailabilityForResource(org.rhq.core.domain.auth.Subject subject,
int resourceId)
Gets the last known Availability for the given resource - which includes whether it is currently up (i.e.
|
org.rhq.core.domain.measurement.AvailabilityType |
getCurrentAvailabilityTypeForResource(org.rhq.core.domain.auth.Subject subject,
int resourceId)
Indicates if the given resource is currently up (i.e.
|
void |
handleAvailabilityDurationCheck(javax.ejb.Timer timer) |
void |
mergeAvailabilitiesInNewTransaction(List<org.rhq.core.domain.measurement.Availability> availabilities,
org.rhq.enterprise.server.measurement.AvailabilityManagerBean.MergeInfo mergeInfo)
Internal use only.
|
boolean |
mergeAvailabilityReport(org.rhq.core.domain.discovery.AvailabilityReport report)
Merge an
AvailabilityReport that has been received from an agent. |
void |
scheduleAvailabilityDurationCheck(AvailabilityDurationCacheElement cacheElement,
org.rhq.core.domain.resource.Resource resource,
long startTime)
Create the EJB Timer to schedule a check for a single availability duration condition match.
|
void |
setResourceAvailabilities(Map<org.rhq.core.domain.resource.Agent,int[]> map,
org.rhq.core.domain.measurement.AvailabilityType avail)
Allows for resources to have their availabilities explicit set to the given avail type.
|
void |
updateAgentResourceAvailabilities(int agentId,
org.rhq.core.domain.measurement.AvailabilityType platformAvailType,
org.rhq.core.domain.measurement.AvailabilityType childAvailType)
Update availabilities for all resources managed by the given agent to the given availability type (which may be
null to indicate unknown). |
void |
updateLastAvailabilityReportInNewTransaction(int agentId)
Executing this method will update the given agent's lastAvailabilityReport time
in a new transaction.
|
public org.rhq.core.domain.measurement.AvailabilityType getCurrentAvailabilityTypeForResource(org.rhq.core.domain.auth.Subject subject,
int resourceId)
AvailabilityManagerLocalgetCurrentAvailabilityTypeForResource in interface AvailabilityManagerLocalpublic org.rhq.core.domain.measurement.Availability getCurrentAvailabilityForResource(org.rhq.core.domain.auth.Subject subject,
int resourceId)
AvailabilityManagerRemotegetCurrentAvailabilityForResource in interface AvailabilityManagerRemotesubject - the subjectresourceId - the resourcepublic List<org.rhq.core.domain.measurement.Availability> getAvailabilitiesForResource(org.rhq.core.domain.auth.Subject subject, int resourceId, long startTime, long endTime)
AvailabilityManagerLocalgetAvailabilitiesForResource in interface AvailabilityManagerLocalresourceId - The relevant resourcestartTime - If start time precedes recorded availability UNKNOWN will be used to fill the gapendTime - If end time is in the future the current Availability will be extended to fill the gappublic List<org.rhq.core.domain.resource.group.composite.ResourceGroupAvailability> getAvailabilitiesForResourceGroup(org.rhq.core.domain.auth.Subject subject, int groupId, long startTime, long endTime)
AvailabilityManagerLocalResourceGroupAvailability for more on how group availability is calculated.getAvailabilitiesForResourceGroup in interface AvailabilityManagerLocalgroupId - The relevant resource groupstartTime - If start time precedes recorded availability UNKNOWN will be used to fill the gapendTime - If end time is in the future the current Availability will be extended to fill the gappublic List<AvailabilityPoint> findAvailabilitiesForResource(org.rhq.core.domain.auth.Subject subject, int resourceId, long fullRangeBeginTime, long fullRangeEndTime, int numberOfPoints, boolean withCurrentAvailability)
AvailabilityManagerLocalfindAvailabilitiesForResource in interface AvailabilityManagerLocalresourceId - PK of the resource wantedfullRangeBeginTime - start time for data we are interested infullRangeEndTime - end time for data we are interested innumberOfPoints - number of data points to returnwithCurrentAvailability - if true, the last data point in the range will match the resource's current
availability no matter whatpublic List<AvailabilityPoint> findAvailabilitiesForResourceGroup(org.rhq.core.domain.auth.Subject subject, int groupId, long fullRangeBeginTime, long fullRangeEndTime, int numberOfPoints, boolean withCurrentAvailability)
AvailabilityManagerLocalfindAvailabilitiesForResourceGroup in interface AvailabilityManagerLocalgroupId - PK of the resource group wantedfullRangeBeginTime - start time for data we are interested infullRangeEndTime - end time for data we are interested innumberOfPoints - number of data points to returnwithCurrentAvailability - if true, the last data point in the range will match the resource group's current
availability no matter whatpublic List<AvailabilityPoint> findAvailabilitiesForAutoGroup(org.rhq.core.domain.auth.Subject subject, int parentResourceId, int resourceTypeId, long fullRangeBeginTime, long fullRangeEndTime, int numberOfPoints, boolean withCurrentAvailability)
AvailabilityManagerLocalfindAvailabilitiesForAutoGroup in interface AvailabilityManagerLocalparentResourceId - PK of the parent resource of the auto group wantedresourceTypeId - PK of the resource type of the auto group wantedfullRangeBeginTime - start time for data we are interested infullRangeEndTime - end time for data we are interested innumberOfPoints - number of data points to returnwithCurrentAvailability - if true, the last data point in the range will match the autogroup's current
availability no matter whatpublic void setResourceAvailabilities(Map<org.rhq.core.domain.resource.Agent,int[]> map, org.rhq.core.domain.measurement.AvailabilityType avail)
AvailabilityManagerLocalsetResourceAvailabilities in interface AvailabilityManagerLocalmap - map of Agents to the resources for that agent that need to be updated with the provided availavail - the new availability for the resourcespublic boolean mergeAvailabilityReport(org.rhq.core.domain.discovery.AvailabilityReport report)
AvailabilityManagerLocalAvailabilityReport that has been received from an agent. A report will only contain those
availabilities that have changed since the agent's last sent report. Note that if an agent has been restarted, it
will always send a full report as its first. An agent is obliged to sent at least one availability record in the
report in order for the server to determine which agent is sending the report (since a record has a Resource in
it and from any Resource we can determine the Agent).mergeAvailabilityReport in interface AvailabilityManagerLocalreport - the report containing 1 or more availabilities for 1 or more resources.true, this indicates everything seems OK - the server merged everything successfully and
the server and agent seem to be in sync with each. If false, the server thinks something
isn't right and it may be out of sync with the agent. When false is returned, the caller
should send in a full availability report the next time in order to ensure the server and agent
are in sync. true should always be returned if the given availability report is already a
full report.public void mergeAvailabilitiesInNewTransaction(List<org.rhq.core.domain.measurement.Availability> availabilities, org.rhq.enterprise.server.measurement.AvailabilityManagerBean.MergeInfo mergeInfo)
AvailabilityManagerLocalmergeAvailabilitiesInNewTransaction in interface AvailabilityManagerLocalpublic void updateLastAvailabilityReportInNewTransaction(int agentId)
AvailabilityManagerLocalupdateLastAvailabilityReportInNewTransaction in interface AvailabilityManagerLocalagentId - the id of the agentpublic void updateAgentResourceAvailabilities(int agentId,
org.rhq.core.domain.measurement.AvailabilityType platformAvailType,
org.rhq.core.domain.measurement.AvailabilityType childAvailType)
AvailabilityManagerLocalnull to indicate unknown). NOTE: This does not include the top-level platform resource for
the agent. To update a single resource avail see #updateResourceAvailability(Subject, Availability).updateAgentResourceAvailabilities in interface AvailabilityManagerLocalagentId - all resources managed by this agent will have their availabilities changedplatformAvailType - the type that the agent's top level platform resource will havechildAvailType - the type that the agent's child resources will have@Deprecated public List<org.rhq.core.domain.measurement.Availability> findAvailabilityWithinInterval(int resourceId, Date startDate, Date endDate)
findAvailabilityWithinInterval in interface AvailabilityManagerLocalresourceId - identifies the resource for which we want the valuesstartDate - start date of the desired intervalendDate - end date of the desired intervalpublic org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.Availability> findAvailabilityByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.AvailabilityCriteria criteria)
findAvailabilityByCriteria in interface AvailabilityManagerRemote@Deprecated public org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.Availability> findAvailabilityForResource(org.rhq.core.domain.auth.Subject subject, int resourceId, org.rhq.core.domain.util.PageControl pageControl)
findAvailabilityForResource in interface AvailabilityManagerRemotesubject - the subjectresourceId - the resourcepageControl - page controlpublic void scheduleAvailabilityDurationCheck(AvailabilityDurationCacheElement cacheElement, org.rhq.core.domain.resource.Resource resource, long startTime)
AvailabilityManagerLocalscheduleAvailabilityDurationCheck in interface AvailabilityManagerLocalstartTime - the start time (the Availability startTime (an agent time)) of the duration checkpublic void handleAvailabilityDurationCheck(javax.ejb.Timer timer)
Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.