use of org.apache.geode.cache.asyncqueue.internal.AsyncEventQueueStats in project geode by apache.
the class MyGatewayEventSubstitutionFilter method checkAsyncEventQueueUnprocessedStats.
public static void checkAsyncEventQueueUnprocessedStats(String asyncQueueId, int events) {
Set<AsyncEventQueue> asyncQueues = cache.getAsyncEventQueues();
AsyncEventQueue queue = null;
for (AsyncEventQueue q : asyncQueues) {
if (q.getId().equals(asyncQueueId)) {
queue = q;
break;
}
}
final AsyncEventQueueStats statistics = ((AsyncEventQueueImpl) queue).getStatistics();
assertEquals(events, (statistics.getUnprocessedEventsAddedBySecondary() + statistics.getUnprocessedTokensRemovedBySecondary()));
assertEquals(events, (statistics.getUnprocessedEventsRemovedByPrimary() + statistics.getUnprocessedTokensAddedByPrimary()));
}
Aggregations