You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2016/10/26 20:10:37 UTC
[13/15] incubator-geode git commit: Add await method
Add await method
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/34834ce0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/34834ce0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/34834ce0
Branch: refs/heads/feature/GEODE-2012
Commit: 34834ce00787dfa27915bf687c28550bc170d3a5
Parents: 5d80ad4
Author: Kirk Lund <kl...@apache.org>
Authored: Thu Oct 20 12:27:34 2016 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Wed Oct 26 10:19:14 2016 -0700
----------------------------------------------------------------------
.../geode/internal/util/concurrent/StoppableCountDownLatch.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/34834ce0/geode-core/src/main/java/org/apache/geode/internal/util/concurrent/StoppableCountDownLatch.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/util/concurrent/StoppableCountDownLatch.java b/geode-core/src/main/java/org/apache/geode/internal/util/concurrent/StoppableCountDownLatch.java
index 1f0ac34..a3052078 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/util/concurrent/StoppableCountDownLatch.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/util/concurrent/StoppableCountDownLatch.java
@@ -77,6 +77,11 @@ public class StoppableCountDownLatch {
return latch.await(msTimeout, TimeUnit.MILLISECONDS);
}
+ public boolean await(final long timeout, final TimeUnit unit) throws InterruptedException {
+ stopper.checkCancelInProgress(null);
+ return latch.await(timeout, unit);
+ }
+
public synchronized void countDown() {
latch.countDown();
}