Open Kilda Java Documentation
org.openkilda.pce.cache.FlowCache Class Reference
Inheritance diagram for org.openkilda.pce.cache.FlowCache:
org.openkilda.pce.cache.Cache

Public Member Functions

void load (Set< ImmutablePair< Flow, Flow >> flows)
 
void clear ()
 
ImmutablePair< Flow, FlowputFlow (ImmutablePair< Flow, Flow > flow)
 
ImmutablePair< Flow, FlowremoveFlow (String flowId)
 
void pushFlow (ImmutablePair< Flow, Flow > flow)
 
boolean cacheContainsFlow (String flowId)
 
Set< ImmutablePair< Flow, Flow > > getActiveFlowsWithAffectedPath (SwitchId switchId)
 
Set< ImmutablePair< Flow, Flow > > getActiveFlowsWithAffectedPath (IslInfoData islData)
 
Set< ImmutablePair< Flow, Flow > > getActiveFlowsWithAffectedPath (PortInfoData portData)
 
Set< ImmutablePair< Flow, Flow > > getFlowsWithAffectedPath (SwitchId switchId)
 
Set< ImmutablePair< Flow, Flow > > getFlowsWithAffectedPath (IslInfoData islData)
 
Set< ImmutablePair< Flow, Flow > > getFlowsWithAffectedPath (PortInfoData portData)
 
Map< String, String > getFlowsWithAffectedEndpoint (SwitchId switchId)
 
ImmutablePair< PathInfoData, PathInfoDatagetFlowPath (String flowId)
 
ImmutablePair< Flow, FlowgetFlow (String flowId)
 
ImmutablePair< Flow, FlowcreateFlow (Flow flow, ImmutablePair< PathInfoData, PathInfoData > path)
 
ImmutablePair< Flow, FlowdeleteFlow (String flowId)
 
ImmutablePair< Flow, FlowupdateFlow (Flow flow, ImmutablePair< PathInfoData, PathInfoData > path)
 
Set< ImmutablePair< Flow, Flow > > dumpFlows ()
 
Set< PathNodegetPathIntersection (PathInfoData firstPath, PathInfoData secondPath)
 
ImmutablePair< Set< PathNode >, Set< PathNode > > getPathIntersection (ImmutablePair< PathInfoData, PathInfoData > firstPath, ImmutablePair< PathInfoData, PathInfoData > secondPath)
 
boolean isOneSwitchFlow (ImmutablePair< Flow, Flow > flow)
 
Set< FlowgetFlowsForEndpoint (SwitchId switchId, int port)
 
Set< FlowgetFlowsForEndpoint (SwitchId switchId, int port, int vlan)
 
Set< ImmutablePair< Flow, Flow > > getIngressAndEgressFlows (SwitchId switchId)
 
Set< Integer > getAllocatedVlans ()
 
Set< Integer > getAllocatedCookies ()
 
Map< SwitchId, Set< Integer > > getAllocatedMeters ()
 
String toString ()
 

Detailed Description

Definition at line 46 of file FlowCache.java.

Member Function Documentation

◆ cacheContainsFlow()

boolean org.openkilda.pce.cache.FlowCache.cacheContainsFlow ( String  flowId)

Checks if flow pool contains Flow instance.

Parameters
flowIdFlow instance id
Returns
true if flow pool contains Flow instance

Definition at line 117 of file FlowCache.java.

◆ clear()

void org.openkilda.pce.cache.FlowCache.clear ( )

Clears the inner network and pools.

Definition at line 76 of file FlowCache.java.

◆ createFlow()

ImmutablePair<Flow, Flow> org.openkilda.pce.cache.FlowCache.createFlow ( Flow  flow,
ImmutablePair< PathInfoData, PathInfoData path 
)

Creates flow.

Parameters
flowflow
pathflow path
Returns
flow

Definition at line 268 of file FlowCache.java.

◆ deleteFlow()

ImmutablePair<Flow, Flow> org.openkilda.pce.cache.FlowCache.deleteFlow ( String  flowId)

Deletes flow.

Parameters
flowIdflow id
Returns
flow

