public interface FlowRuleService extends ListenerService<FlowRuleEvent,FlowRuleListener>
Modifier and Type | Field and Description |
---|---|
static String |
FLOW_OP_TOPIC
The topic used for obtaining globally unique ids.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(FlowRuleOperations ops)
Applies a batch operation of FlowRules.
|
void |
applyFlowRules(FlowRule... flowRules)
Applies the specified flow rules onto their respective devices.
|
default long |
getActiveFlowRuleCount(DeviceId deviceId)
Returns number of flow rules in ADDED state for specified device.
|
Iterable<FlowEntry> |
getFlowEntries(DeviceId deviceId)
Returns the collection of flow entries applied on the specified device.
|
Iterable<FlowEntry> |
getFlowEntriesById(ApplicationId id)
Returns a list of rules with this application ID.
|
default Iterable<FlowEntry> |
getFlowEntriesByLiveType(DeviceId deviceId,
FlowEntry.FlowLiveType liveType)
Returns a list of rules filtered by device id and flow live type.
|
default Iterable<FlowEntry> |
getFlowEntriesByState(DeviceId deviceId,
FlowEntry.FlowEntryState flowState)
Returns a list of rules filtered by device id and flow state.
|
int |
getFlowRuleCount()
Returns the number of flow rules in the system.
|
default int |
getFlowRuleCount(DeviceId deviceId)
Returns the number of flow rules for the given device.
|
Iterable<FlowRule> |
getFlowRulesByGroupId(ApplicationId appId,
short groupId)
Returns a list of rules filtered by application and group id.
|
Iterable<FlowRule> |
getFlowRulesById(ApplicationId id)
Deprecated.
|
Iterable<TableStatisticsEntry> |
getFlowTableStatistics(DeviceId deviceId)
Returns the collection of flow table statistics of the specified device.
|
void |
purgeFlowRules(DeviceId deviceId)
Purges all the flow rules on the specified device.
|
void |
removeFlowRules(FlowRule... flowRules)
Removes the specified flow rules from their respective devices.
|
void |
removeFlowRulesById(ApplicationId appId)
Removes all rules submitted by a particular application.
|
addListener, removeListener
static final String FLOW_OP_TOPIC
int getFlowRuleCount()
default int getFlowRuleCount(DeviceId deviceId)
deviceId
- device identifierIterable<FlowEntry> getFlowEntries(DeviceId deviceId)
deviceId
- device identifierdefault Iterable<FlowEntry> getFlowEntriesByLiveType(DeviceId deviceId, FlowEntry.FlowLiveType liveType)
deviceId
- the device id to lookupliveType
- the flow live type to lookupdefault Iterable<FlowEntry> getFlowEntriesByState(DeviceId deviceId, FlowEntry.FlowEntryState flowState)
deviceId
- the device id to lookupflowState
- the flow state to lookupvoid applyFlowRules(FlowRule... flowRules)
flowRules
- one or more flow rulesvoid purgeFlowRules(DeviceId deviceId)
deviceId
- device identifiervoid removeFlowRules(FlowRule... flowRules)
flowRules
- one or more flow rulesvoid removeFlowRulesById(ApplicationId appId)
appId
- ID of application whose flows will be removed@Deprecated Iterable<FlowRule> getFlowRulesById(ApplicationId id)
id
- the application ID to look upIterable<FlowEntry> getFlowEntriesById(ApplicationId id)
id
- the application ID to look upIterable<FlowRule> getFlowRulesByGroupId(ApplicationId appId, short groupId)
Note that the group concept here is simply a logical grouping of flows.
This is not the same as a group in the
GroupService
, and this method will not
return flows that are mapped to a particular Group
.
appId
- the application ID to look upgroupId
- the group ID to look upvoid apply(FlowRuleOperations ops)
ops
- batch operation to applyIterable<TableStatisticsEntry> getFlowTableStatistics(DeviceId deviceId)
deviceId
- device identifierdefault long getActiveFlowRuleCount(DeviceId deviceId)
deviceId
- device identifier