felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1025759 - in /felix/trunk/coordinator/src/main/java/org/apache/felix: coordination/impl/CoordinationImpl.java service/coordination/Coordination.java
Date Wed, 20 Oct 2010 21:18:31 GMT
Author: fmeschbe
Date: Wed Oct 20 21:18:31 2010
New Revision: 1025759

URL: http://svn.apache.org/viewvc?rev=1025759&view=rev
Log:
FELIX-2671 (OSGi Bug 100) Add new isTerminated method

Modified:
    felix/trunk/coordinator/src/main/java/org/apache/felix/coordination/impl/CoordinationImpl.java
    felix/trunk/coordinator/src/main/java/org/apache/felix/service/coordination/Coordination.java

Modified: felix/trunk/coordinator/src/main/java/org/apache/felix/coordination/impl/CoordinationImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/coordinator/src/main/java/org/apache/felix/coordination/impl/CoordinationImpl.java?rev=1025759&r1=1025758&r2=1025759&view=diff
==============================================================================
--- felix/trunk/coordinator/src/main/java/org/apache/felix/coordination/impl/CoordinationImpl.java
(original)
+++ felix/trunk/coordinator/src/main/java/org/apache/felix/coordination/impl/CoordinationImpl.java
Wed Oct 20 21:18:31 2010
@@ -180,6 +180,16 @@ public class CoordinationImpl implements
         return state == State.FAILED;
     }
 
+    /**
+     * Returns whether the coordination has ended.
+     * <p>
+     * The return value of <code>false</code> may be a transient situation if
+     * the coordination is in the process of terminating.
+     */
+    public boolean isTerminated() {
+        return state == State.TERMINATED;
+    }
+
     public void addTimeout(long timeOutInMs) {
         if (this.timeOutInMs > 0) {
             // already set, ignore

Modified: felix/trunk/coordinator/src/main/java/org/apache/felix/service/coordination/Coordination.java
URL: http://svn.apache.org/viewvc/felix/trunk/coordinator/src/main/java/org/apache/felix/service/coordination/Coordination.java?rev=1025759&r1=1025758&r2=1025759&view=diff
==============================================================================
--- felix/trunk/coordinator/src/main/java/org/apache/felix/service/coordination/Coordination.java
(original)
+++ felix/trunk/coordinator/src/main/java/org/apache/felix/service/coordination/Coordination.java
Wed Oct 20 21:18:31 2010
@@ -145,6 +145,11 @@ public interface Coordination {
     boolean isFailed();
 
     /**
+     * @return true if this Coordination has terminated, false otherwise.
+     */
+    boolean isTerminated();
+
+    /**
      * Add a minimum timeout for this Coordination. If this timeout expires,
      * then the Coordination will fail and the initiating thread will be
      * interrupted. This method must only be called on an active Coordination,



Mime
View raw message