private final Map<Queue<T>, SettableFuture<Void>> throttledQueues = new ConcurrentHashMap<>();
private final ThreadPoolLoggingExecutor throttleWorkerPool;
private final NotificationPublishService notificationPublishService;
- private final MessageSpy<Class> messageIntelligenceAgency;
+ private final MessageSpy<Class<?>> messageIntelligenceAgency;
private boolean finishing = false;
private CountDownLatch sleeperLatch = new CountDownLatch(0);
* @param notificationPublishService
* @param messageIntelligenceAgency
*/
- public ThrottledNotificationsOffererImpl(NotificationPublishService notificationPublishService, MessageSpy<Class> messageIntelligenceAgency) {
+ public ThrottledNotificationsOffererImpl(final NotificationPublishService notificationPublishService, final MessageSpy<Class<?>> messageIntelligenceAgency) {
this.notificationPublishService = notificationPublishService;
this.messageIntelligenceAgency = messageIntelligenceAgency;
throttleWorkerPool = new ThreadPoolLoggingExecutor(
}
@Override
- public ListenableFuture<Void> applyThrottlingOnConnection(Queue<T> notificationsQueue) {
+ public ListenableFuture<Void> applyThrottlingOnConnection(final Queue<T> notificationsQueue) {
SettableFuture<Void> throttleWatching = SettableFuture.create();
throttledQueues.put(notificationsQueue, throttleWatching);
synchronized (throttledQueues) {
}
@Override
- public boolean isThrottlingEffective(Queue<T> notificationsQueue) {
+ public boolean isThrottlingEffective(final Queue<T> notificationsQueue) {
return throttledQueues.containsKey(notificationsQueue);
}