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-06-16 09:05:03 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2425fcfb441f5f40962d27927c7915f2aa7b81c2
2425fcfb
1 parent
b15b2ead
Fix typo
Change-Id: I511dfaed3c5ad45eaa5b93272110857053080f8e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/DefaultTransactionalMap.java
core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/DefaultTransactionalMap.java
View file @
2425fcf
...
...
@@ -56,7 +56,7 @@ public class DefaultTransactionalMap<K, V> implements TransactionalMap<K, V>, Tr
private
final
TransactionContext
txContext
;
private
static
final
String
TX_CLOSED_ERROR
=
"Transaction is closed"
;
private
final
AsyncConsistentMap
<
K
,
V
>
backingMap
;
private
final
ConsistentMap
<
K
,
V
>
backingConsitentMap
;
private
final
ConsistentMap
<
K
,
V
>
backingConsi
s
tentMap
;
private
final
String
name
;
private
final
Serializer
serializer
;
private
final
Map
<
K
,
Versioned
<
V
>>
readCache
=
Maps
.
newConcurrentMap
();
...
...
@@ -87,7 +87,7 @@ public class DefaultTransactionalMap<K, V> implements TransactionalMap<K, V>, Tr
Serializer
serializer
)
{
this
.
name
=
name
;
this
.
backingMap
=
backingMap
;
this
.
backingConsitentMap
=
backingMap
.
asConsistentMap
();
this
.
backingConsi
s
tentMap
=
backingMap
.
asConsistentMap
();
this
.
txContext
=
txContext
;
this
.
serializer
=
serializer
;
}
...
...
@@ -103,7 +103,7 @@ public class DefaultTransactionalMap<K, V> implements TransactionalMap<K, V>, Tr
if
(
latest
!=
null
)
{
return
latest
;
}
else
{
Versioned
<
V
>
v
=
readCache
.
computeIfAbsent
(
key
,
k
->
backingConsitentMap
.
get
(
k
));
Versioned
<
V
>
v
=
readCache
.
computeIfAbsent
(
key
,
k
->
backingConsi
s
tentMap
.
get
(
k
));
return
v
!=
null
?
v
.
value
()
:
null
;
}
}
...
...
Please
register
or
login
to post a comment