alshabib

Merge branch 'master' of ssh://gerrit.onlab.us:29418/onos-next

1 package org.onlab.onos.net.host; 1 package org.onlab.onos.net.host;
2 2
3 +import org.onlab.onos.net.HostId;
3 import org.onlab.onos.store.Timestamp; 4 import org.onlab.onos.store.Timestamp;
4 -import org.onlab.packet.MacAddress;
5 5
6 /** 6 /**
7 * Interface for a logical clock service that issues per host timestamps. 7 * Interface for a logical clock service that issues per host timestamps.
...@@ -9,9 +9,9 @@ import org.onlab.packet.MacAddress; ...@@ -9,9 +9,9 @@ import org.onlab.packet.MacAddress;
9 public interface HostClockService { 9 public interface HostClockService {
10 10
11 /** 11 /**
12 - * Returns a new timestamp for the specified host mac address. 12 + * Returns a new timestamp for the specified host.
13 - * @param hostMac host MAC address. 13 + * @param hostId identifier for the host.
14 * @return timestamp. 14 * @return timestamp.
15 */ 15 */
16 - public Timestamp getTimestamp(MacAddress hostMac); 16 + public Timestamp getTimestamp(HostId hostId);
17 } 17 }
......
...@@ -6,10 +6,10 @@ import org.apache.felix.scr.annotations.Activate; ...@@ -6,10 +6,10 @@ import org.apache.felix.scr.annotations.Activate;
6 import org.apache.felix.scr.annotations.Component; 6 import org.apache.felix.scr.annotations.Component;
7 import org.apache.felix.scr.annotations.Deactivate; 7 import org.apache.felix.scr.annotations.Deactivate;
8 import org.apache.felix.scr.annotations.Service; 8 import org.apache.felix.scr.annotations.Service;
9 +import org.onlab.onos.net.HostId;
9 import org.onlab.onos.net.host.HostClockService; 10 import org.onlab.onos.net.host.HostClockService;
10 import org.onlab.onos.store.Timestamp; 11 import org.onlab.onos.store.Timestamp;
11 import org.onlab.onos.store.impl.WallClockTimestamp; 12 import org.onlab.onos.store.impl.WallClockTimestamp;
12 -import org.onlab.packet.MacAddress;
13 import org.slf4j.Logger; 13 import org.slf4j.Logger;
14 14
15 /** 15 /**
...@@ -32,7 +32,7 @@ public class HostClockManager implements HostClockService { ...@@ -32,7 +32,7 @@ public class HostClockManager implements HostClockService {
32 } 32 }
33 33
34 @Override 34 @Override
35 - public Timestamp getTimestamp(MacAddress hostMac) { 35 + public Timestamp getTimestamp(HostId hostId) {
36 return new WallClockTimestamp(); 36 return new WallClockTimestamp();
37 } 37 }
38 } 38 }
......
...@@ -2,6 +2,7 @@ package org.onlab.onos.store.serializers; ...@@ -2,6 +2,7 @@ package org.onlab.onos.store.serializers;
2 2
3 import org.onlab.onos.store.common.impl.Timestamped; 3 import org.onlab.onos.store.common.impl.Timestamped;
4 import org.onlab.onos.store.impl.MastershipBasedTimestamp; 4 import org.onlab.onos.store.impl.MastershipBasedTimestamp;
5 +import org.onlab.onos.store.impl.WallClockTimestamp;
5 import org.onlab.util.KryoPool; 6 import org.onlab.util.KryoPool;
6 7
7 public final class DistributedStoreSerializers { 8 public final class DistributedStoreSerializers {
...@@ -13,6 +14,7 @@ public final class DistributedStoreSerializers { ...@@ -13,6 +14,7 @@ public final class DistributedStoreSerializers {
13 .register(KryoPoolUtil.API) 14 .register(KryoPoolUtil.API)
14 .register(Timestamped.class) 15 .register(Timestamped.class)
15 .register(MastershipBasedTimestamp.class, new MastershipBasedTimestampSerializer()) 16 .register(MastershipBasedTimestamp.class, new MastershipBasedTimestampSerializer())
17 + .register(WallClockTimestamp.class)
16 .build(); 18 .build();
17 19
18 // avoid instantiation 20 // avoid instantiation
......