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
alshabib
2014-10-13 14:25:50 -0700
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
f670a29c64cf2ae7b9f2a6a7b2faa0f48aa4220f
f670a29c
2 parents
9dc1b0ec
b5e9b1d3
Merge branch 'master' of
ssh://gerrit.onlab.us:29418/onos-next
Hide 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 @
f670a29
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 @
f670a29
...
...
@@ -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 @
f670a29
...
...
@@ -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