public class KryoShimServiceLoader extends Object
KryoShimService.| Modifier and Type | Field and Description |
|---|---|
static String |
KRYO_SHIM_SERVICE
Set this system property to the fully-qualified name of a
KryoShimService
package-and-classname to force it into service. |
| Constructor and Description |
|---|
KryoShimServiceLoader() |
| Modifier and Type | Method and Description |
|---|---|
static void |
applyConfiguration(Configuration conf) |
static KryoShimService |
load()
Equivalent to
load(boolean) with the parameter true. |
static KryoShimService |
load(boolean forceReload)
Return a reference to the shim service.
|
static <T> T |
readClassAndObject(InputStream source)
A loose abstraction of
org.apache.tinkerpop.shaded.kryo.Kryo#readClassAndObject(Input),
where the input parameter is source. |
static byte[] |
writeClassAndObjectToBytes(Object o)
A loose abstraction of
org.apache.tinkerpop.shaded.kryo.Kryo#writeClassAndObject(Output, Object),
where the output parameter is an internally-created ByteArrayOutputStream. |
public static final String KRYO_SHIM_SERVICE
KryoShimService
package-and-classname to force it into service. Setting this property causes the
priority-selection mechanism (KryoShimService.getPriority()) to be ignored.public static void applyConfiguration(Configuration conf)
public static KryoShimService load(boolean forceReload)
forceReload is true. Calls to this method need not be externally
synchonized.forceReload - if false, this method may use its internal service cache; if true,
this method must ignore cache, and it must invoke ServiceLoader.reload()
before selecting a new service to returnpublic static KryoShimService load()
load(boolean) with the parameter true.public static byte[] writeClassAndObjectToBytes(Object o)
org.apache.tinkerpop.shaded.kryo.Kryo#writeClassAndObject(Output, Object),
where the output parameter is an internally-created ByteArrayOutputStream. Returns
the byte array underlying that stream.o - an object for which the instance and class are serializedpublic static <T> T readClassAndObject(InputStream source)
org.apache.tinkerpop.shaded.kryo.Kryo#readClassAndObject(Input),
where the input parameter is source. Returns the deserialized object.T - the type to which the deserialized object is cast as it is returnedsource - an input stream containing data for a serialized object class and instanceCopyright © 2013–2016 Apache Software Foundation. All rights reserved.