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
Brian O'Connor
2015-02-11 11:03:32 -0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
47bc855ffff3b47d85e1bc244768f3dd97c4d227
47bc855f
1 parent
abbdcb77
Updating SimpleIntentStore
Change-Id: Ide940216f05a69875fcb844d36b073e2e4b9988e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
core/net/pom.xml
core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java
core/store/dist/src/main/java/org/onosproject/store/intent/impl/SimpleIntentStore.java
core/net/pom.xml
View file @
47bc855
...
...
@@ -51,6 +51,14 @@
<scope>
test
</scope>
</dependency>
<!-- FIXME remove when we figure out the trivial store -->
<dependency>
<groupId>
org.onosproject
</groupId>
<artifactId>
onos-core-dist
</artifactId>
<version>
${project.version}
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.onosproject
</groupId>
<artifactId>
onos-core-common
</artifactId>
...
...
core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java
View file @
47bc855
...
...
@@ -48,7 +48,7 @@ import org.onosproject.net.intent.IntentState;
import
org.onosproject.net.intent.IntentTestsMocks
;
import
org.onosproject.net.intent.Key
;
import
org.onosproject.net.resource.LinkResourceAllocations
;
import
org.onosproject.store.
trivial
.impl.SimpleIntentStore
;
import
org.onosproject.store.
intent
.impl.SimpleIntentStore
;
import
java.util.Collection
;
import
java.util.Collections
;
...
...
core/store/dist/src/main/java/org/onosproject/store/intent/impl/SimpleIntentStore.java
View file @
47bc855
...
...
@@ -170,6 +170,7 @@ public class SimpleIntentStore
// current version is less than or equal to newData's
// Note: current and newData's versions will be equal for state updates
currentData
.
version
().
compareTo
(
newData
.
version
())
<=
0
)
{
// FIXME need to check that the validity of state transition if ==
current
.
put
(
newData
.
key
(),
newData
);
if
(
pendingData
!=
null
...
...
@@ -204,7 +205,9 @@ public class SimpleIntentStore
@Override
public
void
addPending
(
IntentData
data
)
{
data
.
setVersion
(
new
SystemClockTimestamp
());
if
(
data
.
version
()
!=
null
)
{
// recompiled intents will already have a version
data
.
setVersion
(
new
SystemClockTimestamp
());
}
synchronized
(
this
)
{
IntentData
existingData
=
pending
.
get
(
data
.
key
());
if
(
existingData
==
null
||
...
...
Please
register
or
login
to post a comment