X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fapi%2FDOMEvent.java;h=e3c146b8750845b6ab2d8fafb76af80ead487374;hp=1b8ec9bbb0ffc0de4ae6bc2da0f4bc73f571da62;hb=3ec97cd0a86ad1b79f6854dc6924eb7b06e359a3;hpb=757e4a388197abb41d6b099ebdd0e6ac9830dd27 diff --git a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMEvent.java b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMEvent.java index 1b8ec9bbb0..e3c146b875 100644 --- a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMEvent.java +++ b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMEvent.java @@ -3,20 +3,31 @@ * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html. + * and is available at http://www.eclipse.org/legal/epl-v10.html */ 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. + * @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 + * Get the time of the event occurrence. * * @return the event time */