geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [4/5] incubator-geode git commit: Add await method
Date Fri, 21 Oct 2016 23:24:54 GMT
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/627aebff
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/627aebff
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/627aebff

Branch: refs/heads/feature/GEODE-2012
Commit: 627aebffe02ddfa66b2acf449732f30f6f57bc4d
Parents: 4ebebf0
Author: Kirk Lund <klund@apache.org>
Authored: Thu Oct 20 12:27:34 2016 -0700
Committer: Kirk Lund <klund@apache.org>
Committed: Thu Oct 20 12:27:34 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/627aebff/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();
   }


Mime
View raw message