summaryrefslogtreecommitdiff
path: root/java/common/src
diff options
context:
space:
mode:
authorRobert Greig <rgreig@apache.org>2007-01-16 19:38:51 +0000
committerRobert Greig <rgreig@apache.org>2007-01-16 19:38:51 +0000
commite5147d0df8b76db94059a442cfbe40cbce22d79f (patch)
tree0ad5052320fd512e5c5a454abd7f192aa233e128 /java/common/src
parent469be448d433c6cb81c498aae56207adfafee866 (diff)
downloadqpid-python-e5147d0df8b76db94059a442cfbe40cbce22d79f.tar.gz
Fix to broken build due to missing file.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@496833 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/common/src')
-rw-r--r--java/common/src/main/java/org/apache/qpid/util/concurrent/BooleanLatch.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/java/common/src/main/java/org/apache/qpid/util/concurrent/BooleanLatch.java b/java/common/src/main/java/org/apache/qpid/util/concurrent/BooleanLatch.java
new file mode 100644
index 0000000000..70a5f2dc5e
--- /dev/null
+++ b/java/common/src/main/java/org/apache/qpid/util/concurrent/BooleanLatch.java
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.qpid.util.concurrent;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author Apache Software Foundation
+ */
+public class BooleanLatch extends CountDownLatch
+{
+ public BooleanLatch()
+ {
+ super(1);
+ }
+
+ public void signal()
+ {
+ countDown();
+ }
+
+ public void await(long nanos) throws InterruptedException
+ {
+ await(nanos, TimeUnit.NANOSECONDS);
+ }
+}