Jonathan Hart | 23701d1 | 2014-04-03 10:45:48 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.util.serializers; |
Pavlin Radoslavov | e0a643e | 2013-10-24 13:33:39 -0700 | [diff] [blame] | 2 | |
TeruU | d1c5b65 | 2014-03-24 13:58:46 -0700 | [diff] [blame] | 3 | import java.net.Inet4Address; |
Pavlin Radoslavov | 45ec04b | 2014-02-14 23:29:33 -0800 | [diff] [blame] | 4 | import java.net.InetAddress; |
Pavlin Radoslavov | e0a643e | 2013-10-24 13:33:39 -0700 | [diff] [blame] | 5 | import java.util.ArrayList; |
TeruU | 7feef8a | 2014-04-03 00:15:49 -0700 | [diff] [blame] | 6 | import java.util.Date; |
TeruU | f911165 | 2014-05-14 23:10:35 -0700 | [diff] [blame] | 7 | import java.util.HashMap; |
TeruU | d1c5b65 | 2014-03-24 13:58:46 -0700 | [diff] [blame] | 8 | import java.util.HashSet; |
Yuta HIGUCHI | c25861a | 2014-06-17 23:17:09 -0700 | [diff] [blame] | 9 | import java.util.LinkedList; |
Yuta HIGUCHI | bf0a871 | 2014-06-30 18:59:46 -0700 | [diff] [blame] | 10 | import java.util.concurrent.ConcurrentHashMap; |
TeruU | 7feef8a | 2014-04-03 00:15:49 -0700 | [diff] [blame] | 11 | |
Pavlin Radoslavov | 695f895 | 2014-07-23 16:57:01 -0700 | [diff] [blame] | 12 | import net.floodlightcontroller.core.IFloodlightProviderService.Role; |
Pavlin Radoslavov | e0a643e | 2013-10-24 13:33:39 -0700 | [diff] [blame] | 13 | import net.floodlightcontroller.util.MACAddress; |
Pavlin Radoslavov | dd08e8c | 2014-08-14 11:02:57 -0700 | [diff] [blame] | 14 | import net.onrc.onos.api.batchoperation.BatchOperationEntry; |
Sho SHIMIZU | 1674fb3 | 2014-08-20 14:44:31 -0700 | [diff] [blame^] | 15 | import net.onrc.onos.api.newintent.AbstractIntent; |
| 16 | import net.onrc.onos.api.newintent.ConnectivityIntent; |
| 17 | import net.onrc.onos.api.newintent.IntentEvent; |
| 18 | import net.onrc.onos.api.newintent.IntentId; |
| 19 | import net.onrc.onos.api.newintent.MultiPointToSinglePointIntent; |
| 20 | import net.onrc.onos.api.newintent.OpticalConnectivityIntent; |
| 21 | import net.onrc.onos.api.newintent.PacketConnectivityIntent; |
| 22 | import net.onrc.onos.api.newintent.PointToPointIntent; |
| 23 | import net.onrc.onos.api.newintent.SinglePointToMultiPointIntent; |
TeruU | 3c049c4 | 2014-04-15 10:13:25 -0700 | [diff] [blame] | 24 | import net.onrc.onos.apps.proxyarp.ArpCacheNotification; |
Jonathan Hart | 0961fe8 | 2014-04-03 09:56:25 -0700 | [diff] [blame] | 25 | import net.onrc.onos.apps.proxyarp.ArpReplyNotification; |
Jonathan Hart | 0310213 | 2014-07-01 23:22:04 -0700 | [diff] [blame] | 26 | import net.onrc.onos.core.hostmanager.Host; |
Jonathan Hart | aa38097 | 2014-04-03 10:24:46 -0700 | [diff] [blame] | 27 | import net.onrc.onos.core.intent.ConstrainedShortestPathIntent; |
| 28 | import net.onrc.onos.core.intent.ErrorIntent; |
| 29 | import net.onrc.onos.core.intent.Intent; |
| 30 | import net.onrc.onos.core.intent.IntentOperation; |
| 31 | import net.onrc.onos.core.intent.IntentOperationList; |
Yuta HIGUCHI | 1fc395e | 2014-05-13 14:06:28 -0700 | [diff] [blame] | 32 | import net.onrc.onos.core.intent.Path; |
Jonathan Hart | aa38097 | 2014-04-03 10:24:46 -0700 | [diff] [blame] | 33 | import net.onrc.onos.core.intent.PathIntent; |
| 34 | import net.onrc.onos.core.intent.ShortestPathIntent; |
| 35 | import net.onrc.onos.core.intent.runtime.IntentStateList; |
Sho SHIMIZU | 1674fb3 | 2014-08-20 14:44:31 -0700 | [diff] [blame^] | 36 | import net.onrc.onos.core.newintent.PathFlowIntent; |
| 37 | import net.onrc.onos.core.newintent.SingleDstTreeFlowIntent; |
| 38 | import net.onrc.onos.core.newintent.SingleSrcTreeFlowIntent; |
Jonathan Hart | 313fdf0 | 2014-04-10 14:09:46 -0700 | [diff] [blame] | 39 | import net.onrc.onos.core.packetservice.BroadcastPacketOutNotification; |
Jonathan Hart | e6e6373 | 2014-04-16 14:29:49 -0700 | [diff] [blame] | 40 | import net.onrc.onos.core.packetservice.PacketOutNotification; |
Jonathan Hart | 313fdf0 | 2014-04-10 14:09:46 -0700 | [diff] [blame] | 41 | import net.onrc.onos.core.packetservice.SinglePacketOutNotification; |
Praseed Balakrishnan | 2aa6c0b | 2014-07-17 11:42:05 -0700 | [diff] [blame] | 42 | import net.onrc.onos.core.topology.AdminStatus; |
| 43 | import net.onrc.onos.core.topology.ConfigState; |
Yuta HIGUCHI | bfc77f0 | 2014-07-14 22:50:25 -0700 | [diff] [blame] | 44 | import net.onrc.onos.core.topology.HostEvent; |
Jonathan Hart | 472062d | 2014-04-03 10:56:48 -0700 | [diff] [blame] | 45 | import net.onrc.onos.core.topology.LinkEvent; |
Pavlin Radoslavov | 695f895 | 2014-07-23 16:57:01 -0700 | [diff] [blame] | 46 | import net.onrc.onos.core.topology.MastershipEvent; |
Jonathan Hart | 472062d | 2014-04-03 10:56:48 -0700 | [diff] [blame] | 47 | import net.onrc.onos.core.topology.PortEvent; |
| 48 | import net.onrc.onos.core.topology.SwitchEvent; |
Pavlin Radoslavov | dd08e8c | 2014-08-14 11:02:57 -0700 | [diff] [blame] | 49 | import net.onrc.onos.core.topology.TopologyBatchOperation; |
Yuta HIGUCHI | bf0a871 | 2014-06-30 18:59:46 -0700 | [diff] [blame] | 50 | import net.onrc.onos.core.topology.TopologyElement; |
Praseed Balakrishnan | 2aa6c0b | 2014-07-17 11:42:05 -0700 | [diff] [blame] | 51 | import net.onrc.onos.core.topology.TopologyEvent; |
Jonathan Hart | 23701d1 | 2014-04-03 10:45:48 -0700 | [diff] [blame] | 52 | import net.onrc.onos.core.util.Dpid; |
Jonathan Hart | 23701d1 | 2014-04-03 10:45:48 -0700 | [diff] [blame] | 53 | import net.onrc.onos.core.util.IPv4; |
| 54 | import net.onrc.onos.core.util.IPv4Net; |
| 55 | import net.onrc.onos.core.util.IPv6; |
| 56 | import net.onrc.onos.core.util.IPv6Net; |
Yuta HIGUCHI | 02ccb8c | 2014-07-10 11:29:45 -0700 | [diff] [blame] | 57 | import net.onrc.onos.core.util.LinkTuple; |
Pavlin Radoslavov | 53b208a | 2014-07-28 13:16:11 -0700 | [diff] [blame] | 58 | import net.onrc.onos.core.util.OnosInstanceId; |
Yuta HIGUCHI | fb56450 | 2014-06-16 21:29:00 -0700 | [diff] [blame] | 59 | import net.onrc.onos.core.util.PortNumber; |
Yuta HIGUCHI | 5c8cbeb | 2014-06-27 11:13:48 -0700 | [diff] [blame] | 60 | import net.onrc.onos.core.util.SwitchPort; |
Jonathan Hart | 23701d1 | 2014-04-03 10:45:48 -0700 | [diff] [blame] | 61 | |
Yuta HIGUCHI | 2d5ac52 | 2014-01-22 10:21:41 -0800 | [diff] [blame] | 62 | import com.esotericsoftware.kryo.Kryo; |
Pavlin Radoslavov | aaace7f | 2013-10-25 19:42:00 -0700 | [diff] [blame] | 63 | |
Pavlin Radoslavov | e0a643e | 2013-10-24 13:33:39 -0700 | [diff] [blame] | 64 | /** |
| 65 | * Class factory for allocating Kryo instances for |
| 66 | * serialization/deserialization of classes. |
| 67 | */ |
| 68 | public class KryoFactory { |
Yuta HIGUCHI | 0af53d2 | 2014-03-31 14:01:35 -0700 | [diff] [blame] | 69 | private static final int DEFAULT_PREALLOCATIONS = 100; |
Pavlin Radoslavov | e0a643e | 2013-10-24 13:33:39 -0700 | [diff] [blame] | 70 | private ArrayList<Kryo> kryoList = new ArrayList<Kryo>(); |
| 71 | |
| 72 | /** |
| 73 | * Default constructor. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 74 | * <p/> |
Yuta HIGUCHI | 0af53d2 | 2014-03-31 14:01:35 -0700 | [diff] [blame] | 75 | * Preallocates {@code DEFAULT_PREALLOCATIONS} Kryo instances. |
Pavlin Radoslavov | e0a643e | 2013-10-24 13:33:39 -0700 | [diff] [blame] | 76 | */ |
| 77 | public KryoFactory() { |
Yuta HIGUCHI | 0af53d2 | 2014-03-31 14:01:35 -0700 | [diff] [blame] | 78 | this(DEFAULT_PREALLOCATIONS); |
| 79 | } |
| 80 | |
| 81 | /** |
Ray Milkey | b41100a | 2014-04-10 10:42:15 -0700 | [diff] [blame] | 82 | * Constructor to explicitly specify number of Kryo instances to pool. |
Yuta HIGUCHI | 0af53d2 | 2014-03-31 14:01:35 -0700 | [diff] [blame] | 83 | * |
| 84 | * @param initialCapacity number of Kryo instance to preallocate |
| 85 | */ |
| 86 | public KryoFactory(final int initialCapacity) { |
| 87 | // Preallocate |
| 88 | kryoList.ensureCapacity(initialCapacity); |
| 89 | for (int i = 0; i < initialCapacity; i++) { |
Pavlin Radoslavov | 9c7b14c | 2014-07-03 17:24:27 -0700 | [diff] [blame] | 90 | Kryo kryo = newKryoObject(); |
Yuta HIGUCHI | 0af53d2 | 2014-03-31 14:01:35 -0700 | [diff] [blame] | 91 | kryoList.add(kryo); |
| 92 | } |
Pavlin Radoslavov | e0a643e | 2013-10-24 13:33:39 -0700 | [diff] [blame] | 93 | } |
| 94 | |
| 95 | /** |
Pavlin Radoslavov | 9c7b14c | 2014-07-03 17:24:27 -0700 | [diff] [blame] | 96 | * Gets a new Kryo object. |
Pavlin Radoslavov | e0a643e | 2013-10-24 13:33:39 -0700 | [diff] [blame] | 97 | * |
Pavlin Radoslavov | 9c7b14c | 2014-07-03 17:24:27 -0700 | [diff] [blame] | 98 | * @return the Kryo object. |
Pavlin Radoslavov | e0a643e | 2013-10-24 13:33:39 -0700 | [diff] [blame] | 99 | */ |
| 100 | public Kryo newKryo() { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 101 | return newDeleteKryo(null); |
Pavlin Radoslavov | e0a643e | 2013-10-24 13:33:39 -0700 | [diff] [blame] | 102 | } |
| 103 | |
| 104 | /** |
Pavlin Radoslavov | 9c7b14c | 2014-07-03 17:24:27 -0700 | [diff] [blame] | 105 | * Deletes an existing Kryo object. |
Pavlin Radoslavov | e0a643e | 2013-10-24 13:33:39 -0700 | [diff] [blame] | 106 | * |
| 107 | * @param deleteKryo the object to delete. |
| 108 | */ |
| 109 | public void deleteKryo(Kryo deleteKryo) { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 110 | newDeleteKryo(deleteKryo); |
Pavlin Radoslavov | e0a643e | 2013-10-24 13:33:39 -0700 | [diff] [blame] | 111 | } |
| 112 | |
| 113 | /** |
Pavlin Radoslavov | 9c7b14c | 2014-07-03 17:24:27 -0700 | [diff] [blame] | 114 | * Creates or deletes a Kryo object. |
Pavlin Radoslavov | e0a643e | 2013-10-24 13:33:39 -0700 | [diff] [blame] | 115 | * |
| 116 | * @param deleteKryo if null, then allocate and return a new object, |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 117 | * otherwise delete the provided object. |
Pavlin Radoslavov | e0a643e | 2013-10-24 13:33:39 -0700 | [diff] [blame] | 118 | * @return a new Kryo object if needed, otherwise null. |
| 119 | */ |
Ray Milkey | ec83894 | 2014-04-09 11:28:43 -0700 | [diff] [blame] | 120 | private synchronized Kryo newDeleteKryo(Kryo deleteKryo) { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 121 | if (deleteKryo != null) { |
| 122 | // Delete an entry by moving it back to the buffer |
| 123 | kryoList.add(deleteKryo); |
| 124 | return null; |
| 125 | } else { |
| 126 | Kryo kryo = null; |
| 127 | if (kryoList.isEmpty()) { |
| 128 | // Preallocate |
| 129 | for (int i = 0; i < 100; i++) { |
Pavlin Radoslavov | 9c7b14c | 2014-07-03 17:24:27 -0700 | [diff] [blame] | 130 | kryo = newKryoObject(); |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 131 | kryoList.add(kryo); |
| 132 | } |
| 133 | } |
Pavlin Radoslavov | e0a643e | 2013-10-24 13:33:39 -0700 | [diff] [blame] | 134 | |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 135 | kryo = kryoList.remove(kryoList.size() - 1); |
| 136 | return kryo; |
| 137 | } |
Pavlin Radoslavov | e0a643e | 2013-10-24 13:33:39 -0700 | [diff] [blame] | 138 | } |
| 139 | |
| 140 | /** |
Pavlin Radoslavov | 9c7b14c | 2014-07-03 17:24:27 -0700 | [diff] [blame] | 141 | * Creates and initializes a new Kryo object. |
| 142 | *<p> |
| 143 | * NOTE: This operation can be slow and should be used only if the |
| 144 | * application needs a single Kryo instance (e.g., during startup). |
| 145 | * For faster allocation, the application should use #newKryo() |
| 146 | * and #deleteKryo() factory methods. |
Pavlin Radoslavov | e0a643e | 2013-10-24 13:33:39 -0700 | [diff] [blame] | 147 | * |
| 148 | * @return the created Kryo object. |
| 149 | */ |
Pavlin Radoslavov | 9c7b14c | 2014-07-03 17:24:27 -0700 | [diff] [blame] | 150 | public static Kryo newKryoObject() { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 151 | Kryo kryo = new Kryo(); |
| 152 | kryo.setRegistrationRequired(true); |
| 153 | // |
| 154 | // WARNING: Order of register() calls affects serialized bytes. |
| 155 | // - Do no insert new entry in the middle, always add to the end. |
| 156 | // - Do not simply remove existing entry |
| 157 | // |
Yuta HIGUCHI | 0af53d2 | 2014-03-31 14:01:35 -0700 | [diff] [blame] | 158 | |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 159 | // kryo.setReferences(false); |
| 160 | // |
| 161 | kryo.register(ArrayList.class); |
Pavlin Radoslavov | aaace7f | 2013-10-25 19:42:00 -0700 | [diff] [blame] | 162 | |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 163 | // FlowPath and related classes |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 164 | kryo.register(Dpid.class); |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 165 | kryo.register(IPv4.class); |
| 166 | kryo.register(IPv4Net.class); |
| 167 | kryo.register(IPv6.class); |
| 168 | kryo.register(IPv6Net.class); |
| 169 | kryo.register(byte[].class); |
| 170 | kryo.register(MACAddress.class); |
Yuta HIGUCHI | fb56450 | 2014-06-16 21:29:00 -0700 | [diff] [blame] | 171 | kryo.register(PortNumber.class); |
Yuta HIGUCHI | 5c8cbeb | 2014-06-27 11:13:48 -0700 | [diff] [blame] | 172 | kryo.register(SwitchPort.class); |
Yuta HIGUCHI | 02ccb8c | 2014-07-10 11:29:45 -0700 | [diff] [blame] | 173 | kryo.register(LinkTuple.class); |
Pavlin Radoslavov | e0a643e | 2013-10-24 13:33:39 -0700 | [diff] [blame] | 174 | |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 175 | // New data model-related classes |
Pavlin Radoslavov | 53b208a | 2014-07-28 13:16:11 -0700 | [diff] [blame] | 176 | kryo.register(AdminStatus.class); |
| 177 | kryo.register(ConcurrentHashMap.class); |
| 178 | kryo.register(ConfigState.class); |
Yuta HIGUCHI | bfc77f0 | 2014-07-14 22:50:25 -0700 | [diff] [blame] | 179 | kryo.register(HostEvent.class); |
Yuta HIGUCHI | c25861a | 2014-06-17 23:17:09 -0700 | [diff] [blame] | 180 | kryo.register(LinkedList.class); |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 181 | kryo.register(LinkEvent.class); |
Pavlin Radoslavov | 695f895 | 2014-07-23 16:57:01 -0700 | [diff] [blame] | 182 | kryo.register(MastershipEvent.class); |
Pavlin Radoslavov | 53b208a | 2014-07-28 13:16:11 -0700 | [diff] [blame] | 183 | kryo.register(OnosInstanceId.class); |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 184 | kryo.register(PortEvent.class); |
Pavlin Radoslavov | 695f895 | 2014-07-23 16:57:01 -0700 | [diff] [blame] | 185 | kryo.register(Role.class); |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 186 | kryo.register(SwitchEvent.class); |
Pavlin Radoslavov | dd08e8c | 2014-08-14 11:02:57 -0700 | [diff] [blame] | 187 | kryo.register(TopologyBatchOperation.class); |
| 188 | kryo.register(TopologyBatchOperation.Operator.class); |
Yuta HIGUCHI | bf0a871 | 2014-06-30 18:59:46 -0700 | [diff] [blame] | 189 | kryo.register(TopologyElement.class); |
Pavlin Radoslavov | 53b208a | 2014-07-28 13:16:11 -0700 | [diff] [blame] | 190 | kryo.register(TopologyEvent.class); |
Pavlin Radoslavov | 31f8510 | 2014-08-15 13:55:44 -0700 | [diff] [blame] | 191 | kryo.register(TopologyEvent.Type.class); |
Pavlin Radoslavov | 45ec04b | 2014-02-14 23:29:33 -0800 | [diff] [blame] | 192 | |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 193 | // Intent-related classes |
| 194 | kryo.register(Path.class); |
| 195 | kryo.register(Intent.class); |
| 196 | kryo.register(Intent.IntentState.class); |
| 197 | kryo.register(PathIntent.class); |
| 198 | kryo.register(ShortestPathIntent.class); |
| 199 | kryo.register(ConstrainedShortestPathIntent.class); |
| 200 | kryo.register(ErrorIntent.class); |
| 201 | kryo.register(ErrorIntent.ErrorType.class); |
| 202 | kryo.register(IntentOperation.class); |
| 203 | kryo.register(IntentOperation.Operator.class); |
| 204 | kryo.register(IntentOperationList.class); |
| 205 | kryo.register(IntentStateList.class); |
TeruU | f911165 | 2014-05-14 23:10:35 -0700 | [diff] [blame] | 206 | kryo.register(HashMap.class); |
Toshio Koide | eb90d91 | 2014-02-18 21:30:22 -0800 | [diff] [blame] | 207 | |
Pavlin Radoslavov | dd08e8c | 2014-08-14 11:02:57 -0700 | [diff] [blame] | 208 | // New intent-related classes |
| 209 | kryo.register(BatchOperationEntry.class); |
Sho SHIMIZU | 1674fb3 | 2014-08-20 14:44:31 -0700 | [diff] [blame^] | 210 | kryo.register(IntentId.class); |
| 211 | kryo.register(IntentEvent.class); |
| 212 | kryo.register(AbstractIntent.class); |
| 213 | kryo.register(ConnectivityIntent.class); |
| 214 | kryo.register(PointToPointIntent.class); |
| 215 | kryo.register(MultiPointToSinglePointIntent.class); |
| 216 | kryo.register(SinglePointToMultiPointIntent.class); |
| 217 | kryo.register(net.onrc.onos.api.newintent.PathIntent.class); |
| 218 | kryo.register(PathFlowIntent.class); |
| 219 | kryo.register(SingleSrcTreeFlowIntent.class); |
| 220 | kryo.register(SingleDstTreeFlowIntent.class); |
| 221 | kryo.register(PacketConnectivityIntent.class); |
| 222 | kryo.register(OpticalConnectivityIntent.class); |
Pavlin Radoslavov | dd08e8c | 2014-08-14 11:02:57 -0700 | [diff] [blame] | 223 | |
Yuta HIGUCHI | bfc77f0 | 2014-07-14 22:50:25 -0700 | [diff] [blame] | 224 | // Host-related classes |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 225 | kryo.register(HashSet.class); |
Jonathan Hart | 0310213 | 2014-07-01 23:22:04 -0700 | [diff] [blame] | 226 | kryo.register(Host.class); |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 227 | kryo.register(Date.class); |
TeruU | 7feef8a | 2014-04-03 00:15:49 -0700 | [diff] [blame] | 228 | |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 229 | // ProxyArp-related classes |
Jonathan Hart | e6e6373 | 2014-04-16 14:29:49 -0700 | [diff] [blame] | 230 | kryo.register(PacketOutNotification.class); |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 231 | kryo.register(BroadcastPacketOutNotification.class); |
| 232 | kryo.register(SinglePacketOutNotification.class); |
| 233 | kryo.register(ArpReplyNotification.class); |
TeruU | 3c049c4 | 2014-04-15 10:13:25 -0700 | [diff] [blame] | 234 | kryo.register(ArpCacheNotification.class); |
Yuta HIGUCHI | c25861a | 2014-06-17 23:17:09 -0700 | [diff] [blame] | 235 | // TODO check if InetAddress related is still used |
| 236 | // TODO check if InetAddress can be correctly serialized |
| 237 | kryo.register(InetAddress.class); |
| 238 | kryo.register(Inet4Address.class); |
TeruU | d1c5b65 | 2014-03-24 13:58:46 -0700 | [diff] [blame] | 239 | |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 240 | return kryo; |
Pavlin Radoslavov | e0a643e | 2013-10-24 13:33:39 -0700 | [diff] [blame] | 241 | } |
| 242 | } |