Revert "Clustering - common infrastructure."
[lispflowmapping.git] / mappingservice / southbound / src / main / java / org / opendaylight / lispflowmapping / southbound / lisp / AuthenticationKeyDataListener.java
index bf46250a02b5693e0bb16aa37c89be246efbf9d4..d66ed11ca973998d9097053ff085dc883f108ef5 100644 (file)
@@ -39,6 +39,8 @@ public class AuthenticationKeyDataListener implements DataTreeChangeListener<Aut
     private final DataBroker broker;
     private final InstanceIdentifier<AuthenticationKey> path;
     private ListenerRegistration<DataTreeChangeListener<AuthenticationKey>> registration;
+    private boolean authKeyRefreshing = false;
+    private long authKeyRefreshingDate;
 
 
     public AuthenticationKeyDataListener(final DataBroker broker, final SimpleMapCache smc) {
@@ -56,8 +58,22 @@ public class AuthenticationKeyDataListener implements DataTreeChangeListener<Aut
         registration.close();
     }
 
+    public boolean isAuthKeyRefreshing() {
+        return authKeyRefreshing;
+    }
+
+    public void setAuthKeyRefreshing(boolean authKeyRefreshing) {
+        this.authKeyRefreshing = authKeyRefreshing;
+    }
+
+    public long getAuthKeyRefreshingDate() {
+        return authKeyRefreshingDate;
+    }
+
     @Override
     public void onDataTreeChanged(Collection<DataTreeModification<AuthenticationKey>> changes) {
+        authKeyRefreshing = true;
+        authKeyRefreshingDate = System.currentTimeMillis();
         for (DataTreeModification<AuthenticationKey> change : changes) {
             final DataObjectModification<AuthenticationKey> mod = change.getRootNode();