blob: ffe5c9fa7c642282262c1c7b18f9be3a049ef8e3 [file] [log] [blame]
Yuta HIGUCHI2e963892014-09-27 13:00:39 -07001package org.onlab.onos.store.common;
2
3import org.apache.felix.scr.annotations.Component;
4import org.apache.felix.scr.annotations.Service;
5import org.onlab.onos.cluster.MastershipTerm;
6import org.onlab.onos.net.DeviceId;
7import org.onlab.onos.store.ClockService;
8import org.onlab.onos.store.Timestamp;
9
10// FIXME: Code clone in onos-core-trivial, onos-core-hz
11/**
12 * Dummy implementation of {@link ClockService}.
13 */
14@Component(immediate = true)
15@Service
16public class NoOpClockService implements ClockService {
17
18 @Override
19 public Timestamp getTimestamp(DeviceId deviceId) {
20 return new Timestamp() {
21
22 @Override
23 public int compareTo(Timestamp o) {
24 throw new IllegalStateException("Never expected to be used.");
25 }
26 };
27 }
28
29 @Override
30 public void setMastershipTerm(DeviceId deviceId, MastershipTerm term) {
31 }
32}