Deprecate all MD-SAL APIs
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / md / sal / dom / api / DOMEvent.java
index 6022b184dc285fde4a7119f8f8b0680d5f7cf698..e3c146b8750845b6ab2d8fafb76af80ead487374 100644 (file)
@@ -8,12 +8,23 @@
 
 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.
+ * @deprecated Use {@link org.opendaylight.mdsal.dom.api.DOMEvent} instead.
  */
-public interface DOMEvent {
+@Deprecated
+@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.