Migrate OSGI compendium reference
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / md / sal / dom / api / DOMEvent.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.controller.md.sal.dom.api;
10
11 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
12 import java.time.Instant;
13 import java.util.Date;
14
15 /**
16  * Generic event interface.
17  * @deprecated Use {@link org.opendaylight.mdsal.dom.api.DOMEvent} instead.
18  */
19 @Deprecated(forRemoval = true)
20 @SuppressFBWarnings(value = "NM_SAME_SIMPLE_NAME_AS_INTERFACE", justification = "Migration")
21 public interface DOMEvent extends org.opendaylight.mdsal.dom.api.DOMEvent {
22
23     @Override
24     default Instant getEventInstant() {
25         final Date eventTime = getEventTime();
26         return eventTime != null ? eventTime.toInstant() : null;
27     }
28
29     /**
30      * Get the time of the event occurrence.
31      *
32      * @return the event time
33      */
34     Date getEventTime();
35 }