Definition at line 291 of file FlowCache.java.

◆ dumpFlows()

Set<ImmutablePair<Flow, Flow> > org.openkilda.pce.cache.FlowCache.dumpFlows ( )

Gets all flows.

Returns
all flows

Definition at line 342 of file FlowCache.java.

◆ getActiveFlowsWithAffectedPath() [1/3]

Set<ImmutablePair<Flow, Flow> > org.openkilda.pce.cache.FlowCache.getActiveFlowsWithAffectedPath ( SwitchId  switchId)

Gets active or cached flows with specified switch in the path.

Parameters
switchIdswitch id
Returns
set of flows

Definition at line 129 of file FlowCache.java.

◆ getActiveFlowsWithAffectedPath() [2/3]

Set<ImmutablePair<Flow, Flow> > org.openkilda.pce.cache.FlowCache.getActiveFlowsWithAffectedPath ( IslInfoData  islData)

Gets active flows with specified isl in the path.

Parameters
islDataisl
Returns
set of flows

Definition at line 146 of file FlowCache.java.

◆ getActiveFlowsWithAffectedPath() [3/3]

Set<ImmutablePair<Flow, Flow> > org.openkilda.pce.cache.FlowCache.getActiveFlowsWithAffectedPath ( PortInfoData  portData)

Gets flows with specified switch and port in the path.

Parameters
portDataport
Returns
set of flows

Definition at line 160 of file FlowCache.java.

◆ getAllocatedCookies()

Set<Integer> org.openkilda.pce.cache.FlowCache.getAllocatedCookies ( )

Definition at line 545 of file FlowCache.java.

◆ getAllocatedMeters()

Map<SwitchId, Set<Integer> > org.openkilda.pce.cache.FlowCache.getAllocatedMeters ( )

Definition at line 549 of file FlowCache.java.

◆ getAllocatedVlans()

Set<Integer> org.openkilda.pce.cache.FlowCache.getAllocatedVlans ( )

Definition at line 541 of file FlowCache.java.

◆ getFlow()

ImmutablePair<Flow, Flow> org.openkilda.pce.cache.FlowCache.getFlow ( String  flowId)

Gets flow.

Parameters
flowIdflow id
Returns
flow

Definition at line 247 of file FlowCache.java.

◆ getFlowPath()

ImmutablePair<PathInfoData, PathInfoData> org.openkilda.pce.cache.FlowCache.getFlowPath ( String  flowId)

Gets flow path.

Parameters
flowIdflow id
Returns
flow path

Definition at line 237 of file FlowCache.java.

◆ getFlowsForEndpoint() [1/2]

Set<Flow> org.openkilda.pce.cache.FlowCache.getFlowsForEndpoint ( SwitchId  switchId,
int  port 
)

Gets flows with specified switch and port.

Parameters
switchIdthe switch ID
portthe port
Returns
set of flows

Definition at line 500 of file FlowCache.java.

◆ getFlowsForEndpoint() [2/2]

Set<Flow> org.openkilda.pce.cache.FlowCache.getFlowsForEndpoint ( SwitchId  switchId,
int  port,
int  vlan 
)

Gets flows with specified switch, port and vlan.

NOTE: The result set also includes flows that match switch, port and with no VLAN (vlan = 0) defined.

Parameters
switchIdthe switch ID
portthe port
vlanthe vlan
Returns
set of flows

Definition at line 520 of file FlowCache.java.

◆ getFlowsWithAffectedEndpoint()

Map<String, String> org.openkilda.pce.cache.FlowCache.getFlowsWithAffectedEndpoint ( SwitchId  switchId)

Gets flows for state change.

Parameters
switchIdswitch id
Returns
map of flow ids and endpoints

Definition at line 218 of file FlowCache.java.

◆ getFlowsWithAffectedPath() [1/3]

Set<ImmutablePair<Flow, Flow> > org.openkilda.pce.cache.FlowCache.getFlowsWithAffectedPath ( SwitchId  switchId)

Gets flows with specified switch in the path.

Parameters
switchIdswitch id
Returns
set of flows

Definition at line 175 of file FlowCache.java.

