More actor clean-up
[policy/models.git] / models-interactions / model-actors / actorServiceProvider / src / main / java / org / onap / policy / controlloop / actorserviceprovider / impl / OperatorPartial.java
index 3e15c1b..8007c24 100644 (file)
@@ -61,6 +61,17 @@ public abstract class OperatorPartial extends StartConfigPartial<Map<String, Obj
         this.name = name;
     }
 
+    /**
+     * Verifies that the operator is running.
+     *
+     * @throws IllegalStateException if it is not running
+     */
+    public void verifyRunning() {
+        if (!isAlive()) {
+            throw new IllegalStateException("operation is not running: " + getFullName());
+        }
+    }
+
     /**
      * This method does nothing.
      */