Simplify statements to define serializer just for KryoNamespaces.API

Change-Id: Iac8c6233ab142bc382f35fbd070d4386a7baf64c
This commit is contained in:
Sho SHIMIZU 2015-07-23 16:28:35 -07:00 committed by Gerrit Code Review
parent 6683a07b52
commit 200a7394a2
2 changed files with 2 additions and 6 deletions

View File

@ -21,7 +21,6 @@ import org.apache.felix.scr.annotations.Deactivate;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.ReferenceCardinality;
import org.apache.felix.scr.annotations.Service;
import org.onlab.util.KryoNamespace;
import org.onosproject.net.DeviceId;
import org.onosproject.net.Port;
import org.onosproject.net.device.DeviceService;
@ -56,8 +55,7 @@ public class ConsistentDeviceResourceStore implements DeviceResourceStore {
private static final String INTENT_MAPPING = "IntentMapping";
private static final String INTENT_ALLOCATIONS = "PortIntentAllocations";
private static final Serializer SERIALIZER = Serializer.using(
new KryoNamespace.Builder().register(KryoNamespaces.API).build());
private static final Serializer SERIALIZER = Serializer.using(KryoNamespaces.API);
private ConsistentMap<Port, IntentId> portAllocMap;
private ConsistentMap<IntentId, Set<Port>> intentAllocMap;

View File

@ -20,7 +20,6 @@ import org.onlab.util.Bandwidth;
import org.onosproject.net.OmsPort;
import org.onosproject.net.device.DeviceService;
import org.slf4j.Logger;
import org.onlab.util.KryoNamespace;
import org.onlab.util.PositionalParameterStringFormatter;
import org.onosproject.net.Link;
import org.onosproject.net.LinkKey;
@ -85,8 +84,7 @@ public class ConsistentLinkResourceStore extends
/** IntentId -> LinkResourceAllocations. */
private static final String INTENT_ALLOCATIONS = "LinkIntentAllocations";
private static final Serializer SERIALIZER = Serializer.using(
new KryoNamespace.Builder().register(KryoNamespaces.API).build());
private static final Serializer SERIALIZER = Serializer.using(KryoNamespaces.API);
// for reading committed values.
private ConsistentMap<IntentId, LinkResourceAllocations> intentAllocMap;