◆ getFlowsWithAffectedPath() [2/3]

Set<ImmutablePair<Flow, Flow> > org.openkilda.pce.cache.FlowCache.getFlowsWithAffectedPath ( IslInfoData  islData)

Gets flows with specified isl in the path.

Parameters
islDataisl
Returns
set of flows

Definition at line 191 of file FlowCache.java.

◆ getFlowsWithAffectedPath() [3/3]

Set<ImmutablePair<Flow, Flow> > org.openkilda.pce.cache.FlowCache.getFlowsWithAffectedPath ( PortInfoData  portData)

Gets flows with specified switch and port in the path.

Parameters
portDataport
Returns
set of flows

Definition at line 204 of file FlowCache.java.

◆ getIngressAndEgressFlows()

Set<ImmutablePair<Flow, Flow> > org.openkilda.pce.cache.FlowCache.getIngressAndEgressFlows ( SwitchId  switchId)

Gets flow pairs which have source or destination is on the switch.

Definition at line 534 of file FlowCache.java.

◆ getPathIntersection() [1/2]

Set<PathNode> org.openkilda.pce.cache.FlowCache.getPathIntersection ( PathInfoData  firstPath,
PathInfoData  secondPath 
)

Returns intersection between two paths.

Parameters
firstPathfirst PathInfoData instances
secondPathsecond PathInfoData instances
Returns
intersection Set of IslInfoData instances

Definition at line 354 of file FlowCache.java.

◆ getPathIntersection() [2/2]

ImmutablePair<Set<PathNode>, Set<PathNode> > org.openkilda.pce.cache.FlowCache.getPathIntersection ( ImmutablePair< PathInfoData, PathInfoData firstPath,
ImmutablePair< PathInfoData, PathInfoData secondPath 
)

Returns intersection between two paths.

Parameters
firstPathfirst LinkedList of PathInfoData instances
secondPathsecond LinkedList of PathInfoData instances
Returns
intersection Set of PathNode instances

Definition at line 368 of file FlowCache.java.

◆ isOneSwitchFlow()

boolean org.openkilda.pce.cache.FlowCache.isOneSwitchFlow ( ImmutablePair< Flow, Flow flow)

Checks if flow is through single switch.

FIXME(surabujin): looks extremely over engineered. Can be replaces with org.openkilda.messaging.model.Flow::isOneSwitchFlow()

Parameters
flowflow
Returns
true if source and destination switches are same for specified flow, otherwise false

Definition at line 468 of file FlowCache.java.

◆ load()

void org.openkilda.pce.cache.FlowCache.load ( Set< ImmutablePair< Flow, Flow >>  flows)

Fills cache.

Parameters
flowsflows

Definition at line 68 of file FlowCache.java.

◆ pushFlow()

void org.openkilda.pce.cache.FlowCache.pushFlow ( ImmutablePair< Flow, Flow flow)

Track and allocate the flow.

Parameters
flowThe flow to track / allocate.

Definition at line 106 of file FlowCache.java.

◆ putFlow()

ImmutablePair<Flow, Flow> org.openkilda.pce.cache.FlowCache.putFlow ( ImmutablePair< Flow, Flow flow)

Puts flow directly to the cache.

Parameters
flowflow
Returns
previous flow

Definition at line 87 of file FlowCache.java.

◆ removeFlow()

ImmutablePair<Flow, Flow> org.openkilda.pce.cache.FlowCache.removeFlow ( String  flowId)

Removes flow directly from the cache.

Parameters
flowIdflow id
Returns
removed flow

Definition at line 97 of file FlowCache.java.

◆ toString()

String org.openkilda.pce.cache.FlowCache.toString ( )

Definition at line 557 of file FlowCache.java.

◆ updateFlow()

ImmutablePair<Flow, Flow> org.openkilda.pce.cache.FlowCache.updateFlow ( Flow  flow,
ImmutablePair< PathInfoData, PathInfoData path 
)

Updates flow.

Parameters
flowflow
pathflow path
Returns
flow

Definition at line 312 of file FlowCache.java.


The documentation for this class was generated from the following file: