albertogpz commented on a change in pull request #6052:
URL: https://github.com/apache/geode/pull/6052#discussion_r589390847
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegionQueue.java
##########
@@ -453,21 +454,22 @@ public Object peek() {
* If a matching object also fulfills the endPredicate then the method
* stops looking for more matching objects.
*/
- public List<Object> getElementsMatching(Predicate matchingPredicate,
Predicate endPredicate) {
+ public List<Object> getElementsMatching(Predicate<InternalGatewayQueueEvent>
matchingPredicate,
+ Predicate<InternalGatewayQueueEvent> endPredicate) {
getInitializationLock().readLock().lock();
try {
if (this.getPartitionedRegion().isDestroyed()) {
throw new BucketRegionQueueUnavailableException();
}
- List<Object> elementsMatching = new ArrayList<Object>();
+ List<Object> elementsMatching = new ArrayList();
Iterator<Object> it = this.eventSeqNumDeque.iterator();
while (it.hasNext()) {
Object key = it.next();
Object object = optimalGet(key);
- if (matchingPredicate.test(object)) {
+ if (matchingPredicate.test((InternalGatewayQueueEvent) object)) {
Review comment:
ok
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegionQueue.java
##########
@@ -478,6 +480,24 @@ public Object peek() {
}
}
+ public boolean isThereEventsMatching(Predicate<InternalGatewayQueueEvent>
matchingPredicate) {
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]