Class ECFlowRuleStore

  • All Implemented Interfaces:
    org.onosproject.net.flow.FlowRuleStore, org.onosproject.store.Store<org.onosproject.net.flow.oldbatch.FlowRuleBatchEvent,​org.onosproject.net.flow.FlowRuleStoreDelegate>

    public class ECFlowRuleStore
    extends org.onosproject.store.AbstractStore<org.onosproject.net.flow.oldbatch.FlowRuleBatchEvent,​org.onosproject.net.flow.FlowRuleStoreDelegate>
    implements org.onosproject.net.flow.FlowRuleStore
    Manages inventory of flow rules using a distributed state management protocol.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static int backupCount
      Max number of backup copies for each device.
      protected org.onosproject.store.cluster.messaging.ClusterCommunicationService clusterCommunicator  
      protected org.onosproject.cluster.ClusterService clusterService  
      protected org.onosproject.cfg.ComponentConfigService configService  
      protected org.onosproject.core.CoreService coreService  
      protected org.onosproject.net.device.DeviceService deviceService  
      protected org.onosproject.mastership.MastershipService mastershipService  
      protected org.onosproject.store.service.AsyncConsistentMap<org.onosproject.net.DeviceId,​java.lang.Long> mastershipTermLifecycles  
      protected org.onosproject.persistence.PersistenceService persistenceService  
      protected ReplicaInfoService replicaInfoManager  
      protected org.onosproject.store.service.Serializer serializer  
      protected org.onlab.util.KryoNamespace.Builder serializerBuilder  
      protected org.onosproject.store.service.StorageService storageService  
      • Fields inherited from class org.onosproject.store.AbstractStore

        delegate
    • Constructor Summary

      Constructors 
      Constructor Description
      ECFlowRuleStore()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void activate​(org.osgi.service.component.ComponentContext context)  
      org.onosproject.net.flow.FlowRuleEvent addOrUpdateFlowRule​(org.onosproject.net.flow.FlowEntry rule)  
      void batchOperationComplete​(org.onosproject.net.flow.oldbatch.FlowRuleBatchEvent event)  
      void deactivate​(org.osgi.service.component.ComponentContext context)  
      void deleteFlowRule​(org.onosproject.net.flow.FlowRule rule)  
      long getActiveFlowRuleCount​(org.onosproject.net.DeviceId deviceId)  
      java.lang.Iterable<org.onosproject.net.flow.FlowEntry> getFlowEntries​(org.onosproject.net.DeviceId deviceId)  
      org.onosproject.net.flow.FlowEntry getFlowEntry​(org.onosproject.net.flow.FlowRule rule)  
      int getFlowRuleCount()  
      int getFlowRuleCount​(org.onosproject.net.DeviceId deviceId)  
      int getFlowRuleCount​(org.onosproject.net.DeviceId deviceId, org.onosproject.net.flow.FlowEntry.FlowEntryState state)  
      java.lang.Iterable<org.onosproject.net.flow.TableStatisticsEntry> getTableStatistics​(org.onosproject.net.DeviceId deviceId)  
      void modified​(org.osgi.service.component.ComponentContext context)  
      org.onosproject.net.flow.FlowRuleEvent pendingFlowRule​(org.onosproject.net.flow.FlowEntry rule)  
      void purgeFlowRule​(org.onosproject.net.DeviceId deviceId)  
      void purgeFlowRules()  
      org.onosproject.net.flow.FlowRuleEvent removeFlowRule​(org.onosproject.net.flow.FlowEntry rule)  
      void storeBatch​(org.onosproject.net.flow.oldbatch.FlowRuleBatchOperation operation)  
      void storeFlowRule​(org.onosproject.net.flow.FlowRule rule)  
      org.onosproject.net.flow.FlowRuleEvent updateTableStatistics​(org.onosproject.net.DeviceId deviceId, java.util.List<org.onosproject.net.flow.TableStatisticsEntry> tableStats)  
      • Methods inherited from class org.onosproject.store.AbstractStore

        hasDelegate, notifyDelegate, notifyDelegate, setDelegate, unsetDelegate
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.onosproject.store.Store

        hasDelegate, setDelegate, unsetDelegate
    • Field Detail

      • backupCount

        protected static volatile int backupCount
        Max number of backup copies for each device.
      • clusterCommunicator

        protected org.onosproject.store.cluster.messaging.ClusterCommunicationService clusterCommunicator
      • clusterService

        protected org.onosproject.cluster.ClusterService clusterService
      • deviceService

        protected org.onosproject.net.device.DeviceService deviceService
      • coreService

        protected org.onosproject.core.CoreService coreService
      • configService

        protected org.onosproject.cfg.ComponentConfigService configService
      • mastershipService

        protected org.onosproject.mastership.MastershipService mastershipService
      • persistenceService

        protected org.onosproject.persistence.PersistenceService persistenceService
      • storageService

        protected org.onosproject.store.service.StorageService storageService
      • serializer

        protected final org.onosproject.store.service.Serializer serializer
      • serializerBuilder

        protected final org.onlab.util.KryoNamespace.Builder serializerBuilder
      • mastershipTermLifecycles

        protected org.onosproject.store.service.AsyncConsistentMap<org.onosproject.net.DeviceId,​java.lang.Long> mastershipTermLifecycles
    • Constructor Detail

      • ECFlowRuleStore

        public ECFlowRuleStore()
    • Method Detail

      • activate

        public void activate​(org.osgi.service.component.ComponentContext context)
      • deactivate

        public void deactivate​(org.osgi.service.component.ComponentContext context)
      • modified

        public void modified​(org.osgi.service.component.ComponentContext context)
      • getFlowRuleCount

        public int getFlowRuleCount()
        Specified by:
        getFlowRuleCount in interface org.onosproject.net.flow.FlowRuleStore
      • getFlowRuleCount

        public int getFlowRuleCount​(org.onosproject.net.DeviceId deviceId)
        Specified by:
        getFlowRuleCount in interface org.onosproject.net.flow.FlowRuleStore
      • getFlowRuleCount

        public int getFlowRuleCount​(org.onosproject.net.DeviceId deviceId,
                                    org.onosproject.net.flow.FlowEntry.FlowEntryState state)
        Specified by:
        getFlowRuleCount in interface org.onosproject.net.flow.FlowRuleStore
      • getFlowEntry

        public org.onosproject.net.flow.FlowEntry getFlowEntry​(org.onosproject.net.flow.FlowRule rule)
        Specified by:
        getFlowEntry in interface org.onosproject.net.flow.FlowRuleStore
      • getFlowEntries

        public java.lang.Iterable<org.onosproject.net.flow.FlowEntry> getFlowEntries​(org.onosproject.net.DeviceId deviceId)
        Specified by:
        getFlowEntries in interface org.onosproject.net.flow.FlowRuleStore
      • storeFlowRule

        public void storeFlowRule​(org.onosproject.net.flow.FlowRule rule)
        Specified by:
        storeFlowRule in interface org.onosproject.net.flow.FlowRuleStore
      • storeBatch

        public void storeBatch​(org.onosproject.net.flow.oldbatch.FlowRuleBatchOperation operation)
        Specified by:
        storeBatch in interface org.onosproject.net.flow.FlowRuleStore
      • deleteFlowRule

        public void deleteFlowRule​(org.onosproject.net.flow.FlowRule rule)
        Specified by:
        deleteFlowRule in interface org.onosproject.net.flow.FlowRuleStore
      • pendingFlowRule

        public org.onosproject.net.flow.FlowRuleEvent pendingFlowRule​(org.onosproject.net.flow.FlowEntry rule)
        Specified by:
        pendingFlowRule in interface org.onosproject.net.flow.FlowRuleStore
      • addOrUpdateFlowRule

        public org.onosproject.net.flow.FlowRuleEvent addOrUpdateFlowRule​(org.onosproject.net.flow.FlowEntry rule)
        Specified by:
        addOrUpdateFlowRule in interface org.onosproject.net.flow.FlowRuleStore
      • removeFlowRule

        public org.onosproject.net.flow.FlowRuleEvent removeFlowRule​(org.onosproject.net.flow.FlowEntry rule)
        Specified by:
        removeFlowRule in interface org.onosproject.net.flow.FlowRuleStore
      • purgeFlowRule

        public void purgeFlowRule​(org.onosproject.net.DeviceId deviceId)
        Specified by:
        purgeFlowRule in interface org.onosproject.net.flow.FlowRuleStore
      • purgeFlowRules

        public void purgeFlowRules()
        Specified by:
        purgeFlowRules in interface org.onosproject.net.flow.FlowRuleStore
      • batchOperationComplete

        public void batchOperationComplete​(org.onosproject.net.flow.oldbatch.FlowRuleBatchEvent event)
        Specified by:
        batchOperationComplete in interface org.onosproject.net.flow.FlowRuleStore
      • updateTableStatistics

        public org.onosproject.net.flow.FlowRuleEvent updateTableStatistics​(org.onosproject.net.DeviceId deviceId,
                                                                            java.util.List<org.onosproject.net.flow.TableStatisticsEntry> tableStats)
        Specified by:
        updateTableStatistics in interface org.onosproject.net.flow.FlowRuleStore
      • getTableStatistics

        public java.lang.Iterable<org.onosproject.net.flow.TableStatisticsEntry> getTableStatistics​(org.onosproject.net.DeviceId deviceId)
        Specified by:
        getTableStatistics in interface org.onosproject.net.flow.FlowRuleStore
      • getActiveFlowRuleCount

        public long getActiveFlowRuleCount​(org.onosproject.net.DeviceId deviceId)
        Specified by:
        getActiveFlowRuleCount in interface org.onosproject.net.flow.FlowRuleStore