Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Sho SHIMIZU
2016-01-14 18:40:53 -0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
98c0a39e9282d9de05d8efad5daf8555127e8fcb
98c0a39e
1 parent
80cfe45f
Apply more functional style
Change-Id: Ief6349fdb84e96d0cf2c432e3a6905fd403a87f3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
View file @
98c0a39
...
...
@@ -21,9 +21,9 @@ import org.apache.felix.scr.annotations.Deactivate;
import
org.apache.felix.scr.annotations.Reference
;
import
org.apache.felix.scr.annotations.ReferenceCardinality
;
import
org.apache.felix.scr.annotations.Service
;
import
org.onosproject.event.AbstractListenerManager
;
import
org.onosproject.core.CoreService
;
import
org.onosproject.core.IdGenerator
;
import
org.onosproject.event.AbstractListenerManager
;
import
org.onosproject.net.flow.FlowRule
;
import
org.onosproject.net.flow.FlowRuleOperations
;
import
org.onosproject.net.flow.FlowRuleOperationsContext
;
...
...
@@ -59,12 +59,19 @@ import static com.google.common.base.Preconditions.checkNotNull;
import
static
java
.
util
.
concurrent
.
Executors
.
newFixedThreadPool
;
import
static
java
.
util
.
concurrent
.
Executors
.
newSingleThreadExecutor
;
import
static
org
.
onlab
.
util
.
Tools
.
groupedThreads
;
import
static
org
.
onosproject
.
net
.
intent
.
IntentState
.*;
import
static
org
.
onosproject
.
net
.
intent
.
IntentState
.
CORRUPT
;
import
static
org
.
onosproject
.
net
.
intent
.
IntentState
.
FAILED
;
import
static
org
.
onosproject
.
net
.
intent
.
IntentState
.
INSTALLED
;
import
static
org
.
onosproject
.
net
.
intent
.
IntentState
.
INSTALL_REQ
;
import
static
org
.
onosproject
.
net
.
intent
.
IntentState
.
WITHDRAWING
;
import
static
org
.
onosproject
.
net
.
intent
.
IntentState
.
WITHDRAWN
;
import
static
org
.
onosproject
.
net
.
intent
.
IntentState
.
WITHDRAW_REQ
;
import
static
org
.
onosproject
.
net
.
intent
.
constraint
.
PartialFailureConstraint
.
intentAllowsPartialFailure
;
import
static
org
.
onosproject
.
net
.
intent
.
impl
.
phase
.
IntentProcessPhase
.
newInitialPhase
;
import
static
org
.
onosproject
.
security
.
AppGuard
.
checkPermission
;
import
static
org
.
onosproject
.
security
.
AppPermission
.
Type
.
INTENT_READ
;
import
static
org
.
onosproject
.
security
.
AppPermission
.
Type
.
INTENT_WRITE
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
import
static
org
.
onosproject
.
security
.
AppPermission
.
Type
.*;
/**
...
...
@@ -471,8 +478,8 @@ public class IntentManager
if
(
log
.
isTraceEnabled
())
{
log
.
trace
(
"applying intent {} -> {} with {} rules: {}"
,
toUninstall
.
isPresent
()
?
toUninstall
.
get
().
key
()
:
"<empty>"
,
toInstall
.
isPresent
()
?
toInstall
.
get
().
key
()
:
"<empty>"
,
toUninstall
.
map
(
x
->
x
.
key
().
toString
()).
orElse
(
"<empty>"
)
,
toInstall
.
map
(
x
->
x
.
key
().
toString
()).
orElse
(
"<empty>"
)
,
operations
.
stages
().
stream
().
mapToLong
(
i
->
i
.
size
()).
sum
(),
operations
.
stages
());
}
...
...
Please
register
or
login
to post a comment