Remove sal.core.api.mount.MountProvisionListener
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / md / sal / dom / api / DOMEvent.java
index 1e19e19f0aae3c6455379bb37fbc9dcec4318ff5..312de34d611849fe1056dbcae77c495970899a31 100644 (file)
@@ -8,15 +8,24 @@
 
 package org.opendaylight.controller.md.sal.dom.api;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import java.time.Instant;
 import java.util.Date;
 
 /**
- * Generic event interface
+ * Generic event interface.
  */
-public interface DOMEvent {
+@SuppressFBWarnings(value = "NM_SAME_SIMPLE_NAME_AS_INTERFACE", justification = "Migration")
+public interface DOMEvent extends org.opendaylight.mdsal.dom.api.DOMEvent {
+
+    @Override
+    default Instant getEventInstant() {
+        final Date eventTime = getEventTime();
+        return eventTime != null ? eventTime.toInstant() : null;
+    }
 
     /**
-     * Get the time of the event occurrence
+     * Get the time of the event occurrence.
      *
      * @return the event time
      */