@Test public void testGetInFlightRollupCount() { int expected1 = 123; int expected2 = 45; when(rollupReadExecutors.getActiveCount()) .thenReturn(expected1) .thenReturn(expected2); int count = service.getInFlightRollupCount(); assertEquals(expected1, count); count = service.getInFlightRollupCount(); assertEquals(expected2, count); }
public synchronized int getInFlightRollupCount() { return rollupReadExecutors.getActiveCount(); }
RollupService implements Runnable, RollupServiceMBean { public synchronized int getInFlightRollupCount() { return rollupReadExecutors.getActiveCount(); } }
RollupService implements Runnable, RollupServiceMBean { public synchronized int getInFlightRollupCount() { return rollupReadExecutors.getActiveCount(); } RollupService(ScheduleContext context); @VisibleForTesting  RollupService(ScheduleContext context,
                         ShardStateManager shardStateManager,
                         ThreadPoolExecutor locatorFetchExecutors,
                         ThreadPoolExecutor rollupReadExecutors,
                         ThreadPoolExecutor rollupWriteExecutors,
                         long rollupDelayMillis,
                         long rollupDelayForMetricsWithShortDelay,
                         long rollupWaitForMetricsWithLongDelay,
                         long pollerPeriod,
                         long configRefreshInterval); }
RollupService implements Runnable, RollupServiceMBean { public synchronized int getInFlightRollupCount() { return rollupReadExecutors.getActiveCount(); } RollupService(ScheduleContext context); @VisibleForTesting  RollupService(ScheduleContext context,
                         ShardStateManager shardStateManager,
                         ThreadPoolExecutor locatorFetchExecutors,
                         ThreadPoolExecutor rollupReadExecutors,
                         ThreadPoolExecutor rollupWriteExecutors,
                         long rollupDelayMillis,
                         long rollupDelayForMetricsWithShortDelay,
                         long rollupWaitForMetricsWithLongDelay,
                         long pollerPeriod,
                         long configRefreshInterval); void initializeGauges(); void forcePoll(); void run(); synchronized void setServerTime(long millis); synchronized long getServerTime(); synchronized void setKeepingServerTime(boolean b); synchronized boolean getKeepingServerTime(); synchronized void setPollerPeriod(long l); synchronized long getPollerPeriod(); synchronized int getScheduledSlotCheckCount(); synchronized int getSecondsSinceLastSlotCheck(); synchronized int getSlotCheckConcurrency(); synchronized void setSlotCheckConcurrency(int i); synchronized int getRollupConcurrency(); synchronized void setRollupConcurrency(int i); synchronized int getQueuedRollupCount(); synchronized int getInFlightRollupCount(); synchronized boolean getActive(); synchronized void setActive(boolean b); void addShard(Integer shard); void removeShard(Integer shard); Collection<Integer> getManagedShards(); synchronized Collection<Integer> getRecentlyScheduledShards(); synchronized Collection<String> getOldestUnrolledSlotPerGranularity(int shard); }
RollupService implements Runnable, RollupServiceMBean { public synchronized int getInFlightRollupCount() { return rollupReadExecutors.getActiveCount(); } RollupService(ScheduleContext context); @VisibleForTesting  RollupService(ScheduleContext context,
                         ShardStateManager shardStateManager,
                         ThreadPoolExecutor locatorFetchExecutors,
                         ThreadPoolExecutor rollupReadExecutors,
                         ThreadPoolExecutor rollupWriteExecutors,
                         long rollupDelayMillis,
                         long rollupDelayForMetricsWithShortDelay,
                         long rollupWaitForMetricsWithLongDelay,
                         long pollerPeriod,
                         long configRefreshInterval); void initializeGauges(); void forcePoll(); void run(); synchronized void setServerTime(long millis); synchronized long getServerTime(); synchronized void setKeepingServerTime(boolean b); synchronized boolean getKeepingServerTime(); synchronized void setPollerPeriod(long l); synchronized long getPollerPeriod(); synchronized int getScheduledSlotCheckCount(); synchronized int getSecondsSinceLastSlotCheck(); synchronized int getSlotCheckConcurrency(); synchronized void setSlotCheckConcurrency(int i); synchronized int getRollupConcurrency(); synchronized void setRollupConcurrency(int i); synchronized int getQueuedRollupCount(); synchronized int getInFlightRollupCount(); synchronized boolean getActive(); synchronized void setActive(boolean b); void addShard(Integer shard); void removeShard(Integer shard); Collection<Integer> getManagedShards(); synchronized Collection<Integer> getRecentlyScheduledShards(); synchronized Collection<String> getOldestUnrolledSlotPerGranularity(int shard);  }