X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fapi%2FDOMEvent.java;h=312de34d611849fe1056dbcae77c495970899a31;hb=refs%2Fchanges%2F81%2F73381%2F2;hp=1b8ec9bbb0ffc0de4ae6bc2da0f4bc73f571da62;hpb=757e4a388197abb41d6b099ebdd0e6ac9830dd27;p=controller.git 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..312de34d61 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,29 @@ * * 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. */ -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 */