|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hyperic.hq.events.server.session.SessionBase
org.hyperic.hq.events.server.session.EventLogManagerEJBImpl
public class EventLogManagerEJBImpl
Stores Events to and deletes Events from storage
Field Summary |
---|
Fields inherited from class org.hyperic.hq.events.server.session.SessionBase |
---|
DATASOURCE, SEQUENCE_INTERVAL |
Constructor Summary | |
---|---|
EventLogManagerEJBImpl()
|
Method Summary | |
---|---|
EventLog |
createLog(AbstractEvent event,
java.lang.String subject,
java.lang.String status,
boolean save)
Create a new vanilla log item. |
int |
deleteLogs(long from,
long to)
Purge old event logs. |
int |
deleteLogs(Resource r)
Delete event logs for the given resource TODO: Authz check. |
void |
ejbActivate()
|
void |
ejbCreate()
|
void |
ejbPassivate()
|
void |
ejbPostCreate()
|
void |
ejbRemove()
|
java.util.List |
findLastLogs(Resource proto)
Find the last event logs of all the resources of a given prototype. |
java.util.Map |
findLastUnfixedAlertFiredEvents(java.util.List alertDefinitionIds)
Find the last unfixed AlertFiredEvents for each alert definition in the list |
EventLog |
findLog(java.lang.String typeClass,
int instanceId,
long timestamp)
Finds a unique log entry with the specified event type, instance ID, and timestamp. |
java.util.List |
findLogs(AppdefEntityID ent,
AuthzSubject user,
java.lang.String[] eventTypes,
long begin,
long end)
Get a list of log records based on resource, event type and time range. |
java.util.List |
findLogs(AppdefEntityID ent,
AuthzSubject user,
java.lang.String status,
long begin,
long end)
Get a list of log records based on resource, status and time range. |
java.util.List |
findLogs(AuthzSubject subject,
long begin,
long end,
PageInfo pInfo,
EventLogStatus maxStatus,
java.lang.String typeClass,
java.util.Collection inGroups)
Get a list of ResourceEventLog s in a given interval, with
the maximum specified status. |
static org.hyperic.hq.events.shared.EventLogManagerLocal |
getOne()
|
int |
getTotalNumberLogs()
Retrieve the total number of event logs. |
void |
insertEventLogs(EventLog[] eventLogs)
Insert the event logs in batch. |
boolean[] |
logsExistPerInterval(AppdefEntityID entityId,
AuthzSubject subject,
long begin,
long end,
int intervals)
Get an array of booleans, each element indicating whether or not there are log records for that respective interval, for a particular entity over a given time range. |
void |
setSessionContext(javax.ejb.SessionContext ctx)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EventLogManagerEJBImpl()
Method Detail |
---|
public EventLog createLog(AbstractEvent event, java.lang.String subject, java.lang.String status, boolean save) throws ResourceDeletedException
event
- The event to log.subject
- The log item subject.status
- The log item status.save
- true
to persist the log item;
false
to create a transient log item only.
ResourceDeletedException
public void insertEventLogs(EventLog[] eventLogs)
eventLogs
- The event logs.public EventLog findLog(java.lang.String typeClass, int instanceId, long timestamp)
public java.util.List findLastLogs(Resource proto)
public java.util.Map findLastUnfixedAlertFiredEvents(java.util.List alertDefinitionIds)
alertDefinitionIds
- The list of alert definition ids
Map
of alert definition id Integer
to AlertFiredEvent
public java.util.List findLogs(AuthzSubject subject, long begin, long end, PageInfo pInfo, EventLogStatus maxStatus, java.lang.String typeClass, java.util.Collection inGroups)
ResourceEventLog
s in a given interval, with
the maximum specified status.
If specified, typeClass dictates the full classname of the rows
to check (i.e. org.hyperic.hq.....ResourceLogEvent)
If specified, inGroups must be a collection of ResourceGroup
s
which the resulting logs will be associated with.
public java.util.List findLogs(AppdefEntityID ent, AuthzSubject user, java.lang.String[] eventTypes, long begin, long end)
public java.util.List findLogs(AppdefEntityID ent, AuthzSubject user, java.lang.String status, long begin, long end)
public int getTotalNumberLogs()
public boolean[] logsExistPerInterval(AppdefEntityID entityId, AuthzSubject subject, long begin, long end, int intervals)
entityId
- The entity.begin
- The begin timestamp for the time range.end
- The end timestamp for the time range.intervals
- The number of intervals.
public int deleteLogs(Resource r)
public int deleteLogs(long from, long to)
from
- Delete all records starting from (and including) this time.
If set to -1, then this method will delete all records from the
earliest record forward.to
- Delete all records up to (and including) this time.
If set to -1, then this method will delete all records up to and
including the most recent record.
public void ejbCreate()
public void ejbPostCreate()
public void ejbActivate()
ejbActivate
in interface javax.ejb.SessionBean
public void ejbPassivate()
ejbPassivate
in interface javax.ejb.SessionBean
public void ejbRemove()
ejbRemove
in interface javax.ejb.SessionBean
public void setSessionContext(javax.ejb.SessionContext ctx)
setSessionContext
in interface javax.ejb.SessionBean
public static org.hyperic.hq.events.shared.EventLogManagerLocal getOne()
|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |