@Test public void testQueueLength() { Map<String, Integer> queueLengthMap = new HashMap<String, Integer>(); queueLengthMap.put(EventsImpl.MYSQL, new Integer(0)); queueLengthMap.put("mock", new Integer(0)); assertThat(eventsImpl.queuesLength(), is(queueLengthMap)); }
@Override public Map<String, Integer> queuesLength() { Map<String, Integer> queueLengthMap = new HashMap<String, Integer>(); queueLengthMap.put(MYSQL, new Integer(mysqlQueue.size())); for (String name : eventIngestionExecutors.keySet()) { queueLengthMap.put(name.toLowerCase(), new Integer(eventIngestionExecutors.get(name).queueLength())); } return queueLengthMap; }
EventsImpl implements Events, EventsMBean { @Override public Map<String, Integer> queuesLength() { Map<String, Integer> queueLengthMap = new HashMap<String, Integer>(); queueLengthMap.put(MYSQL, new Integer(mysqlQueue.size())); for (String name : eventIngestionExecutors.keySet()) { queueLengthMap.put(name.toLowerCase(), new Integer(eventIngestionExecutors.get(name).queueLength())); } return queueLengthMap; } }
EventsImpl implements Events, EventsMBean { @Override public Map<String, Integer> queuesLength() { Map<String, Integer> queueLengthMap = new HashMap<String, Integer>(); queueLengthMap.put(MYSQL, new Integer(mysqlQueue.size())); for (String name : eventIngestionExecutors.keySet()) { queueLengthMap.put(name.toLowerCase(), new Integer(eventIngestionExecutors.get(name).queueLength())); } return queueLengthMap; } @Inject  EventsImpl(Map<String, EventIngestionExecutor> eventIngestionExecutors,
                      final @Named(EXECUTOR_THREADPOOL_SIZE) Integer threadPoolSize,
                      final Assignments assignments,
                      final TransactionFactory transactionFactory); }
EventsImpl implements Events, EventsMBean { @Override public Map<String, Integer> queuesLength() { Map<String, Integer> queueLengthMap = new HashMap<String, Integer>(); queueLengthMap.put(MYSQL, new Integer(mysqlQueue.size())); for (String name : eventIngestionExecutors.keySet()) { queueLengthMap.put(name.toLowerCase(), new Integer(eventIngestionExecutors.get(name).queueLength())); } return queueLengthMap; } @Inject  EventsImpl(Map<String, EventIngestionExecutor> eventIngestionExecutors,
                      final @Named(EXECUTOR_THREADPOOL_SIZE) Integer threadPoolSize,
                      final Assignments assignments,
                      final TransactionFactory transactionFactory); @Override void recordEvents(Application.Name applicationName,
                             Experiment.Label experimentLabel, User.ID userID, EventList events, Set<Context> contextSet); @Override void shutdown(); @Override Map<String, Integer> queuesLength(); @Override int getQueueSize(); }
EventsImpl implements Events, EventsMBean { @Override public Map<String, Integer> queuesLength() { Map<String, Integer> queueLengthMap = new HashMap<String, Integer>(); queueLengthMap.put(MYSQL, new Integer(mysqlQueue.size())); for (String name : eventIngestionExecutors.keySet()) { queueLengthMap.put(name.toLowerCase(), new Integer(eventIngestionExecutors.get(name).queueLength())); } return queueLengthMap; } @Inject  EventsImpl(Map<String, EventIngestionExecutor> eventIngestionExecutors,
                      final @Named(EXECUTOR_THREADPOOL_SIZE) Integer threadPoolSize,
                      final Assignments assignments,
                      final TransactionFactory transactionFactory); @Override void recordEvents(Application.Name applicationName,
                             Experiment.Label experimentLabel, User.ID userID, EventList events, Set<Context> contextSet); @Override void shutdown(); @Override Map<String, Integer> queuesLength(); @Override int getQueueSize();  }