geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [13/15] incubator-geode git commit: Add await method
Date Wed, 26 Oct 2016 20:10:37 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/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 <klund@apache.org>
Authored: Thu Oct 20 12:27:34 2016 -0700
Committer: Kirk Lund <klund@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();
   }


Mime
View raw message