Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
floodlight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
croft1
floodlight
Commits
cf234eef
Commit
cf234eef
authored
12 years ago
by
Shudong Zhou
Browse files
Options
Downloads
Patches
Plain Diff
Make all channel writes go through a single function, allow override
parent
9fdb3486
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/net/floodlightcontroller/core/OFSwitchBase.java
+11
-6
11 additions, 6 deletions
...main/java/net/floodlightcontroller/core/OFSwitchBase.java
with
11 additions
and
6 deletions
src/main/java/net/floodlightcontroller/core/OFSwitchBase.java
+
11
−
6
View file @
cf234eef
...
...
@@ -231,7 +231,12 @@ public abstract class OFSwitchBase implements IOFSwitch {
this
.
write
(
msglist
);
}
private
void
write
(
List
<
OFMessage
>
msglist
)
throws
IOException
{
/**
* Not callable by writers, but allow IOFSwitch implementation to override
* @param msglist
* @throws IOException
*/
public
void
write
(
List
<
OFMessage
>
msglist
)
throws
IOException
{
this
.
channel
.
write
(
msglist
);
}
...
...
@@ -398,7 +403,7 @@ public abstract class OFSwitchBase implements IOFSwitch {
this
.
iofMsgListenersMap
.
put
(
xid
,
caller
);
List
<
OFMessage
>
msglist
=
new
ArrayList
<
OFMessage
>(
1
);
msglist
.
add
(
request
);
this
.
channel
.
write
(
msglist
);
this
.
write
(
msglist
);
return
;
}
...
...
@@ -409,7 +414,7 @@ public abstract class OFSwitchBase implements IOFSwitch {
this
.
statsFutureMap
.
put
(
request
.
getXid
(),
future
);
List
<
OFMessage
>
msglist
=
new
ArrayList
<
OFMessage
>(
1
);
msglist
.
add
(
request
);
this
.
channel
.
write
(
msglist
);
this
.
write
(
msglist
);
return
future
;
}
...
...
@@ -518,10 +523,10 @@ public abstract class OFSwitchBase implements IOFSwitch {
try
{
List
<
OFMessage
>
msglist
=
new
ArrayList
<
OFMessage
>(
1
);
msglist
.
add
(
fm
);
channel
.
write
(
msglist
);
write
(
msglist
);
msglist
=
new
ArrayList
<
OFMessage
>(
1
);
msglist
.
add
(
barrierMsg
);
channel
.
write
(
msglist
);
write
(
msglist
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Failed to clear all flows on switch "
+
this
,
e
);
}
...
...
@@ -639,7 +644,7 @@ public abstract class OFSwitchBase implements IOFSwitch {
this
.
featuresFutureMap
.
put
(
request
.
getXid
(),
future
);
List
<
OFMessage
>
msglist
=
new
ArrayList
<
OFMessage
>(
1
);
msglist
.
add
(
request
);
this
.
channel
.
write
(
msglist
);
this
.
write
(
msglist
);
return
future
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment