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
Madan Jampani
2014-11-12 01:24:48 -0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
9b06d726df06f11c066acd4b57ae1dc5d9aa786a
9b06d726
2 parents
3865cd9b
650840bc
Merge branch 'master' of
ssh://gerrit.onlab.us:29418/onos-next
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
apps/foo/src/main/java/org/onlab/onos/foo/FooComponent.java
apps/foo/src/main/java/org/onlab/onos/foo/FooComponent.java
View file @
9b06d72
...
...
@@ -163,15 +163,15 @@ public class FooComponent {
if
(
vv
==
null
)
{
ByteBuffer
zero
=
ByteBuffer
.
allocate
(
Long
.
BYTES
).
putLong
(
0
);
if
(
dbService
.
putIfAbsent
(
someTable
,
someKey
,
zero
.
array
()))
{
log
.
info
(
"Wrote initial value"
);
vv
=
dbService
.
get
(
someTable
,
someKey
);
log
.
info
(
"Wrote initial value"
);
vv
=
dbService
.
get
(
someTable
,
someKey
);
}
else
{
log
.
info
(
"Concurrent write detected."
);
// concurrent write detected, read and fall through
vv
=
dbService
.
get
(
someTable
,
someKey
);
if
(
vv
==
null
)
{
log
.
error
(
"Shouldn't reach here"
);
}
log
.
info
(
"Concurrent write detected."
);
// concurrent write detected, read and fall through
vv
=
dbService
.
get
(
someTable
,
someKey
);
if
(
vv
==
null
)
{
log
.
error
(
"Shouldn't reach here"
);
}
}
}
int
retry
=
5
;
...
...
Please
register
or
login
to post a comment