public class HadoopKryo
extends com.esotericsoftware.kryo.Kryo
Modifier and Type | Method and Description |
---|---|
static <T> T |
createCopy(T object)
Create copy of the object, by magically recursively copying
all of its fields, keeping reference structures (like cycles)
|
static HadoopKryo |
getNontrackingKryo()
Returns a kryo which doesn't track objects, hence
serialization of recursive/nested objects is not
supported.
|
static <T> T |
readClassAndObj(DataInput in)
Read object from the input stream, by reading first type of the object,
and then all of its fields.
|
static void |
readIntoObject(DataInput in,
Object object)
Reads an object, from input, into a given object,
allowing object reuse.
|
static <T> T |
readWithKryo(HadoopKryo kryo,
com.esotericsoftware.kryo.io.Input in)
Reads class and object from specified input stream with
specified kryo object.
|
static void |
readWithKryoIntoObject(HadoopKryo kryo,
com.esotericsoftware.kryo.io.Input in,
Object object)
Read into object with given kryo.
|
static void |
writeClassAndObj(DataOutput out,
Object object)
Write type of given object and the object itself to the output stream.
|
static void |
writeOutOfObject(DataOutput out,
Object object)
Write an object to output, in a way that can be read by readIntoObject.
|
static void |
writeWithKryo(HadoopKryo kryo,
com.esotericsoftware.kryo.io.Output out,
Object object)
Writes class and object to specified output stream with specified
Kryo object.
|
static void |
writeWithKryoOutOfObject(HadoopKryo kryo,
com.esotericsoftware.kryo.io.Output out,
Object object)
Write out of object with given kryo
|
addDefaultSerializer, addDefaultSerializer, addDefaultSerializer, copy, copy, copyShallow, copyShallow, getAsmEnabled, getClassLoader, getClassResolver, getContext, getDefaultSerializer, getDefaultSerializerForAnnotatedType, getDepth, getFieldSerializerConfig, getGenericsResolver, getGraphContext, getInstantiatorStrategy, getNextRegistrationId, getOriginalToCopyMap, getReferenceResolver, getReferences, getRegistration, getRegistration, getSerializer, getStreamFactory, getTaggedFieldSerializerConfig, isClosure, isFinal, isRegistrationRequired, isWarnUnregisteredClasses, newDefaultSerializer, newInstance, newInstantiator, readClass, readClassAndObject, readObject, readObject, readObjectOrNull, readObjectOrNull, reference, register, register, register, register, register, reset, setAsmEnabled, setAutoReset, setClassLoader, setCopyReferences, setDefaultSerializer, setDefaultSerializer, setInstantiatorStrategy, setMaxDepth, setReferenceResolver, setReferences, setRegistrationRequired, setStreamFactory, setWarnUnregisteredClasses, unregisteredClassMessage, writeClass, writeClassAndObject, writeObject, writeObject, writeObjectOrNull, writeObjectOrNull
public static void writeClassAndObj(DataOutput out, Object object)
out
- Output streamobject
- Object to writepublic static <T> T readClassAndObj(DataInput in)
T
- Type of the object being readin
- Input streampublic static void writeOutOfObject(DataOutput out, Object object)
out
- Output streamobject
- Object to be writtenpublic static void readIntoObject(DataInput in, Object object)
in
- Input streamobject
- Object to fill from inputpublic static void writeWithKryo(HadoopKryo kryo, com.esotericsoftware.kryo.io.Output out, Object object)
kryo
- Kryo objectout
- Output streamobject
- Objectpublic static void writeWithKryoOutOfObject(HadoopKryo kryo, com.esotericsoftware.kryo.io.Output out, Object object)
kryo
- Kryo objectout
- Outputobject
- Object to writepublic static <T> T readWithKryo(HadoopKryo kryo, com.esotericsoftware.kryo.io.Input in)
T
- Object type parameterkryo
- Kryo objectin
- Input bufferpublic static void readWithKryoIntoObject(HadoopKryo kryo, com.esotericsoftware.kryo.io.Input in, Object object)
kryo
- Kryo objectin
- Inputobject
- Object to read intopublic static <T> T createCopy(T object)
T
- Type of the objectobject
- Object to be copiedpublic static HadoopKryo getNontrackingKryo()
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.