public class DummyMonitorManager extends Object implements IMonitorManagerSPI
IMonitorManager
that does not monitor anything.
This is used when the portal does not have the monitoring module installed.Constructor and Description |
---|
DummyMonitorManager() |
Modifier and Type | Method and Description |
---|---|
void |
addEvent(IMonitorEvent event)
Adds a event to persistence.
|
void |
addEvent(SessionConfig sessionConfig,
IMonitorEvent event,
ITransaction transaction) |
void |
addField(IMonitorField field)
Adds the given field to persistence.
|
boolean |
consolidateCollectedMeasures() |
IMonitorEvent |
createEvent(String eventId)
Creates a transient event instance.
|
IMonitorField |
createField(String fieldId)
Creates a transient field instance with the given identifier.
|
void |
deleteEvent(IMonitorEvent event)
Deletes a event from persistence.
|
void |
deleteField(IMonitorField field)
Deletes a field from persistence.
|
IMonitorEvent |
getEvent(String eventId)
Returns a persistent event instance.
|
ExecutorService |
getExecutorService()
Returns the executor service to be used when monitoring values.
|
IMonitorField |
getField(String fieldId)
Returns a persistent field instance.
|
IMonitor |
getMonitor(String eventKey,
Map<String,String> aggregationValues) |
IMonitor |
getMonitor(String eventKey,
Map<String,String> aggregationValues,
long eventDateTimeMillis) |
IMonitorContext |
getMonitorContext()
Returns the current monitor context.
|
void |
init()
Initializes the monitor manager.
|
void |
initializeMonitoringData(ITransaction transaction) |
void |
initializeMonitoringData(ITransaction transaction)
Method called during portal database initialization to populate the
monitoring related data.
|
IMonitor |
monitor(String eventId)
Returns the monitor for an event which has a given identifier.
|
IMonitor |
monitor(String eventId,
ITransaction transaction)
Returns the monitor for an event which has a given identifier.
|
void |
restartExecutorService()
Restarts executor service.
|
void |
shutdown()
Shutdowns the monitor manager.
|
public IMonitor getMonitor(String eventKey, Map<String,String> aggregationValues) throws PortalException
PortalException
public IMonitor getMonitor(String eventKey, Map<String,String> aggregationValues, long eventDateTimeMillis) throws PortalException
PortalException
public IMonitorContext getMonitorContext()
IMonitorManager
getMonitorContext
in interface IMonitorManager
public void initializeMonitoringData(ITransaction transaction) throws PortalException
PortalException
public boolean consolidateCollectedMeasures() throws PortalException
PortalException
public void addEvent(SessionConfig sessionConfig, IMonitorEvent event, ITransaction transaction) throws PortalException
PortalException
public IMonitorEvent createEvent(String eventId) throws PortalException
IMonitorManager
createEvent
in interface IMonitorManager
eventId
- the desired event identifier.PortalException
#addEvent(SessionConfig, IMonitorEvent, ITransaction)
public IMonitor monitor(String eventId) throws PortalException
IMonitorManager
getMonitor(eventId, null);
monitor
in interface IMonitorManager
eventId
- the event identifier.PortalObjectNotFoundException
- if there's no such event.PortalException
IMonitorManager
,
IMonitorManager.monitor(String, ITransaction)
public IMonitor monitor(String eventId, ITransaction transaction) throws PortalException
IMonitorManager
If the given transaction is not null
, the monitoring data will be
saved after the transaction has terminated (either by a successful commit or
by a rollback) and the monitor has been closed
.
If the given transaction is null
, the monitoring data will be saved when
the monitor has been closed
.
If the given transaction is not null
, transaction monitoring will be recorded
automatically, if the event of the given identifier has transaction results fields
.
monitor
in interface IMonitorManager
transaction
- the transaction the given monitor will be bound to.PortalObjectNotFoundException
- if there's no such event.PortalException
IMonitorManager
public void addEvent(IMonitorEvent event) throws PortalException
IMonitorManager
addEvent
in interface IMonitorManager
event
- the transient event instance to be persisted.PortalException
public IMonitorEvent getEvent(String eventId) throws PortalException
IMonitorManager
getEvent
in interface IMonitorManager
eventId
- the event's identifier.PortalObjectNotFoundException
- if no event with such id was found.PortalException
public void deleteEvent(IMonitorEvent event) throws PortalException
IMonitorManager
deleteEvent
in interface IMonitorManager
event
- the persistent event instance to be deleted.PortalException
public IMonitorField createField(String fieldId) throws PortalException
IMonitorManager
createField
in interface IMonitorManager
fieldId
- the field identifier.PortalException
public void addField(IMonitorField field) throws PortalException
IMonitorManager
addField
in interface IMonitorManager
field
- the field.PortalException
public IMonitorField getField(String fieldId) throws PortalException
IMonitorManager
getField
in interface IMonitorManager
fieldId
- the field's identifier.PortalObjectNotFoundException
- if no field with such id was found.PortalException
public void deleteField(IMonitorField field) throws PortalException
IMonitorManager
deleteField
in interface IMonitorManager
field
- the persistent field to be deleted.PortalException
public void initializeMonitoringData(ITransaction transaction) throws PortalException
IMonitorManagerSPI
initializeMonitoringData
in interface IMonitorManagerSPI
transaction
- the transaction for persistence access.PortalException
public void init()
IMonitorManagerSPI
init
in interface IMonitorManagerSPI
public void shutdown()
IMonitorManagerSPI
shutdown
in interface IMonitorManagerSPI
public ExecutorService getExecutorService()
IMonitorManagerSPI
getExecutorService
in interface IMonitorManagerSPI
public void restartExecutorService()
IMonitorManagerSPI
restartExecutorService
in interface IMonitorManagerSPI
Lumisportal 10.1.2.170428 - Copyright © 2006–2017 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.