X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=third-party%2Fatomix%2Fstorage%2Fsrc%2Fmain%2Fjava%2Fio%2Fatomix%2Futils%2Fserializer%2FNamespace.java;h=f62ba084ca901fa339e6d35aeb1cb67dc6d2c8bb;hb=4655e7278357e5b14c86bc24d61671d978475d47;hp=65ea034d1381e870ba7b48220dcc26a74dc328ac;hpb=ffb0efd1e471f04830a6020a2f2a025434386fc3;p=controller.git diff --git a/third-party/atomix/storage/src/main/java/io/atomix/utils/serializer/Namespace.java b/third-party/atomix/storage/src/main/java/io/atomix/utils/serializer/Namespace.java index 65ea034d13..f62ba084ca 100644 --- a/third-party/atomix/storage/src/main/java/io/atomix/utils/serializer/Namespace.java +++ b/third-party/atomix/storage/src/main/java/io/atomix/utils/serializer/Namespace.java @@ -151,19 +151,6 @@ public final class Namespace implements KryoFactory, KryoPool { return this; } - /** - * Registers classes to be serialized using Kryo default serializer. - * - * @param expectedTypes list of classes - * @return this - */ - public Builder register(final Class... expectedTypes) { - for (Class clazz : expectedTypes) { - types.add(Pair.of(new Class[]{clazz}, null)); - } - return this; - } - /** * Registers serializer for the given set of classes. *

@@ -179,41 +166,6 @@ public final class Namespace implements KryoFactory, KryoPool { return this; } - private Builder register(RegistrationBlock block) { - if (block.begin() != FLOATING_ID) { - // flush pending types - nextId(block.begin()); - blocks.add(block); - nextId(block.begin() + block.types().size()); - } else { - // flush pending types - final int addedBlockBegin = blockHeadId + types.size(); - nextId(addedBlockBegin); - blocks.add(new RegistrationBlock(addedBlockBegin, block.types())); - nextId(addedBlockBegin + block.types().size()); - } - return this; - } - - /** - * Registers all the class registered to given KryoNamespace. - * - * @param ns KryoNamespace - * @return this - */ - public Builder register(final Namespace ns) { - - if (blocks.containsAll(ns.registeredBlocks)) { - // Everything was already registered. - LOGGER.debug("Ignoring {}, already registered.", ns); - return this; - } - for (RegistrationBlock block : ns.registeredBlocks) { - this.register(block); - } - return this; - } - /** * Sets the namespace class loader. *