uk.ac.soton.itinnovation.grid.service.sla
Interface UsageMonitor

All Known Implementing Classes:
UsageMonitorImpl

public interface UsageMonitor

A class to manage monitoring of resources.


Method Summary
 void activitiesStopped(List<Activity> activities)
          Notification that a list of activities have stopped.
 void activitiesStopped(org.hibernate.Session session, 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 session, Activity act)
          Version of activityStarted(Activity) which uses an existing Session.
 void activityStopped(Activity act)
           
 void activityStopped(org.hibernate.Session session, 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 cm)
           
 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.
 

Method Detail

setConstraintManager

void setConstraintManager(ConstraintManager cm)

setPollingInterval

void setPollingInterval(int pollingInterval)
Set the polling interval (in seconds).


setFetchSize

void setFetchSize(int fetchSize)
Set the fetch size. This is batch size for the number of usage reports to retrieve in one go. A value of -1 can be used to indicate no maximum fetch size.


start

void start()
Starts monitoring of service resource usage.

The services to monitor are reloaded from persistent storage and polling consumers created for each service. These retrieve Usage reports from a service.


stop

void stop()
Stops monitoring of service resource usage. Any ongoing message retrieval will complete. This method may return before the final round of message retrieval has completed.


stopAndWait

void stopAndWait()
Stops monitoring of service resource usage and waits for any ongoing message retrieval to complete.


restart

void restart()
Convenience method that just calls stopAndWait() followed by start()


activityStarted

void activityStarted(org.hibernate.Session session,
                     Activity act)
Version of activityStarted(Activity) which uses an existing Session. Caller is responsible for creating and committing the transaction.


activityStarted

void activityStarted(Activity act)
Notification that an acitivity has started. This is used to determine which services need to be monitored.


activityStopped

void activityStopped(org.hibernate.Session session,
                     Activity act)
Notification that an acitivity has stopped. This is used to determine which services need to be monitored.


activityStopped

void activityStopped(Activity act)

activitiesStopped

void activitiesStopped(List<Activity> activities)
Notification that a list of activities have stopped. This is used to determine which services need to be monitored.


activitiesStopped

void activitiesStopped(org.hibernate.Session session,
                       List<Activity> activities)
Notification that a list of activities have stopped. This is used to determine which services need to be monitored.


getServiceExceptions

Map<String,Exception> getServiceExceptions()
Returns:
a map between services and exceptions thrown when polling them.


Copyright © 2001-2008 University of Southampton IT Innovation Centre. All Rights Reserved.