aboutsummaryrefslogtreecommitdiffstats
path: root/integrity-monitor/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'integrity-monitor/src/main/java/org')
-rw-r--r--integrity-monitor/src/main/java/org/openecomp/policy/common/im/IntegrityMonitor.java10
-rw-r--r--integrity-monitor/src/main/java/org/openecomp/policy/common/im/StandbyStatusException.java5
-rw-r--r--integrity-monitor/src/main/java/org/openecomp/policy/common/im/StateElement.java4
-rw-r--r--integrity-monitor/src/main/java/org/openecomp/policy/common/im/StateManagement.java6
-rw-r--r--integrity-monitor/src/main/java/org/openecomp/policy/common/im/StateTransition.java8
-rw-r--r--integrity-monitor/src/main/java/org/openecomp/policy/common/im/jmx/JmxAgentConnection.java2
-rw-r--r--integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/ForwardProgressEntity.java1
-rw-r--r--integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/ImTestEntity.java6
-rw-r--r--integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/ResourceRegistrationEntity.java1
-rw-r--r--integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/StateManagementEntity.java1
10 files changed, 12 insertions, 32 deletions
diff --git a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/IntegrityMonitor.java b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/IntegrityMonitor.java
index 57182f7a..4e573d8c 100644
--- a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/IntegrityMonitor.java
+++ b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/IntegrityMonitor.java
@@ -62,7 +62,6 @@ public class IntegrityMonitor {
private static IntegrityMonitor instance = null;
private static String resourceName = null;
- private boolean fpcError = false;
boolean alarmExists = false;
/*
@@ -79,7 +78,6 @@ public class IntegrityMonitor {
// Persistence Unit for JPA
private static final String PERSISTENCE_UNIT = "operationalPU";
- private ComponentAdmin admin = null;
private StateManagement stateManager = null;
private static final int CYCLE_INTERVAL_MILLIS = 1000;
@@ -350,13 +348,12 @@ public class IntegrityMonitor {
// create management bean
try {
- admin = new ComponentAdmin(resourceName, this, stateManager);
+ new ComponentAdmin(resourceName, this, stateManager);
} catch (Exception e) {
logger.error("ComponentAdmin constructor exception: " + e.toString());
}
- // create FPManager inner class
- FPManager fpMonitor = new FPManager();
+ new FPManager();
}
@@ -1244,8 +1241,6 @@ public class IntegrityMonitor {
// no forward progress
missedCycles += 1;
if (missedCycles >= failedCounterThreshold && !alarmExists) {
- // set op state to disabled failed
- fpcError = true;
logger.info("Forward progress not detected for resource " + resourceName + ". Setting state to disable failed.");
if(!(stateManager.getOpState()).equals(StateManagement.DISABLED)){
// Note: The refreshStateAudit will make redundant calls
@@ -1258,7 +1253,6 @@ public class IntegrityMonitor {
// forward progress has occurred
lastFpCounter = fpCounter;
missedCycles = 0;
- fpcError = false;
// set op state to enabled
logger.debug("Forward progress detected for resource " + resourceName + ". Setting state to enable not failed.");
if(!(stateManager.getOpState()).equals(StateManagement.ENABLED)){
diff --git a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/StandbyStatusException.java b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/StandbyStatusException.java
index 3167dded..1de08b0e 100644
--- a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/StandbyStatusException.java
+++ b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/StandbyStatusException.java
@@ -21,6 +21,11 @@
package org.openecomp.policy.common.im;
public class StandbyStatusException extends Exception {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -5262512285108747134L;
+
public StandbyStatusException()
{
}
diff --git a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/StateElement.java b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/StateElement.java
index 6c6ce59c..ad60b46d 100644
--- a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/StateElement.java
+++ b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/StateElement.java
@@ -20,8 +20,6 @@
package org.openecomp.policy.common.im;
-import java.util.*;
-
//import org.apache.log4j.Logger;
import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
import org.openecomp.policy.common.logging.flexlogger.Logger;
@@ -40,7 +38,7 @@ public class StateElement {
String endingStandbyStatus = null;
String exception = null;
- public void StateElement()
+ public StateElement()
{
}
diff --git a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/StateManagement.java b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/StateManagement.java
index fd0f3d9f..d86cfcfb 100644
--- a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/StateManagement.java
+++ b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/StateManagement.java
@@ -34,7 +34,6 @@ import javax.persistence.Query;
import org.openecomp.policy.common.im.jpa.StateManagementEntity;
import org.openecomp.policy.common.im.StateElement;
import org.openecomp.policy.common.im.StandbyStatusException;
-import org.openecomp.policy.common.im.StateChangeNotifier;
import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
import org.openecomp.policy.common.logging.flexlogger.Logger;
@@ -73,16 +72,12 @@ public class StateManagement extends Observable {
public static final String AVAILABLE_STATUS= "availStatus";
public static final String STANDBY_STATUS = "standbyStatus";
- private static final String REMOVE = "remove";
- private static final String ADD = "add";
-
private String resourceName = null;
private String adminState = null;
private String opState = null;
private String availStatus = null;
private String standbyStatus = null;
private EntityManager em;
- private EntityManagerFactory emf = null;
private StateTransition st = null;
/*
@@ -108,7 +103,6 @@ public class StateManagement extends Observable {
public StateManagement(EntityManagerFactory emf, String resourceName) throws Exception
{
logger.debug("StateManagement: constructor, resourceName: " + resourceName);
- this.emf = emf;
em = emf.createEntityManager();
EntityTransaction et = em.getTransaction();
diff --git a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/StateTransition.java b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/StateTransition.java
index 3bc5bbc7..c3805340 100644
--- a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/StateTransition.java
+++ b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/StateTransition.java
@@ -126,7 +126,7 @@ public class StateTransition {
}
String key = adminState + "," + opState + "," + availStatus2 + "," + standbyStatus + "," + actionName;
logger.debug("Ending State search key: " + key);
- String value = (String)StateTable.get(key);
+ String value = StateTable.get(key);
if (value != null) {
try {
@@ -715,11 +715,11 @@ public class StateTransition {
public void displayStateTable()
{
- Set set = StateTable.entrySet();
- Iterator iter = set.iterator();
+ Set<?> set = StateTable.entrySet();
+ Iterator<?> iter = set.iterator();
while(iter.hasNext()) {
- Map.Entry me = (Map.Entry)iter.next();
+ Map.Entry<?, ?> me = (Map.Entry<?, ?>)iter.next();
logger.debug((String)me.getKey() + ((String)me.getValue()).replace(".", ","));
}
}
diff --git a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jmx/JmxAgentConnection.java b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jmx/JmxAgentConnection.java
index 4940c4d2..bc28c485 100644
--- a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jmx/JmxAgentConnection.java
+++ b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jmx/JmxAgentConnection.java
@@ -26,8 +26,6 @@ package org.openecomp.policy.common.im.jmx;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
-import java.util.Properties;
-
import javax.management.MBeanServerConnection;
import javax.management.Notification;
import javax.management.NotificationListener;
diff --git a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/ForwardProgressEntity.java b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/ForwardProgressEntity.java
index 4662f581..99a0d0ad 100644
--- a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/ForwardProgressEntity.java
+++ b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/ForwardProgressEntity.java
@@ -32,7 +32,6 @@ import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.PrePersist;
import javax.persistence.PreUpdate;
-import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
diff --git a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/ImTestEntity.java b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/ImTestEntity.java
index 0eee38b0..c7ae0abc 100644
--- a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/ImTestEntity.java
+++ b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/ImTestEntity.java
@@ -28,19 +28,13 @@ import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
-import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.PrePersist;
import javax.persistence.PreUpdate;
-import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
-import javax.persistence.Version;
-/*
- * The Entity class to persist a policy object Action Body
- */
@Entity
@Table(name="ImTestEntity")
diff --git a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/ResourceRegistrationEntity.java b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/ResourceRegistrationEntity.java
index c7eec085..29443088 100644
--- a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/ResourceRegistrationEntity.java
+++ b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/ResourceRegistrationEntity.java
@@ -32,7 +32,6 @@ import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.PrePersist;
import javax.persistence.PreUpdate;
-import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
diff --git a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/StateManagementEntity.java b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/StateManagementEntity.java
index b747c8f9..737daec3 100644
--- a/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/StateManagementEntity.java
+++ b/integrity-monitor/src/main/java/org/openecomp/policy/common/im/jpa/StateManagementEntity.java
@@ -31,7 +31,6 @@ import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.PrePersist;
import javax.persistence.PreUpdate;
-import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;