Package org.onosproject.store.flow.impl
Class ECFlowRuleStore
- java.lang.Object
-
- org.onosproject.store.AbstractStore<org.onosproject.net.flow.oldbatch.FlowRuleBatchEvent,org.onosproject.net.flow.FlowRuleStoreDelegate>
-
- org.onosproject.store.flow.impl.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.FlowRuleStoreManages inventory of flow rules using a distributed state management protocol.
-
-
Field Summary
Fields Modifier and Type Field Description protected static intbackupCountMax number of backup copies for each device.protected org.onosproject.store.cluster.messaging.ClusterCommunicationServiceclusterCommunicatorprotected org.onosproject.cluster.ClusterServiceclusterServiceprotected org.onosproject.cfg.ComponentConfigServiceconfigServiceprotected org.onosproject.core.CoreServicecoreServiceprotected org.onosproject.net.device.DeviceServicedeviceServiceprotected org.onosproject.mastership.MastershipServicemastershipServiceprotected org.onosproject.store.service.AsyncConsistentMap<org.onosproject.net.DeviceId,java.lang.Long>mastershipTermLifecyclesprotected org.onosproject.persistence.PersistenceServicepersistenceServiceprotected ReplicaInfoServicereplicaInfoManagerprotected org.onosproject.store.service.Serializerserializerprotected org.onlab.util.KryoNamespace.BuilderserializerBuilderprotected org.onosproject.store.service.StorageServicestorageService
-
Constructor Summary
Constructors Constructor Description ECFlowRuleStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate(org.osgi.service.component.ComponentContext context)org.onosproject.net.flow.FlowRuleEventaddOrUpdateFlowRule(org.onosproject.net.flow.FlowEntry rule)voidbatchOperationComplete(org.onosproject.net.flow.oldbatch.FlowRuleBatchEvent event)voiddeactivate(org.osgi.service.component.ComponentContext context)voiddeleteFlowRule(org.onosproject.net.flow.FlowRule rule)longgetActiveFlowRuleCount(org.onosproject.net.DeviceId deviceId)java.lang.Iterable<org.onosproject.net.flow.FlowEntry>getFlowEntries(org.onosproject.net.DeviceId deviceId)org.onosproject.net.flow.FlowEntrygetFlowEntry(org.onosproject.net.flow.FlowRule rule)intgetFlowRuleCount()intgetFlowRuleCount(org.onosproject.net.DeviceId deviceId)intgetFlowRuleCount(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)voidmodified(org.osgi.service.component.ComponentContext context)org.onosproject.net.flow.FlowRuleEventpendingFlowRule(org.onosproject.net.flow.FlowEntry rule)voidpurgeFlowRule(org.onosproject.net.DeviceId deviceId)voidpurgeFlowRules()org.onosproject.net.flow.FlowRuleEventremoveFlowRule(org.onosproject.net.flow.FlowEntry rule)voidstoreBatch(org.onosproject.net.flow.oldbatch.FlowRuleBatchOperation operation)voidstoreFlowRule(org.onosproject.net.flow.FlowRule rule)org.onosproject.net.flow.FlowRuleEventupdateTableStatistics(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
-
-
-
-
Field Detail
-
backupCount
protected static volatile int backupCount
Max number of backup copies for each device.
-
replicaInfoManager
protected ReplicaInfoService replicaInfoManager
-
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
-
-
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:
getFlowRuleCountin interfaceorg.onosproject.net.flow.FlowRuleStore
-
getFlowRuleCount
public int getFlowRuleCount(org.onosproject.net.DeviceId deviceId)
- Specified by:
getFlowRuleCountin interfaceorg.onosproject.net.flow.FlowRuleStore
-
getFlowRuleCount
public int getFlowRuleCount(org.onosproject.net.DeviceId deviceId, org.onosproject.net.flow.FlowEntry.FlowEntryState state)- Specified by:
getFlowRuleCountin interfaceorg.onosproject.net.flow.FlowRuleStore
-
getFlowEntry
public org.onosproject.net.flow.FlowEntry getFlowEntry(org.onosproject.net.flow.FlowRule rule)
- Specified by:
getFlowEntryin interfaceorg.onosproject.net.flow.FlowRuleStore
-
getFlowEntries
public java.lang.Iterable<org.onosproject.net.flow.FlowEntry> getFlowEntries(org.onosproject.net.DeviceId deviceId)
- Specified by:
getFlowEntriesin interfaceorg.onosproject.net.flow.FlowRuleStore
-
storeFlowRule
public void storeFlowRule(org.onosproject.net.flow.FlowRule rule)
- Specified by:
storeFlowRulein interfaceorg.onosproject.net.flow.FlowRuleStore
-
storeBatch
public void storeBatch(org.onosproject.net.flow.oldbatch.FlowRuleBatchOperation operation)
- Specified by:
storeBatchin interfaceorg.onosproject.net.flow.FlowRuleStore
-
deleteFlowRule
public void deleteFlowRule(org.onosproject.net.flow.FlowRule rule)
- Specified by:
deleteFlowRulein interfaceorg.onosproject.net.flow.FlowRuleStore
-
pendingFlowRule
public org.onosproject.net.flow.FlowRuleEvent pendingFlowRule(org.onosproject.net.flow.FlowEntry rule)
- Specified by:
pendingFlowRulein interfaceorg.onosproject.net.flow.FlowRuleStore
-
addOrUpdateFlowRule
public org.onosproject.net.flow.FlowRuleEvent addOrUpdateFlowRule(org.onosproject.net.flow.FlowEntry rule)
- Specified by:
addOrUpdateFlowRulein interfaceorg.onosproject.net.flow.FlowRuleStore
-
removeFlowRule
public org.onosproject.net.flow.FlowRuleEvent removeFlowRule(org.onosproject.net.flow.FlowEntry rule)
- Specified by:
removeFlowRulein interfaceorg.onosproject.net.flow.FlowRuleStore
-
purgeFlowRule
public void purgeFlowRule(org.onosproject.net.DeviceId deviceId)
- Specified by:
purgeFlowRulein interfaceorg.onosproject.net.flow.FlowRuleStore
-
purgeFlowRules
public void purgeFlowRules()
- Specified by:
purgeFlowRulesin interfaceorg.onosproject.net.flow.FlowRuleStore
-
batchOperationComplete
public void batchOperationComplete(org.onosproject.net.flow.oldbatch.FlowRuleBatchEvent event)
- Specified by:
batchOperationCompletein interfaceorg.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:
updateTableStatisticsin interfaceorg.onosproject.net.flow.FlowRuleStore
-
getTableStatistics
public java.lang.Iterable<org.onosproject.net.flow.TableStatisticsEntry> getTableStatistics(org.onosproject.net.DeviceId deviceId)
- Specified by:
getTableStatisticsin interfaceorg.onosproject.net.flow.FlowRuleStore
-
getActiveFlowRuleCount
public long getActiveFlowRuleCount(org.onosproject.net.DeviceId deviceId)
- Specified by:
getActiveFlowRuleCountin interfaceorg.onosproject.net.flow.FlowRuleStore
-
-