blob: 2f03c876e11ca47f4d0398ce8144b57c7646b23a [file] [log] [blame]
Yuta HIGUCHI9ee60f62014-10-09 10:00:01 -07001package org.onlab.onos.store.serializers;
2
Yuta HIGUCHI8ce08732014-10-11 10:40:45 -07003import org.onlab.onos.store.impl.MastershipBasedTimestamp;
Yuta HIGUCHIeecee552014-10-16 14:09:01 -07004import org.onlab.onos.store.impl.Timestamped;
Madan Jampanib5e9b1d2014-10-13 14:18:39 -07005import org.onlab.onos.store.impl.WallClockTimestamp;
Yuta HIGUCHI8d143d22014-10-19 23:15:09 -07006import org.onlab.util.KryoNamespace;
Yuta HIGUCHI9ee60f62014-10-09 10:00:01 -07007
8public final class DistributedStoreSerializers {
9
10 /**
Yuta HIGUCHI8d143d22014-10-19 23:15:09 -070011 * KryoNamespace which can serialize ON.lab misc classes.
Yuta HIGUCHI9ee60f62014-10-09 10:00:01 -070012 */
Yuta HIGUCHI8d143d22014-10-19 23:15:09 -070013 public static final KryoNamespace COMMON = KryoNamespace.newBuilder()
14 .register(KryoNamespaces.API)
Yuta HIGUCHI9ee60f62014-10-09 10:00:01 -070015 .register(Timestamped.class)
16 .register(MastershipBasedTimestamp.class, new MastershipBasedTimestampSerializer())
Madan Jampanib5e9b1d2014-10-13 14:18:39 -070017 .register(WallClockTimestamp.class)
Yuta HIGUCHI9ee60f62014-10-09 10:00:01 -070018 .build();
19
20 // avoid instantiation
21 private DistributedStoreSerializers() {}
22}