Class DistributedMeterStore

  • All Implemented Interfaces:
    org.onosproject.net.meter.MeterStore, org.onosproject.store.Store<org.onosproject.net.meter.MeterEvent,​org.onosproject.net.meter.MeterStoreDelegate>

    public class DistributedMeterStore
    extends org.onosproject.store.AbstractStore<org.onosproject.net.meter.MeterEvent,​org.onosproject.net.meter.MeterStoreDelegate>
    implements org.onosproject.net.meter.MeterStore
    A distributed meter store implementation. Meters are stored consistently across the cluster.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.onosproject.net.driver.DriverService driverService  
      • Fields inherited from class org.onosproject.store.AbstractStore

        delegate
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void activate()  
      org.onosproject.net.meter.MeterId allocateMeterId​(org.onosproject.net.DeviceId deviceId)  
      void deactivate()  
      java.util.concurrent.CompletableFuture<org.onosproject.net.meter.MeterStoreResult> deleteMeter​(org.onosproject.net.meter.Meter meter)  
      org.onosproject.net.meter.MeterStoreResult deleteMeterFeatures​(org.onosproject.net.DeviceId deviceId)  
      void deleteMeterNow​(org.onosproject.net.meter.Meter m)  
      void failedMeter​(org.onosproject.net.meter.MeterOperation op, org.onosproject.net.meter.MeterFailReason reason)  
      void freeMeterId​(org.onosproject.net.DeviceId deviceId, org.onosproject.net.meter.MeterId meterId)  
      java.util.Collection<org.onosproject.net.meter.Meter> getAllMeters()  
      java.util.Collection<org.onosproject.net.meter.Meter> getAllMeters​(org.onosproject.net.DeviceId deviceId)  
      long getMaxMeters​(org.onosproject.net.meter.MeterFeaturesKey key)  
      org.onosproject.net.meter.Meter getMeter​(org.onosproject.net.meter.MeterKey key)  
      void purgeMeter​(org.onosproject.net.DeviceId deviceId)  
      java.util.concurrent.CompletableFuture<org.onosproject.net.meter.MeterStoreResult> storeMeter​(org.onosproject.net.meter.Meter meter)  
      org.onosproject.net.meter.MeterStoreResult storeMeterFeatures​(org.onosproject.net.meter.MeterFeatures meterfeatures)  
      java.util.concurrent.CompletableFuture<org.onosproject.net.meter.MeterStoreResult> updateMeter​(org.onosproject.net.meter.Meter meter)  
      org.onosproject.net.meter.Meter updateMeterState​(org.onosproject.net.meter.Meter meter)  
      • 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

      • driverService

        protected org.onosproject.net.driver.DriverService driverService
    • Constructor Detail

      • DistributedMeterStore

        public DistributedMeterStore()
    • Method Detail

      • activate

        public void activate()
      • deactivate

        public void deactivate()
      • storeMeter

        public java.util.concurrent.CompletableFuture<org.onosproject.net.meter.MeterStoreResult> storeMeter​(org.onosproject.net.meter.Meter meter)
        Specified by:
        storeMeter in interface org.onosproject.net.meter.MeterStore
      • deleteMeter

        public java.util.concurrent.CompletableFuture<org.onosproject.net.meter.MeterStoreResult> deleteMeter​(org.onosproject.net.meter.Meter meter)
        Specified by:
        deleteMeter in interface org.onosproject.net.meter.MeterStore
      • storeMeterFeatures

        public org.onosproject.net.meter.MeterStoreResult storeMeterFeatures​(org.onosproject.net.meter.MeterFeatures meterfeatures)
        Specified by:
        storeMeterFeatures in interface org.onosproject.net.meter.MeterStore
      • deleteMeterFeatures

        public org.onosproject.net.meter.MeterStoreResult deleteMeterFeatures​(org.onosproject.net.DeviceId deviceId)
        Specified by:
        deleteMeterFeatures in interface org.onosproject.net.meter.MeterStore
      • updateMeter

        public java.util.concurrent.CompletableFuture<org.onosproject.net.meter.MeterStoreResult> updateMeter​(org.onosproject.net.meter.Meter meter)
        Specified by:
        updateMeter in interface org.onosproject.net.meter.MeterStore
      • updateMeterState

        public org.onosproject.net.meter.Meter updateMeterState​(org.onosproject.net.meter.Meter meter)
        Specified by:
        updateMeterState in interface org.onosproject.net.meter.MeterStore
      • getMeter

        public org.onosproject.net.meter.Meter getMeter​(org.onosproject.net.meter.MeterKey key)
        Specified by:
        getMeter in interface org.onosproject.net.meter.MeterStore
      • getAllMeters

        public java.util.Collection<org.onosproject.net.meter.Meter> getAllMeters()
        Specified by:
        getAllMeters in interface org.onosproject.net.meter.MeterStore
      • getAllMeters

        public java.util.Collection<org.onosproject.net.meter.Meter> getAllMeters​(org.onosproject.net.DeviceId deviceId)
        Specified by:
        getAllMeters in interface org.onosproject.net.meter.MeterStore
      • failedMeter

        public void failedMeter​(org.onosproject.net.meter.MeterOperation op,
                                org.onosproject.net.meter.MeterFailReason reason)
        Specified by:
        failedMeter in interface org.onosproject.net.meter.MeterStore
      • deleteMeterNow

        public void deleteMeterNow​(org.onosproject.net.meter.Meter m)
        Specified by:
        deleteMeterNow in interface org.onosproject.net.meter.MeterStore
      • purgeMeter

        public void purgeMeter​(org.onosproject.net.DeviceId deviceId)
        Specified by:
        purgeMeter in interface org.onosproject.net.meter.MeterStore
      • getMaxMeters

        public long getMaxMeters​(org.onosproject.net.meter.MeterFeaturesKey key)
        Specified by:
        getMaxMeters in interface org.onosproject.net.meter.MeterStore
      • allocateMeterId

        public org.onosproject.net.meter.MeterId allocateMeterId​(org.onosproject.net.DeviceId deviceId)
        Specified by:
        allocateMeterId in interface org.onosproject.net.meter.MeterStore
      • freeMeterId

        public void freeMeterId​(org.onosproject.net.DeviceId deviceId,
                                org.onosproject.net.meter.MeterId meterId)
        Specified by:
        freeMeterId in interface org.onosproject.net.meter.MeterStore