package dst.ass3.messaging;

import java.io.Closeable;
import java.io.IOException;
import java.util.Map;

public interface IWorkloadMonitor extends Closeable {

    /**
     * Returns for each request type the amount of waiting requests.
     *
     * @return a map
     */
    Map<RequestType, Long> getRequestCount();

    /**
     * Returns the amount of workers for each request type. This can be deduced from the amount of consumers to each
     * queue.
     *
     * @return a map
     */
    Map<RequestType, Long> getWorkerCount();

    /**
     * Returns for each request type the average processing time of the last 10 recorded requests. The data comes from
     * subscriptions to the respective topics.
     *
     * @return a map
     */
    Map<RequestType, Double> getAverageProcessingTime();

    @Override
    void close() throws IOException;
}
