From b731e2f1dd0972409b136aebc7b463dd72c9cfad Mon Sep 17 00:00:00 2001 From: CNlucius Date: Tue, 13 Sep 2016 11:40:12 +0800 Subject: ONOSFW-171 O/S-SFC-ONOS scenario documentation Change-Id: I51ae1cf736ea24ab6680f8edca1b2bf5dd598365 Signed-off-by: CNlucius --- .../store/serializers/ImmutableSetSerializer.java | 55 ---------------------- 1 file changed, 55 deletions(-) delete mode 100644 framework/src/onos/core/store/serializers/src/main/java/org/onosproject/store/serializers/ImmutableSetSerializer.java (limited to 'framework/src/onos/core/store/serializers/src/main/java/org/onosproject/store/serializers/ImmutableSetSerializer.java') diff --git a/framework/src/onos/core/store/serializers/src/main/java/org/onosproject/store/serializers/ImmutableSetSerializer.java b/framework/src/onos/core/store/serializers/src/main/java/org/onosproject/store/serializers/ImmutableSetSerializer.java deleted file mode 100644 index cb9b0543..00000000 --- a/framework/src/onos/core/store/serializers/src/main/java/org/onosproject/store/serializers/ImmutableSetSerializer.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2014 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.store.serializers; - -import java.util.ArrayList; -import java.util.List; - -import com.esotericsoftware.kryo.Kryo; -import com.esotericsoftware.kryo.Serializer; -import com.esotericsoftware.kryo.io.Input; -import com.esotericsoftware.kryo.io.Output; -import com.esotericsoftware.kryo.serializers.CollectionSerializer; -import com.google.common.collect.ImmutableSet; - -/** -* Kryo Serializer for {@link ImmutableSet}. -*/ -public class ImmutableSetSerializer extends Serializer> { - - private final CollectionSerializer serializer = new CollectionSerializer(); - - /** - * Creates {@link ImmutableSet} serializer instance. - */ - public ImmutableSetSerializer() { - // non-null, immutable - super(false, true); - serializer.setElementsCanBeNull(false); - } - - @Override - public void write(Kryo kryo, Output output, ImmutableSet object) { - kryo.writeObject(output, object.asList(), serializer); - } - - @Override - public ImmutableSet read(Kryo kryo, Input input, - Class> type) { - List elms = kryo.readObject(input, ArrayList.class, serializer); - return ImmutableSet.copyOf(elms); - } -} -- cgit 1.2.3-korg