Class KryoShimServiceLoader


  • public class KryoShimServiceLoader
    extends Object
    Loads the highest-priority or user-selected KryoShimService.
    • Constructor Detail

      • KryoShimServiceLoader

        public KryoShimServiceLoader()
    • Method Detail

      • applyConfiguration

        public static void applyConfiguration​(org.apache.commons.configuration2.Configuration configuration)
      • close

        public static void close()
      • writeClassAndObjectToBytes

        public static byte[] writeClassAndObjectToBytes​(Object object)
        A loose abstraction of Kryo.writeClassAndObject(org.apache.tinkerpop.shaded.kryo.io.Output, java.lang.Object), where the output parameter is an internally-created ByteArrayOutputStream. Returns the byte array underlying that stream.
        Parameters:
        object - an object for which the instance and class are serialized
        Returns:
        the serialized form
      • readClassAndObject

        public static <T> T readClassAndObject​(InputStream inputStream)
        A loose abstraction of Kryo.readClassAndObject(org.apache.tinkerpop.shaded.kryo.io.Input), where the input parameter is source. Returns the deserialized object.
        Type Parameters:
        T - the type to which the deserialized object is cast as it is returned
        Parameters:
        inputStream - an input stream containing data for a serialized object class and instance
        Returns:
        the deserialized object