Charles Chan
Committed by Gerrit Code Review

Remove redundent byte[].class registration

Also added names to some serializer for debugging purpose

Change-Id: I0997b61a5d08df84c85ca28f6a5ed23417fb8c22
...@@ -120,12 +120,12 @@ public class McastHandler { ...@@ -120,12 +120,12 @@ public class McastHandler {
120 mcastNextObjStore = storageService 120 mcastNextObjStore = storageService
121 .<McastStoreKey, NextObjective>consistentMapBuilder() 121 .<McastStoreKey, NextObjective>consistentMapBuilder()
122 .withName("onos-mcast-nextobj-store") 122 .withName("onos-mcast-nextobj-store")
123 - .withSerializer(Serializer.using(mcastKryo.build())) 123 + .withSerializer(Serializer.using(mcastKryo.build("McastHandler-NextObj")))
124 .build(); 124 .build();
125 mcastRoleStore = storageService 125 mcastRoleStore = storageService
126 .<McastStoreKey, McastRole>consistentMapBuilder() 126 .<McastStoreKey, McastRole>consistentMapBuilder()
127 .withName("onos-mcast-role-store") 127 .withName("onos-mcast-role-store")
128 - .withSerializer(Serializer.using(mcastKryo.build())) 128 + .withSerializer(Serializer.using(mcastKryo.build("McastHandler-Role")))
129 .build(); 129 .build();
130 } 130 }
131 131
......
...@@ -130,9 +130,8 @@ public class MessagingPerfApp { ...@@ -130,9 +130,8 @@ public class MessagingPerfApp {
130 serializerPool = KryoNamespace.newBuilder() 130 serializerPool = KryoNamespace.newBuilder()
131 .register(KryoNamespaces.BASIC) 131 .register(KryoNamespaces.BASIC)
132 .register(KryoNamespaces.MISC) 132 .register(KryoNamespaces.MISC)
133 - .register(byte[].class)
134 .register(Data.class) 133 .register(Data.class)
135 - .build(); 134 + .build("MessagingPerfApp");
136 } 135 }
137 }; 136 };
138 137
......
...@@ -66,7 +66,7 @@ public class DistributedFlowObjectiveStore ...@@ -66,7 +66,7 @@ public class DistributedFlowObjectiveStore
66 new KryoNamespace.Builder() 66 new KryoNamespace.Builder()
67 .register(byte[].class) 67 .register(byte[].class)
68 .register(Versioned.class) 68 .register(Versioned.class)
69 - .build())) 69 + .build("DistributedFlowObjectiveStore")))
70 .build(); 70 .build();
71 71
72 nextIds = storageService.getAtomicCounter("next-objective-counter"); 72 nextIds = storageService.getAtomicCounter("next-objective-counter");
......
...@@ -105,7 +105,7 @@ public abstract class AbstractCorsaPipeline extends AbstractHandlerBehaviour imp ...@@ -105,7 +105,7 @@ public abstract class AbstractCorsaPipeline extends AbstractHandlerBehaviour imp
105 .register(DefaultGroupKey.class) 105 .register(DefaultGroupKey.class)
106 .register(CorsaGroup.class) 106 .register(CorsaGroup.class)
107 .register(byte[].class) 107 .register(byte[].class)
108 - .build(); 108 + .build("AbstractCorsaPipeline");
109 109
110 private Cache<GroupKey, NextObjective> pendingGroups; 110 private Cache<GroupKey, NextObjective> pendingGroups;
111 111
......
...@@ -39,7 +39,7 @@ public class DefaultMoveExtensionTreatment extends AbstractExtension ...@@ -39,7 +39,7 @@ public class DefaultMoveExtensionTreatment extends AbstractExtension
39 39
40 private final KryoNamespace appKryo = new KryoNamespace.Builder() 40 private final KryoNamespace appKryo = new KryoNamespace.Builder()
41 .register(byte[].class).register(Integer.class).register(Map.class) 41 .register(byte[].class).register(Integer.class).register(Map.class)
42 - .build(); 42 + .build("DefaultMoveExtensionTreatment");
43 43
44 /** 44 /**
45 * Creates a new move Treatment. 45 * Creates a new move Treatment.
......
...@@ -46,7 +46,7 @@ public class NiciraResubmit extends AbstractExtension implements ExtensionTreatm ...@@ -46,7 +46,7 @@ public class NiciraResubmit extends AbstractExtension implements ExtensionTreatm
46 .register(new PortNumberSerializer(), PortNumber.class) 46 .register(new PortNumberSerializer(), PortNumber.class)
47 .register(Map.class).register(HashMap.class) 47 .register(Map.class).register(HashMap.class)
48 .register(byte[].class) 48 .register(byte[].class)
49 - .build(); 49 + .build("NiciraResubmit");
50 50
51 /** 51 /**
52 * Creates a new resubmit instruction. 52 * Creates a new resubmit instruction.
......
...@@ -47,7 +47,7 @@ public class NiciraResubmitTable extends AbstractExtension implements ...@@ -47,7 +47,7 @@ public class NiciraResubmitTable extends AbstractExtension implements
47 .register(new PortNumberSerializer(), PortNumber.class) 47 .register(new PortNumberSerializer(), PortNumber.class)
48 .register(Map.class).register(HashMap.class) 48 .register(Map.class).register(HashMap.class)
49 .register(byte[].class) 49 .register(byte[].class)
50 - .build(); 50 + .build("NiciraResubmitTable");
51 51
52 /** 52 /**
53 * Creates a new resubmit-table instruction. 53 * Creates a new resubmit-table instruction.
......
...@@ -39,7 +39,7 @@ public class NiciraSetTunnelDst extends AbstractExtension implements ...@@ -39,7 +39,7 @@ public class NiciraSetTunnelDst extends AbstractExtension implements
39 private final KryoNamespace appKryo = new KryoNamespace.Builder() 39 private final KryoNamespace appKryo = new KryoNamespace.Builder()
40 .register(new Ip4AddressSerializer(), Ip4Address.class) 40 .register(new Ip4AddressSerializer(), Ip4Address.class)
41 .register(byte[].class) 41 .register(byte[].class)
42 - .build(); 42 + .build("NiciraSetTunnelDst");
43 43
44 /** 44 /**
45 * Creates a new set tunnel destination instruction. 45 * Creates a new set tunnel destination instruction.
......
...@@ -134,7 +134,7 @@ public class CentecV350Pipeline extends AbstractHandlerBehaviour implements Pipe ...@@ -134,7 +134,7 @@ public class CentecV350Pipeline extends AbstractHandlerBehaviour implements Pipe
134 .register(DefaultGroupKey.class) 134 .register(DefaultGroupKey.class)
135 .register(CentecV350Group.class) 135 .register(CentecV350Group.class)
136 .register(byte[].class) 136 .register(byte[].class)
137 - .build(); 137 + .build("CentecV350Pipeline");
138 138
139 private Cache<GroupKey, NextObjective> pendingGroups; 139 private Cache<GroupKey, NextObjective> pendingGroups;
140 140
......
...@@ -69,7 +69,7 @@ public class DefaultSingleTablePipeline extends AbstractHandlerBehaviour impleme ...@@ -69,7 +69,7 @@ public class DefaultSingleTablePipeline extends AbstractHandlerBehaviour impleme
69 .register(DefaultGroupKey.class) 69 .register(DefaultGroupKey.class)
70 .register(SingleGroup.class) 70 .register(SingleGroup.class)
71 .register(byte[].class) 71 .register(byte[].class)
72 - .build(); 72 + .build("DefaultSingleTablePipeline");
73 73
74 74
75 @Override 75 @Override
......
...@@ -121,9 +121,8 @@ public class Ofdpa2Pipeline extends AbstractHandlerBehaviour implements Pipeline ...@@ -121,9 +121,8 @@ public class Ofdpa2Pipeline extends AbstractHandlerBehaviour implements Pipeline
121 .register(GroupKey.class) 121 .register(GroupKey.class)
122 .register(DefaultGroupKey.class) 122 .register(DefaultGroupKey.class)
123 .register(Ofdpa2GroupHandler.OfdpaNextGroup.class) 123 .register(Ofdpa2GroupHandler.OfdpaNextGroup.class)
124 - .register(byte[].class)
125 .register(ArrayDeque.class) 124 .register(ArrayDeque.class)
126 - .build(); 125 + .build("Ofdpa2Pipeline");
127 126
128 protected Ofdpa2GroupHandler groupHandler; 127 protected Ofdpa2GroupHandler groupHandler;
129 128
......
...@@ -114,8 +114,7 @@ public class OltPipeline extends AbstractHandlerBehaviour implements Pipeliner { ...@@ -114,8 +114,7 @@ public class OltPipeline extends AbstractHandlerBehaviour implements Pipeliner {
114 .register(GroupKey.class) 114 .register(GroupKey.class)
115 .register(DefaultGroupKey.class) 115 .register(DefaultGroupKey.class)
116 .register(OLTPipelineGroup.class) 116 .register(OLTPipelineGroup.class)
117 - .register(byte[].class) 117 + .build("OltPipeline");
118 - .build();
119 118
120 @Override 119 @Override
121 public void init(DeviceId deviceId, PipelinerContext context) { 120 public void init(DeviceId deviceId, PipelinerContext context) {
......
...@@ -90,8 +90,7 @@ public class PicaPipeline extends AbstractHandlerBehaviour implements Pipeliner ...@@ -90,8 +90,7 @@ public class PicaPipeline extends AbstractHandlerBehaviour implements Pipeliner
90 private KryoNamespace appKryo = new KryoNamespace.Builder() 90 private KryoNamespace appKryo = new KryoNamespace.Builder()
91 .register(KryoNamespaces.API) 91 .register(KryoNamespaces.API)
92 .register(PicaGroup.class) 92 .register(PicaGroup.class)
93 - .register(byte[].class) 93 + .build("PicaPipeline");
94 - .build();
95 94
96 @Override 95 @Override
97 public void init(DeviceId deviceId, PipelinerContext context) { 96 public void init(DeviceId deviceId, PipelinerContext context) {
......
...@@ -140,8 +140,7 @@ public class SpringOpenTTP extends AbstractHandlerBehaviour ...@@ -140,8 +140,7 @@ public class SpringOpenTTP extends AbstractHandlerBehaviour
140 .register(DefaultGroupKey.class) 140 .register(DefaultGroupKey.class)
141 .register(TrafficTreatment.class) 141 .register(TrafficTreatment.class)
142 .register(SpringOpenGroup.class) 142 .register(SpringOpenGroup.class)
143 - .register(byte[].class) 143 + .build("SpringOpenTTP");
144 - .build();
145 144
146 @Override 145 @Override
147 public void init(DeviceId deviceId, PipelinerContext context) { 146 public void init(DeviceId deviceId, PipelinerContext context) {
......