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
Yuta HIGUCHI
2014-10-13 22:21:42 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
990aecc26aa06e3c964c3a2bb6adc33bbd7eec2d
990aecc2
1 parent
bbfc96a9
eliminate package dependency cycle
Change-Id: I7c30e5db9f5d17d24d28252b4dc58ce23835b6d8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
16 deletions
core/api/src/main/java/org/onlab/onos/net/LinkKey.java
core/store/dist/src/main/java/org/onlab/onos/store/link/impl/GossipLinkStore.java
core/store/hz/net/src/main/java/org/onlab/onos/store/link/impl/DistributedLinkStore.java
core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleLinkStore.java
core/api/src/main/java/org/onlab/onos/net/LinkKey.java
View file @
990aecc
...
...
@@ -4,8 +4,6 @@ import static com.google.common.base.Preconditions.checkNotNull;
import
java.util.Objects
;
import
org.onlab.onos.net.link.LinkDescription
;
import
com.google.common.base.MoreObjects
;
// TODO Consider renaming.
...
...
@@ -69,16 +67,6 @@ public final class LinkKey {
return
new
LinkKey
(
link
.
src
(),
link
.
dst
());
}
/**
* Creates a link identifier for the specified link.
*
* @param desc link description
* @return a link identifier
*/
public
static
LinkKey
linkKey
(
LinkDescription
desc
)
{
return
new
LinkKey
(
desc
.
src
(),
desc
.
dst
());
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
src
(),
dst
);
...
...
core/store/dist/src/main/java/org/onlab/onos/store/link/impl/GossipLinkStore.java
View file @
990aecc
...
...
@@ -238,7 +238,7 @@ public class GossipLinkStore
final
Timestamped
<
LinkDescription
>
deltaDesc
=
new
Timestamped
<>(
linkDescription
,
newTimestamp
);
LinkKey
key
=
linkKey
(
linkDescription
);
LinkKey
key
=
linkKey
(
linkDescription
.
src
(),
linkDescription
.
dst
()
);
final
LinkEvent
event
;
final
Timestamped
<
LinkDescription
>
mergedDesc
;
synchronized
(
getLinkDescriptions
(
key
))
{
...
...
@@ -265,7 +265,8 @@ public class GossipLinkStore
ProviderId
providerId
,
Timestamped
<
LinkDescription
>
linkDescription
)
{
LinkKey
key
=
linkKey
(
linkDescription
.
value
());
LinkKey
key
=
linkKey
(
linkDescription
.
value
().
src
(),
linkDescription
.
value
().
dst
());
ConcurrentMap
<
ProviderId
,
Timestamped
<
LinkDescription
>>
descs
=
getLinkDescriptions
(
key
);
synchronized
(
descs
)
{
...
...
core/store/hz/net/src/main/java/org/onlab/onos/store/link/impl/DistributedLinkStore.java
View file @
990aecc
...
...
@@ -151,7 +151,7 @@ public class DistributedLinkStore
@Override
public
LinkEvent
createOrUpdateLink
(
ProviderId
providerId
,
LinkDescription
linkDescription
)
{
LinkKey
key
=
linkKey
(
linkDescription
);
LinkKey
key
=
linkKey
(
linkDescription
.
src
(),
linkDescription
.
dst
()
);
Optional
<
DefaultLink
>
link
=
links
.
getUnchecked
(
key
);
if
(!
link
.
isPresent
())
{
return
createLink
(
providerId
,
key
,
linkDescription
);
...
...
core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleLinkStore.java
View file @
990aecc
...
...
@@ -149,7 +149,7 @@ public class SimpleLinkStore
@Override
public
LinkEvent
createOrUpdateLink
(
ProviderId
providerId
,
LinkDescription
linkDescription
)
{
LinkKey
key
=
linkKey
(
linkDescription
);
LinkKey
key
=
linkKey
(
linkDescription
.
src
(),
linkDescription
.
dst
()
);
ConcurrentMap
<
ProviderId
,
LinkDescription
>
descs
=
getLinkDescriptions
(
key
);
synchronized
(
descs
)
{
...
...
Please
register
or
login
to post a comment