Class KryoShimServiceLoader
java.lang.Object
org.apache.tinkerpop.gremlin.structure.io.gryo.kryoshim.KryoShimServiceLoader
Loads the highest-priority or user-selected
KryoShimService.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSet this system property to the fully-qualified name of aKryoShimServicepackage-and-classname to force it into service. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyConfiguration(org.apache.commons.configuration2.Configuration configuration) static voidclose()static <T> TreadClassAndObject(InputStream inputStream) A loose abstraction ofKryo.readClassAndObject(org.apache.tinkerpop.shaded.kryo.io.Input), where theinputparameter issource.static byte[]writeClassAndObjectToBytes(Object object) A loose abstraction ofKryo.writeClassAndObject(org.apache.tinkerpop.shaded.kryo.io.Output, java.lang.Object), where theoutputparameter is an internally-createdByteArrayOutputStream.
-
Field Details
-
KRYO_SHIM_SERVICE
Set this system property to the fully-qualified name of aKryoShimServicepackage-and-classname to force it into service. Setting this property causes the priority-selection mechanism (KryoShimService.getPriority()) to be ignored.- See Also:
-
-
Constructor Details
-
KryoShimServiceLoader
public KryoShimServiceLoader()
-
-
Method Details
-
applyConfiguration
public static void applyConfiguration(org.apache.commons.configuration2.Configuration configuration) -
close
public static void close() -
writeClassAndObjectToBytes
A loose abstraction ofKryo.writeClassAndObject(org.apache.tinkerpop.shaded.kryo.io.Output, java.lang.Object), where theoutputparameter is an internally-createdByteArrayOutputStream. Returns the byte array underlying that stream.- Parameters:
object- an object for which the instance and class are serialized- Returns:
- the serialized form
-
readClassAndObject
A loose abstraction ofKryo.readClassAndObject(org.apache.tinkerpop.shaded.kryo.io.Input), where theinputparameter issource. 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
-