@Service public class SimpleVirtualFlowRuleStore extends AbstractVirtualStore<org.onosproject.net.flow.FlowRuleBatchEvent,org.onosproject.net.flow.FlowRuleStoreDelegate> implements VirtualNetworkFlowRuleStore
| Modifier and Type | Field and Description |
|---|---|
protected org.onosproject.store.service.StorageService |
storageService |
delegateMap| Constructor and Description |
|---|
SimpleVirtualFlowRuleStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
org.onosproject.net.flow.FlowRuleEvent |
addOrUpdateFlowRule(NetworkId networkId,
org.onosproject.net.flow.FlowEntry rule)
Stores a new flow rule, or updates an existing entry.
|
void |
batchOperationComplete(NetworkId networkId,
org.onosproject.net.flow.FlowRuleBatchEvent event)
Invoked on the completion of a storeBatch operation.
|
void |
deactivate() |
void |
deleteFlowRule(NetworkId networkId,
org.onosproject.net.flow.FlowRule rule)
Marks a flow rule for deletion.
|
java.lang.Iterable<org.onosproject.net.flow.FlowEntry> |
getFlowEntries(NetworkId networkId,
org.onosproject.net.DeviceId deviceId)
Returns the flow entries associated with a device.
|
org.onosproject.net.flow.FlowEntry |
getFlowEntry(NetworkId networkId,
org.onosproject.net.flow.FlowRule rule)
Returns the stored flow.
|
int |
getFlowRuleCount(NetworkId networkId)
Returns the number of flow rule in the store.
|
java.lang.Iterable<org.onosproject.net.flow.TableStatisticsEntry> |
getTableStatistics(NetworkId networkId,
org.onosproject.net.DeviceId deviceId)
Returns the flow table statistics associated with a device.
|
void |
modified(org.osgi.service.component.ComponentContext context) |
org.onosproject.net.flow.FlowRuleEvent |
pendingFlowRule(NetworkId networkId,
org.onosproject.net.flow.FlowEntry rule)
Marks a flow rule as PENDING_ADD during retry.
|
void |
purgeFlowRule(NetworkId networkId,
org.onosproject.net.DeviceId deviceId)
Removes all flow entries of given device from store.
|
void |
purgeFlowRules(NetworkId networkId)
Removes all flow entries from store.
|
org.onosproject.net.flow.FlowRuleEvent |
removeFlowRule(NetworkId networkId,
org.onosproject.net.flow.FlowEntry rule)
Removes an existing flow entry.
|
void |
storeBatch(NetworkId networkId,
org.onosproject.net.flow.FlowRuleBatchOperation batchOperation)
Stores a batch of flow rules.
|
org.onosproject.net.flow.FlowRuleEvent |
updateTableStatistics(NetworkId networkId,
org.onosproject.net.DeviceId deviceId,
java.util.List<org.onosproject.net.flow.TableStatisticsEntry> tableStats)
Updates the flow table statistics of the specified device using
the given statistics.
|
hasDelegate, notifyDelegate, notifyDelegate, setDelegate, unsetDelegateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasDelegate, setDelegate, unsetDelegate@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.store.service.StorageService storageService
@Activate public void activate()
@Deactivate public void deactivate()
@Modified public void modified(org.osgi.service.component.ComponentContext context)
public int getFlowRuleCount(NetworkId networkId)
VirtualNetworkFlowRuleStoregetFlowRuleCount in interface VirtualNetworkFlowRuleStorenetworkId - virtual network identifierpublic org.onosproject.net.flow.FlowEntry getFlowEntry(NetworkId networkId, org.onosproject.net.flow.FlowRule rule)
VirtualNetworkFlowRuleStoregetFlowEntry in interface VirtualNetworkFlowRuleStorenetworkId - virtual network identifierrule - the rule to look forpublic java.lang.Iterable<org.onosproject.net.flow.FlowEntry> getFlowEntries(NetworkId networkId, org.onosproject.net.DeviceId deviceId)
VirtualNetworkFlowRuleStoregetFlowEntries in interface VirtualNetworkFlowRuleStorenetworkId - virtual network identifierdeviceId - the device IDpublic void storeBatch(NetworkId networkId, org.onosproject.net.flow.FlowRuleBatchOperation batchOperation)
VirtualNetworkFlowRuleStorestoreBatch in interface VirtualNetworkFlowRuleStorenetworkId - virtual network identifierbatchOperation - batch of flow rules.
A batch can contain flow rules for a single device only.public void batchOperationComplete(NetworkId networkId, org.onosproject.net.flow.FlowRuleBatchEvent event)
VirtualNetworkFlowRuleStorebatchOperationComplete in interface VirtualNetworkFlowRuleStorenetworkId - virtual network identifierevent - flow rule batch eventpublic void deleteFlowRule(NetworkId networkId, org.onosproject.net.flow.FlowRule rule)
VirtualNetworkFlowRuleStoredeleteFlowRule in interface VirtualNetworkFlowRuleStorenetworkId - virtual network identifierrule - the flow rule to deletepublic org.onosproject.net.flow.FlowRuleEvent addOrUpdateFlowRule(NetworkId networkId, org.onosproject.net.flow.FlowEntry rule)
VirtualNetworkFlowRuleStoreaddOrUpdateFlowRule in interface VirtualNetworkFlowRuleStorenetworkId - virtual network identifierrule - the flow rule to add or updatepublic org.onosproject.net.flow.FlowRuleEvent removeFlowRule(NetworkId networkId, org.onosproject.net.flow.FlowEntry rule)
VirtualNetworkFlowRuleStoreremoveFlowRule in interface VirtualNetworkFlowRuleStorenetworkId - virtual network identifierrule - the flow entry to removepublic org.onosproject.net.flow.FlowRuleEvent pendingFlowRule(NetworkId networkId, org.onosproject.net.flow.FlowEntry rule)
VirtualNetworkFlowRuleStorependingFlowRule in interface VirtualNetworkFlowRuleStorenetworkId - virtual network identifierrule - the flow rule that is retryingpublic void purgeFlowRule(NetworkId networkId, org.onosproject.net.DeviceId deviceId)
VirtualNetworkFlowRuleStorepurgeFlowRule in interface VirtualNetworkFlowRuleStorenetworkId - virtual network identifierdeviceId - device idpublic void purgeFlowRules(NetworkId networkId)
VirtualNetworkFlowRuleStorepurgeFlowRules in interface VirtualNetworkFlowRuleStorenetworkId - virtual network identifierpublic org.onosproject.net.flow.FlowRuleEvent updateTableStatistics(NetworkId networkId, org.onosproject.net.DeviceId deviceId, java.util.List<org.onosproject.net.flow.TableStatisticsEntry> tableStats)
VirtualNetworkFlowRuleStoreupdateTableStatistics in interface VirtualNetworkFlowRuleStorenetworkId - virtual network identifierdeviceId - device identifiertableStats - list of table statisticspublic java.lang.Iterable<org.onosproject.net.flow.TableStatisticsEntry> getTableStatistics(NetworkId networkId, org.onosproject.net.DeviceId deviceId)
VirtualNetworkFlowRuleStoregetTableStatistics in interface VirtualNetworkFlowRuleStorenetworkId - virtual network identifierdeviceId - the device ID