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-10-13 14:18:39 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b5e9b1d3dfce9f8fb22c82177a93dc322b75832c
b5e9b1d3
1 parent
94cf3c55
Using HostId instead of MacAddress when requesting timestamps from HostClockService
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
core/api/src/main/java/org/onlab/onos/net/host/HostClockService.java
core/store/dist/src/main/java/org/onlab/onos/store/host/impl/HostClockManager.java
core/store/dist/src/main/java/org/onlab/onos/store/serializers/DistributedStoreSerializers.java
core/api/src/main/java/org/onlab/onos/net/host/HostClockService.java
View file @
b5e9b1d
package
org
.
onlab
.
onos
.
net
.
host
;
import
org.onlab.onos.net.HostId
;
import
org.onlab.onos.store.Timestamp
;
import
org.onlab.packet.MacAddress
;
/**
* Interface for a logical clock service that issues per host timestamps.
...
...
@@ -9,9 +9,9 @@ import org.onlab.packet.MacAddress;
public
interface
HostClockService
{
/**
* Returns a new timestamp for the specified host
mac address
.
* @param host
Mac host MAC address
.
* Returns a new timestamp for the specified host.
* @param host
Id identifier for the host
.
* @return timestamp.
*/
public
Timestamp
getTimestamp
(
MacAddress
hostMac
);
public
Timestamp
getTimestamp
(
HostId
hostId
);
}
...
...
core/store/dist/src/main/java/org/onlab/onos/store/host/impl/HostClockManager.java
View file @
b5e9b1d
...
...
@@ -6,10 +6,10 @@ import org.apache.felix.scr.annotations.Activate;
import
org.apache.felix.scr.annotations.Component
;
import
org.apache.felix.scr.annotations.Deactivate
;
import
org.apache.felix.scr.annotations.Service
;
import
org.onlab.onos.net.HostId
;
import
org.onlab.onos.net.host.HostClockService
;
import
org.onlab.onos.store.Timestamp
;
import
org.onlab.onos.store.impl.WallClockTimestamp
;
import
org.onlab.packet.MacAddress
;
import
org.slf4j.Logger
;
/**
...
...
@@ -32,7 +32,7 @@ public class HostClockManager implements HostClockService {
}
@Override
public
Timestamp
getTimestamp
(
MacAddress
hostMac
)
{
public
Timestamp
getTimestamp
(
HostId
hostId
)
{
return
new
WallClockTimestamp
();
}
}
...
...
core/store/dist/src/main/java/org/onlab/onos/store/serializers/DistributedStoreSerializers.java
View file @
b5e9b1d
...
...
@@ -2,6 +2,7 @@ package org.onlab.onos.store.serializers;
import
org.onlab.onos.store.common.impl.Timestamped
;
import
org.onlab.onos.store.impl.MastershipBasedTimestamp
;
import
org.onlab.onos.store.impl.WallClockTimestamp
;
import
org.onlab.util.KryoPool
;
public
final
class
DistributedStoreSerializers
{
...
...
@@ -13,6 +14,7 @@ public final class DistributedStoreSerializers {
.
register
(
KryoPoolUtil
.
API
)
.
register
(
Timestamped
.
class
)
.
register
(
MastershipBasedTimestamp
.
class
,
new
MastershipBasedTimestampSerializer
())
.
register
(
WallClockTimestamp
.
class
)
.
build
();
// avoid instantiation
...
...
Please
register
or
login
to post a comment