]> git.somenet.org - pub/jan/dst18.git/blob - ass3-messaging/src/main/java/dst/ass3/messaging/IWorkloadMonitor.java
Add template for assignment 3
[pub/jan/dst18.git] / ass3-messaging / src / main / java / dst / ass3 / messaging / IWorkloadMonitor.java
1 package dst.ass3.messaging;
2
3 import java.io.Closeable;
4 import java.io.IOException;
5 import java.util.Map;
6
7 public interface IWorkloadMonitor extends Closeable {
8
9     /**
10      * Returns for each request type the amount of waiting requests.
11      *
12      * @return a map
13      */
14     Map<RequestType, Long> getRequestCount();
15
16     /**
17      * Returns the amount of workers for each request type. This can be deduced from the amount of consumers to each
18      * queue.
19      *
20      * @return a map
21      */
22     Map<RequestType, Long> getWorkerCount();
23
24     /**
25      * Returns for each request type the average processing time of the last 10 recorded requests. The data comes from
26      * subscriptions to the respective topics.
27      *
28      * @return a map
29      */
30     Map<RequestType, Double> getAverageProcessingTime();
31
32     @Override
33     void close() throws IOException;
34 }