Yuta HIGUCHI | 9ee60f6 | 2014-10-09 10:00:01 -0700 | [diff] [blame] | 1 | package org.onlab.onos.store.serializers; |
| 2 | |
Yuta HIGUCHI | 8ce0873 | 2014-10-11 10:40:45 -0700 | [diff] [blame] | 3 | import org.onlab.onos.store.impl.MastershipBasedTimestamp; |
Yuta HIGUCHI | eecee55 | 2014-10-16 14:09:01 -0700 | [diff] [blame] | 4 | import org.onlab.onos.store.impl.Timestamped; |
Madan Jampani | b5e9b1d | 2014-10-13 14:18:39 -0700 | [diff] [blame] | 5 | import org.onlab.onos.store.impl.WallClockTimestamp; |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 6 | import org.onlab.util.KryoNamespace; |
Yuta HIGUCHI | 9ee60f6 | 2014-10-09 10:00:01 -0700 | [diff] [blame] | 7 | |
| 8 | public final class DistributedStoreSerializers { |
| 9 | |
| 10 | /** |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 11 | * KryoNamespace which can serialize ON.lab misc classes. |
Yuta HIGUCHI | 9ee60f6 | 2014-10-09 10:00:01 -0700 | [diff] [blame] | 12 | */ |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 13 | public static final KryoNamespace COMMON = KryoNamespace.newBuilder() |
| 14 | .register(KryoNamespaces.API) |
Yuta HIGUCHI | 9ee60f6 | 2014-10-09 10:00:01 -0700 | [diff] [blame] | 15 | .register(Timestamped.class) |
| 16 | .register(MastershipBasedTimestamp.class, new MastershipBasedTimestampSerializer()) |
Madan Jampani | b5e9b1d | 2014-10-13 14:18:39 -0700 | [diff] [blame] | 17 | .register(WallClockTimestamp.class) |
Yuta HIGUCHI | 9ee60f6 | 2014-10-09 10:00:01 -0700 | [diff] [blame] | 18 | .build(); |
| 19 | |
| 20 | // avoid instantiation |
| 21 | private DistributedStoreSerializers() {} |
| 22 | } |