|KryoShim<I extends InputShim,O extends OutputShim>||
This interface exists to decouple HadoopPools from TinkerPop's shaded Kryo.
Loads the highest-priority or user-selected
Kryo is often shaded. For instance, TinkerPop's Gryo serializer relies on a shaded Kryo package. TinkerPop serializers written against a particular shaded Kryo package (or an unshaded Kryo package) are compatible only with that package. In contrast, TinkerPop serializers written against this abstraction can be used with any shaded or unshaded Kryo package, so long as the signatures and behavior of the methods in this package remain stable.
To show how this is useful, consider
This class has logic unique to TinkerPop that performs
efficient and forward-compatible serialization of
instances. It takes advantage of package-level visibility
and the fact that it shares a package with its target,
so it would be challenging to cleanly and naturally replicate
(i.e. without package spoofing or runtime visibility overrides).
instead of, say, Gryo's shaded
such a serializer can be used with anybody's Kryo package,
regardless of whether
that package is shaded or not. This lets third-parties reuse
TinkerPop's efficient, internals-aware StarGraph serializer on
their own serialization platform (and without altering
TinkerPop's bytecode, let alone its source).
The number of types and methods in this package is deliberately small to reduce the likelihood of a new Kryo release introducing an incompatible change.
Copyright © 2013–2020 Apache Software Foundation. All rights reserved.