@Service public class DistributedVirtualFlowRuleStore extends AbstractVirtualStore<org.onosproject.net.flow.oldbatch.FlowRuleBatchEvent,org.onosproject.net.flow.FlowRuleStoreDelegate> implements VirtualNetworkFlowRuleStore
| Modifier and Type | Class and Description |
|---|---|
class |
DistributedVirtualFlowRuleStore.MastershipBasedTimestamp |
| Modifier and Type | Field and Description |
|---|---|
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.store.service.Serializer |
serializer |
protected org.onlab.util.KryoNamespace.Builder |
serializerBuilder |
protected org.onosproject.store.service.StorageService |
storageService |
protected VirtualNetworkService |
vnaService |
delegateMap| Constructor and Description |
|---|
DistributedVirtualFlowRuleStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(org.osgi.service.component.ComponentContext context) |
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.oldbatch.FlowRuleBatchEvent event)
Invoked on the completion of a storeBatch operation.
|
void |
deactivate(org.osgi.service.component.ComponentContext context) |
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 |
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.oldbatch.FlowRuleBatchOperation operation)
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, waitpurgeFlowRulehasDelegate, setDelegate, unsetDelegate@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.core.CoreService coreService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.cluster.ClusterService clusterService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.store.cluster.messaging.ClusterCommunicationService clusterCommunicator
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.cfg.ComponentConfigService configService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.store.service.StorageService storageService
@Reference(cardinality=MANDATORY_UNARY) protected VirtualNetworkService vnaService
protected final org.onosproject.store.service.Serializer serializer
protected final org.onlab.util.KryoNamespace.Builder serializerBuilder
@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)
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.oldbatch.FlowRuleBatchOperation operation)
VirtualNetworkFlowRuleStorestoreBatch in interface VirtualNetworkFlowRuleStorenetworkId - virtual network identifieroperation - batch of flow rules.
A batch can contain flow rules for a single device only.public void batchOperationComplete(NetworkId networkId, org.onosproject.net.flow.oldbatch.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 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