Proxy MD-SAL interfaces in DOMMountPointServiceImpl
[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  */
18 @SuppressFBWarnings(value = "NM_SAME_SIMPLE_NAME_AS_INTERFACE", justification = "Migration")
19 public interface DOMEvent extends org.opendaylight.mdsal.dom.api.DOMEvent {
20
21     @Override
22     default Instant getEventInstant() {
23         final Date eventTime = getEventTime();
24         return eventTime != null ? eventTime.toInstant() : null;
25     }
26
27     /**
28      * Get the time of the event occurrence.
29      *
30      * @return the event time
31      */
32     Date getEventTime();
33 }