Use ByteBuf.readRetainedSlice()
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / connection / DeviceConnectionStatusProvider.java
1 /*
2  * Copyright (c) 2019 Ericsson India Global Services Pvt Ltd. 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.openflowplugin.api.openflow.connection;
10
11 import java.math.BigInteger;
12 import java.time.LocalDateTime;
13
14 public interface DeviceConnectionStatusProvider extends AutoCloseable {
15
16     /**
17      * Initialize the DeviceConnectionStatusProvider.
18      */
19     void init();
20
21     /**
22      * Get the last connection time of a device.
23      * @param datapathId datapathId of node
24      */
25     LocalDateTime getDeviceLastConnectionTime(BigInteger datapathId);
26
27     /**
28      * Update the last connection time of a device.
29      * @param datapathId datapathId of node
30      * @param time last connected time of datapathId
31      */
32     void addDeviceLastConnectionTime(BigInteger datapathId, LocalDateTime time);
33
34     /**
35       * Clear the last connection time of a device.
36       * @param datapathId datapathId of node
37       */
38     void removeDeviceLastConnectionTime(BigInteger datapathId);
39 }