Yuta HIGUCHI | 9ee60f6 | 2014-10-09 10:00:01 -0700 | [diff] [blame] | 1 | package org.onlab.onos.store.serializers; |
| 2 | |
Yuta HIGUCHI | 9ee60f6 | 2014-10-09 10:00:01 -0700 | [diff] [blame] | 3 | import org.onlab.onos.store.common.impl.Timestamped; |
Yuta HIGUCHI | 8ce0873 | 2014-10-11 10:40:45 -0700 | [diff] [blame] | 4 | import org.onlab.onos.store.impl.MastershipBasedTimestamp; |
Madan Jampani | b5e9b1d | 2014-10-13 14:18:39 -0700 | [diff] [blame] | 5 | import org.onlab.onos.store.impl.WallClockTimestamp; |
Yuta HIGUCHI | 9ee60f6 | 2014-10-09 10:00:01 -0700 | [diff] [blame] | 6 | import org.onlab.util.KryoPool; |
| 7 | |
| 8 | public final class DistributedStoreSerializers { |
| 9 | |
| 10 | /** |
| 11 | * KryoPool which can serialize ON.lab misc classes. |
| 12 | */ |
| 13 | public static final KryoPool COMMON = KryoPool.newBuilder() |
| 14 | .register(KryoPoolUtil.API) |
| 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 | } |