Class DeviceContextImpl

    • Method Detail

      • initialSubmitTransaction

        public boolean initialSubmitTransaction()
        Description copied from interface: DeviceContext
        Method for initial submit transaction after successful initial gathering.
        Specified by:
        initialSubmitTransaction in interface DeviceContext
      • getReadTransaction

        public org.opendaylight.mdsal.binding.api.ReadTransaction getReadTransaction()
        Description copied from interface: TxFacade
        Method exposes transaction created for device represented by this context. This read only transaction has a fresh dataStore snapshot. There is a possibility to get different data set from DataStore as write transaction in this context.
        Specified by:
        getReadTransaction in interface TxFacade
        Returns:
        readOnlyTransaction - Don't forget to close it after finish reading
      • isTransactionsEnabled

        public boolean isTransactionsEnabled()
        Description copied from interface: TxFacade
        Method returns true if transaction chain manager is enabled.
        Specified by:
        isTransactionsEnabled in interface TxFacade
        Returns:
        is transaction chain manager enabled
      • writeToTransaction

        public <T extends org.opendaylight.yangtools.yang.binding.DataObject> void writeToTransaction​(org.opendaylight.mdsal.common.api.LogicalDatastoreType store,
                                                                                                      org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path,
                                                                                                      T data)
        Description copied from interface: TxFacade
        Method creates put operation using provided data in underlying transaction chain.
        Specified by:
        writeToTransaction in interface TxFacade
      • writeToTransactionWithParentsSlow

        public <T extends org.opendaylight.yangtools.yang.binding.DataObject> void writeToTransactionWithParentsSlow​(org.opendaylight.mdsal.common.api.LogicalDatastoreType store,
                                                                                                                     org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path,
                                                                                                                     T data)
        Description copied from interface: TxFacade
        Method creates put operation using provided data in underlying transaction chain and flag to create missing parents. WARNING: This method is slow because of additional reading cost. Use it only if you really need to create parents.
        Specified by:
        writeToTransactionWithParentsSlow in interface TxFacade
      • addDeleteToTxChain

        public <T extends org.opendaylight.yangtools.yang.binding.DataObject> void addDeleteToTxChain​(org.opendaylight.mdsal.common.api.LogicalDatastoreType store,
                                                                                                      org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)
        Description copied from interface: TxFacade
        Method creates delete operation for provided path in underlying transaction chain.
        Specified by:
        addDeleteToTxChain in interface TxFacade
      • submitTransaction

        public boolean submitTransaction()
        Description copied from interface: TxFacade
        Method submits Transaction to DataStore.
        Specified by:
        submitTransaction in interface TxFacade
        Returns:
        transaction is submitted successfully
      • syncSubmitTransaction

        public boolean syncSubmitTransaction()
        Description copied from interface: TxFacade
        Method submits Transaction to DataStore and wait till completes by doing get on tx future.
        Specified by:
        syncSubmitTransaction in interface TxFacade
        Returns:
        transaction is submitted successfully
      • isStatisticsPollingOn

        public boolean isStatisticsPollingOn()
        Description copied from interface: DeviceContext
        Checks if the statistics polling property is enabled.
        Specified by:
        isStatisticsPollingOn in interface DeviceContext
        Returns:
        true if statistics polling is enabled.
      • processAlienMessage

        public boolean processAlienMessage​(OfHeader message)
        Description copied from interface: DeviceReplyProcessor
        Method processes alien message from device.
        Specified by:
        processAlienMessage in interface DeviceReplyProcessor
        Parameters:
        message - alien message
        Returns:
        true if alien message was successfully processed
      • setNotificationPublishService

        public void setNotificationPublishService​(org.opendaylight.mdsal.binding.api.NotificationPublishService notificationPublishService)
        Description copied from interface: DeviceContext
        Sets notification publish service.
        Specified by:
        setNotificationPublishService in interface DeviceContext
        Parameters:
        notificationPublishService - the notification publish service
      • onPublished

        public void onPublished()
        Description copied from interface: DeviceContext
        Indicates that device context is fully published (e.g.: packetIn messages should be passed).
        Specified by:
        onPublished in interface DeviceContext
      • updatePacketInRateLimit

        public void updatePacketInRateLimit​(long upperBound)
        Description copied from interface: DeviceContext
        change packetIn rate limiter borders.
        Specified by:
        updatePacketInRateLimit in interface DeviceContext
        Parameters:
        upperBound - max amount of outstanding packetIns
      • closeServiceInstance

        public com.google.common.util.concurrent.ListenableFuture<?> closeServiceInstance()
        Specified by:
        closeServiceInstance in interface org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService
      • getIdentifier

        public @NonNull org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier getIdentifier()
        Specified by:
        getIdentifier in interface org.opendaylight.yangtools.concepts.Identifiable<org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier>
      • acquireWriteTransactionLock

        public void acquireWriteTransactionLock()
        Description copied from interface: TxFacade
        Method to acquire a write transaction lock to perform atomic transactions to MD-SAL.
        Specified by:
        acquireWriteTransactionLock in interface TxFacade
      • releaseWriteTransactionLock

        public void releaseWriteTransactionLock()
        Description copied from interface: TxFacade
        Method to release the acquired write transaction lock.
        Specified by:
        releaseWriteTransactionLock in interface TxFacade
      • canUseSingleLayerSerialization

        public boolean canUseSingleLayerSerialization()
        Description copied from interface: DeviceContext
        Checks if device and controller supports single layer serialization.
        Specified by:
        canUseSingleLayerSerialization in interface DeviceContext
        Returns:
        true if single layer serialization is supported
      • instantiateServiceInstance

        public void instantiateServiceInstance()
        Specified by:
        instantiateServiceInstance in interface org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService