Package org.onosproject.net.flow
Interface FlowRuleStore
- 
- All Superinterfaces:
- Store<FlowRuleBatchEvent,FlowRuleStoreDelegate>
 
 public interface FlowRuleStore extends Store<FlowRuleBatchEvent,FlowRuleStoreDelegate> Manages inventory of flow rules; not intended for direct use.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description FlowRuleEventaddOrUpdateFlowRule(FlowEntry rule)Stores a new flow rule, or updates an existing entry.voidbatchOperationComplete(FlowRuleBatchEvent event)Invoked on the completion of a storeBatch operation.voiddeleteFlowRule(FlowRule rule)Marks a flow rule for deletion.longgetActiveFlowRuleCount(DeviceId deviceId)Deprecated.since 2.1Iterable<FlowEntry>getFlowEntries(DeviceId deviceId)Returns the flow entries associated with a device.FlowEntrygetFlowEntry(FlowRule rule)Returns the stored flow.intgetFlowRuleCount()Returns the number of flow rules in the store.default intgetFlowRuleCount(DeviceId deviceId)Returns the number of flow rules for the given device in the store.default intgetFlowRuleCount(DeviceId deviceId, FlowEntry.FlowEntryState state)Returns the number of flow rules in the given state for the given device.Iterable<TableStatisticsEntry>getTableStatistics(DeviceId deviceId)Returns the flow table statistics associated with a device.FlowRuleEventpendingFlowRule(FlowEntry rule)Marks a flow rule as PENDING_ADD during retry.default voidpurgeFlowRule(DeviceId deviceId)Removes all flow entries of given device from store.voidpurgeFlowRules()Removes all flow entries from store.FlowRuleEventremoveFlowRule(FlowEntry rule)voidstoreBatch(FlowRuleBatchOperation batchOperation)Stores a batch of flow rules.voidstoreFlowRule(FlowRule rule)Deprecated.in Cardinal ReleaseFlowRuleEventupdateTableStatistics(DeviceId deviceId, List<TableStatisticsEntry> tableStats)Updates the flow table statistics of the specified device using the given statistics.- 
Methods inherited from interface org.onosproject.store.StorehasDelegate, setDelegate, unsetDelegate
 
- 
 
- 
- 
- 
Method Detail- 
getFlowRuleCountint getFlowRuleCount() Returns the number of flow rules in the store.- Returns:
- number of flow rules
 
 - 
getFlowRuleCountdefault int getFlowRuleCount(DeviceId deviceId) Returns the number of flow rules for the given device in the store.- Parameters:
- deviceId- device identifier
- Returns:
- number of flow rules for the given device
 
 - 
getFlowRuleCountdefault int getFlowRuleCount(DeviceId deviceId, FlowEntry.FlowEntryState state) Returns the number of flow rules in the given state for the given device.- Parameters:
- deviceId- the device identifier
- state- the state for which to count flow rules
- Returns:
- number of flow rules in the given state for the given device
 
 - 
getFlowEntryFlowEntry getFlowEntry(FlowRule rule) Returns the stored flow.- Parameters:
- rule- the rule to look for
- Returns:
- a flow rule
 
 - 
getFlowEntriesIterable<FlowEntry> getFlowEntries(DeviceId deviceId) Returns the flow entries associated with a device.- Parameters:
- deviceId- the device ID
- Returns:
- the flow entries
 
 - 
storeFlowRule@Deprecated void storeFlowRule(FlowRule rule) Deprecated.in Cardinal Release// TODO: Better description of method behavior. Stores a new flow rule without generating events.- Parameters:
- rule- the flow rule to add
 
 - 
storeBatchvoid storeBatch(FlowRuleBatchOperation batchOperation) Stores a batch of flow rules.- Parameters:
- batchOperation- batch of flow rules. A batch can contain flow rules for a single device only.
 
 - 
batchOperationCompletevoid batchOperationComplete(FlowRuleBatchEvent event) Invoked on the completion of a storeBatch operation.- Parameters:
- event- flow rule batch event
 
 - 
deleteFlowRulevoid deleteFlowRule(FlowRule rule) Marks a flow rule for deletion. Actual deletion will occur when the provider indicates that the flow has been removed.- Parameters:
- rule- the flow rule to delete
 
 - 
addOrUpdateFlowRuleFlowRuleEvent addOrUpdateFlowRule(FlowEntry rule) Stores a new flow rule, or updates an existing entry.- Parameters:
- rule- the flow rule to add or update
- Returns:
- flow_added event, or null if just an update
 
 - 
removeFlowRuleFlowRuleEvent removeFlowRule(FlowEntry rule) - Parameters:
- rule- the flow entry to remove
- Returns:
- flow_removed event, or null if nothing removed
 
 - 
pendingFlowRuleFlowRuleEvent pendingFlowRule(FlowEntry rule) Marks a flow rule as PENDING_ADD during retry. Emits flow_update event if the state is changed- Parameters:
- rule- the flow rule that is retrying
- Returns:
- flow_updated event, or null if nothing updated
 
 - 
purgeFlowRuledefault void purgeFlowRule(DeviceId deviceId) Removes all flow entries of given device from store.- Parameters:
- deviceId- device id
 
 - 
purgeFlowRulesvoid purgeFlowRules() Removes all flow entries from store.
 - 
updateTableStatisticsFlowRuleEvent updateTableStatistics(DeviceId deviceId, List<TableStatisticsEntry> tableStats) Updates the flow table statistics of the specified device using the given statistics.- Parameters:
- deviceId- device identifier
- tableStats- list of table statistics
- Returns:
- ready to send event describing what occurred;
 
 - 
getTableStatisticsIterable<TableStatisticsEntry> getTableStatistics(DeviceId deviceId) Returns the flow table statistics associated with a device.- Parameters:
- deviceId- the device ID
- Returns:
- the flow table statistics
 
 - 
getActiveFlowRuleCount@Deprecated long getActiveFlowRuleCount(DeviceId deviceId) Deprecated.since 2.1Returns number of flow rules in ADDED state for specified device.- Parameters:
- deviceId- the device ID
- Returns:
- number of flow rules in ADDED state
 
 
- 
 
-