albertogpz commented on a change in pull request #6052:
URL: https://github.com/apache/geode/pull/6052#discussion_r589359238
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderQueue.java
##########
@@ -862,19 +877,35 @@ EventsAndLastKey getElementsMatching(Predicate condition,
Predicate stopConditio
continue;
}
- if (condition.test(object)) {
- elementsMatching.add(object);
- peekedIds.add(currentKey);
- extraPeekedIds.add(currentKey);
- lastKey = currentKey;
+ if (condition.test((InternalGatewayQueueEvent) object)) {
+ elementsMatching.add(new KeyAndEventPair(currentKey,
(GatewaySenderEventImpl) object));
- if (stopCondition.test(object)) {
+ if (stopCondition.test((InternalGatewayQueueEvent) object)) {
break;
}
}
}
- return new EventsAndLastKey(elementsMatching, lastKey);
+ return elementsMatching;
+ }
+
+ public boolean isThereEventsMatching(Predicate<InternalGatewayQueueEvent>
condition) {
+ InternalGatewayQueueEvent object;
Review comment:
ok
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]