public abstract class AbstractGryoClassResolver extends Object implements org.apache.tinkerpop.shaded.kryo.ClassResolver
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 org.apache.tinkerpop.shaded.kryo.util.IdentityObjectIntMap<Class> |
classToNameId |
protected org.apache.tinkerpop.shaded.kryo.util.ObjectMap<Class,org.apache.tinkerpop.shaded.kryo.Registration> |
classToRegistration |
protected org.apache.tinkerpop.shaded.kryo.util.IntMap<org.apache.tinkerpop.shaded.kryo.Registration> |
idToRegistration |
protected org.apache.tinkerpop.shaded.kryo.Kryo |
kryo |
static byte |
NAME |
protected org.apache.tinkerpop.shaded.kryo.util.IntMap<Class> |
nameIdToClass |
protected org.apache.tinkerpop.shaded.kryo.util.ObjectMap<String,Class> |
nameToClass |
protected int |
nextNameId |
Constructor and Description |
---|
AbstractGryoClassResolver() |
Modifier and Type | Method and Description |
---|---|
abstract Class |
coerceType(Class clazz)
Called from
getRegistration(Class) to determine the actual type. |
org.apache.tinkerpop.shaded.kryo.Registration |
getRegistration(Class clazz) |
org.apache.tinkerpop.shaded.kryo.Registration |
getRegistration(int classID) |
protected Class<?> |
getTypeByName(String className) |
org.apache.tinkerpop.shaded.kryo.Registration |
readClass(org.apache.tinkerpop.shaded.kryo.io.Input input) |
protected org.apache.tinkerpop.shaded.kryo.Registration |
readName(org.apache.tinkerpop.shaded.kryo.io.Input input) |
org.apache.tinkerpop.shaded.kryo.Registration |
register(org.apache.tinkerpop.shaded.kryo.Registration registration) |
org.apache.tinkerpop.shaded.kryo.Registration |
registerImplicit(Class type) |
void |
reset() |
void |
setKryo(org.apache.tinkerpop.shaded.kryo.Kryo kryo) |
org.apache.tinkerpop.shaded.kryo.Registration |
writeClass(org.apache.tinkerpop.shaded.kryo.io.Output output,
Class type) |
protected void |
writeName(org.apache.tinkerpop.shaded.kryo.io.Output output,
Class type) |
public static final byte NAME
protected org.apache.tinkerpop.shaded.kryo.Kryo kryo
protected final org.apache.tinkerpop.shaded.kryo.util.IntMap<org.apache.tinkerpop.shaded.kryo.Registration> idToRegistration
protected final org.apache.tinkerpop.shaded.kryo.util.ObjectMap<Class,org.apache.tinkerpop.shaded.kryo.Registration> classToRegistration
protected org.apache.tinkerpop.shaded.kryo.util.IdentityObjectIntMap<Class> classToNameId
protected org.apache.tinkerpop.shaded.kryo.util.IntMap<Class> nameIdToClass
protected int nextNameId
public void setKryo(org.apache.tinkerpop.shaded.kryo.Kryo kryo)
setKryo
in interface org.apache.tinkerpop.shaded.kryo.ClassResolver
public org.apache.tinkerpop.shaded.kryo.Registration register(org.apache.tinkerpop.shaded.kryo.Registration registration)
register
in interface org.apache.tinkerpop.shaded.kryo.ClassResolver
public org.apache.tinkerpop.shaded.kryo.Registration registerImplicit(Class type)
registerImplicit
in interface org.apache.tinkerpop.shaded.kryo.ClassResolver
public abstract Class coerceType(Class clazz)
getRegistration(Class)
to determine the actual type.public org.apache.tinkerpop.shaded.kryo.Registration getRegistration(Class clazz)
getRegistration
in interface org.apache.tinkerpop.shaded.kryo.ClassResolver
public org.apache.tinkerpop.shaded.kryo.Registration getRegistration(int classID)
getRegistration
in interface org.apache.tinkerpop.shaded.kryo.ClassResolver
public org.apache.tinkerpop.shaded.kryo.Registration writeClass(org.apache.tinkerpop.shaded.kryo.io.Output output, Class type)
writeClass
in interface org.apache.tinkerpop.shaded.kryo.ClassResolver
protected void writeName(org.apache.tinkerpop.shaded.kryo.io.Output output, Class type)
public org.apache.tinkerpop.shaded.kryo.Registration readClass(org.apache.tinkerpop.shaded.kryo.io.Input input)
readClass
in interface org.apache.tinkerpop.shaded.kryo.ClassResolver
protected org.apache.tinkerpop.shaded.kryo.Registration readName(org.apache.tinkerpop.shaded.kryo.io.Input input)
public void reset()
reset
in interface org.apache.tinkerpop.shaded.kryo.ClassResolver
Copyright © 2013–2022 Apache Software Foundation. All rights reserved.