public class GryoClassResolver extends Object
ClassResolver
helps ensure that all Vertex and Edge concrete classes
get properly serialized and deserialized by stripping them of their concrete class name so that they are treated
generically. See the getRegistration(Class)
method for the core of this logic.Modifier and Type | Field and Description |
---|---|
protected <any> |
classToNameId |
protected <any> |
classToRegistration |
protected <any> |
idToRegistration |
protected Kryo |
kryo |
static byte |
NAME |
protected <any> |
nameIdToClass |
protected <any> |
nameToClass |
protected int |
nextNameId |
Constructor and Description |
---|
GryoClassResolver() |
Modifier and Type | Method and Description |
---|---|
Registration |
getRegistration(Class clazz) |
Registration |
getRegistration(int classID) |
protected Class<?> |
getTypeByName(String className) |
Registration |
readClass(Input input) |
protected Registration |
readName(Input input) |
Registration |
register(Registration registration) |
Registration |
registerImplicit(Class type) |
void |
reset() |
void |
setKryo(Kryo kryo) |
Registration |
writeClass(Output output,
Class type) |
protected void |
writeName(Output output,
Class type) |
public static final byte NAME
protected Kryo kryo
protected final <any> idToRegistration
protected final <any> classToRegistration
protected <any> classToNameId
protected <any> nameIdToClass
protected <any> nameToClass
protected int nextNameId
public void setKryo(Kryo kryo)
public Registration register(Registration registration)
public Registration registerImplicit(Class type)
public Registration getRegistration(Class clazz)
public Registration getRegistration(int classID)
public Registration writeClass(Output output, Class type)
protected void writeName(Output output, Class type)
public Registration readClass(Input input)
protected Registration readName(Input input)
public void reset()
Copyright © 2013–2018 Apache Software Foundation. All rights reserved.