alshabib

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

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 hostMac host MAC address.
* Returns a new timestamp for the specified host.
* @param hostId identifier for the host.
* @return timestamp.
*/
public Timestamp getTimestamp(MacAddress hostMac);
public Timestamp getTimestamp(HostId hostId);
}
......
......@@ -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();
}
}
......
......@@ -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
......