|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.soton.itinnovation.grid.service.sla.UsageMonitorImpl
public class UsageMonitorImpl
This is the default UsageMonitor implementation.
It mantains a single PollingConsumer to retrieve
usage reports from active services.
It keeps count of active pull-points by monitoring events for activities starting and stopping.
More sophisticated implementations may chose to have more fine
griained monitoring of activities, using a PollingConsumer
per activity, or perhaps adjusting polling parameters for activities
that are expected to finish soon or use more resource than agreed.
| Constructor Summary | |
|---|---|
UsageMonitorImpl()
|
|
| Method Summary | |
|---|---|
void |
activitiesStopped(List<Activity> activities)
Notification that a list of activities have stopped. |
void |
activitiesStopped(org.hibernate.Session sess,
List<Activity> activities)
Notification that a list of activities have stopped. |
void |
activityStarted(Activity act)
Notification that an acitivity has started. |
void |
activityStarted(org.hibernate.Session sess,
Activity act)
Version of UsageMonitor.activityStarted(Activity) which uses an
existing Session. |
void |
activityStopped(Activity act)
|
void |
activityStopped(org.hibernate.Session sess,
Activity act)
Notification that an acitivity has stopped. |
Map<String,Exception> |
getServiceExceptions()
|
void |
restart()
Convenience method that just calls stopAndWait() followed by
start() |
void |
setConstraintManager(ConstraintManager manager)
|
void |
setFetchSize(int fetchSize)
Set the fetch size. |
void |
setPollingInterval(int pollingInterval)
Set the polling interval (in seconds). |
void |
start()
Starts monitoring of service resource usage. |
void |
stop()
Stops monitoring of service resource usage. |
void |
stopAndWait()
Stops monitoring of service resource usage and waits for any ongoing message retrieval to complete. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UsageMonitorImpl()
| Method Detail |
|---|
public void setConstraintManager(ConstraintManager manager)
setConstraintManager in interface UsageMonitorpublic void setPollingInterval(int pollingInterval)
UsageMonitor
setPollingInterval in interface UsageMonitorpublic void setFetchSize(int fetchSize)
UsageMonitor-1
can be used to indicate no maximum fetch size.
setFetchSize in interface UsageMonitorpublic void start()
UsageMonitor
The services to monitor are reloaded from persistent storage
and polling consumers created for each service. These retrieve
Usage reports from a service.
start in interface UsageMonitorpublic void stop()
UsageMonitor
stop in interface UsageMonitorpublic void stopAndWait()
UsageMonitor
stopAndWait in interface UsageMonitorpublic void restart()
UsageMonitorstopAndWait() followed by
start()
restart in interface UsageMonitorpublic void activityStarted(Activity act)
UsageMonitor
activityStarted in interface UsageMonitor
public void activityStarted(org.hibernate.Session sess,
Activity act)
UsageMonitorUsageMonitor.activityStarted(Activity) which uses an
existing Session. Caller is responsible for creating and
committing the transaction.
activityStarted in interface UsageMonitor
public void activityStopped(org.hibernate.Session sess,
Activity act)
UsageMonitor
activityStopped in interface UsageMonitorpublic void activityStopped(Activity act)
activityStopped in interface UsageMonitor
public void activitiesStopped(org.hibernate.Session sess,
List<Activity> activities)
UsageMonitor
activitiesStopped in interface UsageMonitorpublic void activitiesStopped(List<Activity> activities)
UsageMonitor
activitiesStopped in interface UsageMonitorpublic Map<String,Exception> getServiceExceptions()
getServiceExceptions in interface UsageMonitor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||