X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=openflowplugin-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fapi%2Fopenflow%2Fdevice%2FDeviceManager.java;h=64cfd864d1aca65c72602fcad1126714aea96e10;hb=f1cc4de7dee9e22c231a90cf517b03bc5071ad35;hp=4e4d1d11eb10cc386c0db5bf71aa37d78fd56802;hpb=38e2058cc1a7250a6693249dfb263f1a0255a0dd;p=openflowplugin.git diff --git a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/DeviceManager.java b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/DeviceManager.java index 4e4d1d11eb..64cfd864d1 100644 --- a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/DeviceManager.java +++ b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/DeviceManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2015, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -8,45 +8,56 @@ package org.opendaylight.openflowplugin.api.openflow.device; -import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; +import com.google.common.util.concurrent.CheckedFuture; +import javax.annotation.Nonnull; +import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException; import org.opendaylight.openflowplugin.api.openflow.OFPManager; -import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceConnectedHandler; -import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceDisconnectedHandler; -import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceInitializationPhaseHandler; -import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceLifecycleSupervisor; -import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceTerminationPhaseHandler; +import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext; import org.opendaylight.openflowplugin.api.openflow.translator.TranslatorLibrarian; +import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node; +import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; +import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; /** * This interface is responsible for instantiating DeviceContext and * registering transaction chain for each DeviceContext. Each device * has its own device context managed by this manager. - * Created by Martin Bobak <mbobak@cisco.com> on 25.2.2015. */ -public interface DeviceManager extends DeviceConnectedHandler, DeviceDisconnectedHandler, DeviceLifecycleSupervisor, - DeviceInitializationPhaseHandler, DeviceTerminationPhaseHandler, TranslatorLibrarian, AutoCloseable, OFPManager { +public interface DeviceManager extends + OFPManager, + TranslatorLibrarian { /** - * Sets notification publish service - * - * @param notificationPublishService - */ - void setNotificationPublishService(NotificationPublishService notificationPublishService); - - /** - * invoked after all services injected + * invoked after all services injected. */ void initialize(); - /** - * Returning device context from map maintained in device manager - * This prevent to send whole device context to another context - * If device context not exists for nodeId it will return null - * - * @param deviceInfo@return device context or null - */ - DeviceContext getDeviceContextFromNodeId(DeviceInfo deviceInfo); + void setFlowRemovedNotificationOn(boolean value); + + boolean isFlowRemovedNotificationOn(); + + void setGlobalNotificationQuota(long globalNotificationQuota); + + void setSwitchFeaturesMandatory(boolean switchFeaturesMandatory); + + void setSkipTableFeatures(boolean skipTableFeatures); + + void setBarrierCountLimit(int barrierCountLimit); + + void setBarrierInterval(long barrierTimeoutLimit); + + CheckedFuture removeDeviceFromOperationalDS(DeviceInfo deviceInfo); + + CheckedFuture removeDeviceFromOperationalDS(final KeyedInstanceIdentifier ii); + + void setUseSingleLayerSerialization(Boolean useSingleLayerSerialization); + + DeviceContext createContext(@Nonnull final ConnectionContext connectionContext); + + long getBarrierIntervalNanos(); + + int getBarrierCountLimit(); - void setStatisticsRpcEnabled(boolean isStatisticsRpcEnabled); + void sendNodeAddedNotification(@Nonnull final DeviceInfo deviceInfo); }