2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
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
9 package org.opendaylight.controller.md.sal.dom.api;
11 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
12 import java.time.Instant;
13 import java.util.Date;
16 * Generic event interface.
18 @SuppressFBWarnings(value = "NM_SAME_SIMPLE_NAME_AS_INTERFACE", justification = "Migration")
19 public interface DOMEvent extends org.opendaylight.mdsal.dom.api.DOMEvent {
22 default Instant getEventInstant() {
23 final Date eventTime = getEventTime();
24 return eventTime != null ? eventTime.toInstant() : null;
28 * Get the time of the event occurrence.
30 * @return the event time