/** Name/value pairs that are available to all serializers. */ public ObjectMap getContext () { if (context == null) context = new ObjectMap(); return context; }
/** Name/value pairs that are available to all serializers and are cleared after each object graph is serialized or * deserialized. */ public ObjectMap getGraphContext () { if (graphContext == null) graphContext = new ObjectMap(); return graphContext; }
/** Name/value pairs that are available to all serializers. */ public ObjectMap getContext () { if (context == null) context = new ObjectMap(); return context; }
/** Name/value pairs that are available to all serializers. */ public ObjectMap getContext () { if (context == null) context = new ObjectMap(); return context; }
/** Name/value pairs that are available to all serializers and are cleared after each object graph is serialized or * deserialized. */ public ObjectMap getGraphContext () { if (graphContext == null) graphContext = new ObjectMap(); return graphContext; }
/** Name/value pairs that are available to all serializers and are cleared after each object graph is serialized or * deserialized. */ public ObjectMap getGraphContext () { if (graphContext == null) graphContext = new ObjectMap(); return graphContext; }
/** Name/value pairs that are available to all serializers. */ public ObjectMap getContext () { if (context == null) context = new ObjectMap(); return context; }
/** Name/value pairs that are available to all serializers and are cleared after each object graph is serialized or * deserialized. */ public ObjectMap getGraphContext () { if (graphContext == null) graphContext = new ObjectMap(); return graphContext; }
private JavaSerializer getCachedSerializer (Class type) { if (javaSerializerByType == null) { javaSerializerByType = new ObjectMap<Class, JavaSerializer>(); return null; } return javaSerializerByType.get(type); }
private JavaSerializer getCachedSerializer (Class type) { if (javaSerializerByType == null) { javaSerializerByType = new ObjectMap<Class, JavaSerializer>(); return null; } return javaSerializerByType.get(type); }
private JavaSerializer getCachedSerializer (Class type) { if (javaSerializerByType == null) { javaSerializerByType = new ObjectMap<Class, JavaSerializer>(); return null; } return javaSerializerByType.get(type); }
protected Registration readName(final Input input) { final int nameId = input.readVarInt(true); if (nameIdToClass == null) nameIdToClass = new IntMap<>(); Class type = nameIdToClass.get(nameId); if (type == null) { // Only read the class name the first time encountered in object graph. final String className = input.readString(); type = getTypeByName(className); if (type == null) { try { type = Class.forName(className, false, kryo.getClassLoader()); } catch (ClassNotFoundException ex) { throw new KryoException("Unable to find class: " + className, ex); } if (nameToClass == null) nameToClass = new ObjectMap<>(); nameToClass.put(className, type); } nameIdToClass.put(nameId, type); } return kryo.getRegistration(type); }
protected Registration readName (Input input) { int nameId = input.readVarInt(true); if (nameIdToClass == null) nameIdToClass = new IntMap(); Class type = nameIdToClass.get(nameId); if (type == null) { // Only read the class name the first time encountered in object graph. String className = input.readString(); type = getTypeByName(className); if (type == null) { try { type = Class.forName(className, false, kryo.getClassLoader()); } catch (ClassNotFoundException ex) { if (WARN) warn("kryo", "Unable to load class " + className + " with kryo's ClassLoader. Retrying with current.."); try { type = Class.forName(className); } catch (ClassNotFoundException e) { throw new KryoException("Unable to find class: " + className, ex); } } if (nameToClass == null) nameToClass = new ObjectMap(); nameToClass.put(className, type); } nameIdToClass.put(nameId, type); if (TRACE) trace("kryo", "Read class name: " + className); } else { if (TRACE) trace("kryo", "Read class name reference " + nameId + ": " + className(type)); } return kryo.getRegistration(type); }
protected Registration readName (Input input) { int nameId = input.readVarInt(true); if (nameIdToClass == null) nameIdToClass = new IntMap(); Class type = nameIdToClass.get(nameId); if (type == null) { // Only read the class name the first time encountered in object graph. String className = input.readString(); type = getTypeByName(className); if (type == null) { try { type = Class.forName(className, false, kryo.getClassLoader()); } catch (ClassNotFoundException ex) { if (WARN) warn("kryo", "Unable to load class " + className + " with kryo's ClassLoader. Retrying with current.."); try { type = Class.forName(className); } catch (ClassNotFoundException e) { throw new KryoException("Unable to find class: " + className, ex); } } if (nameToClass == null) nameToClass = new ObjectMap(); nameToClass.put(className, type); } nameIdToClass.put(nameId, type); if (TRACE) trace("kryo", "Read class name: " + className); } else { if (TRACE) trace("kryo", "Read class name reference " + nameId + ": " + className(type)); } return kryo.getRegistration(type); }
protected Registration readName (Input input) { int nameId = input.readVarInt(true); if (nameIdToClass == null) nameIdToClass = new IntMap(); Class type = nameIdToClass.get(nameId); if (type == null) { // Only read the class name the first time encountered in object graph. String className = input.readString(); type = getTypeByName(className); if (type == null) { try { type = Class.forName(className, false, kryo.getClassLoader()); } catch (ClassNotFoundException ex) { throw new KryoException("Unable to find class: " + className, ex); } if (nameToClass == null) nameToClass = new ObjectMap(); nameToClass.put(className, type); } nameIdToClass.put(nameId, type); if (TRACE) trace("kryo", "Read class name: " + className); } else { if (TRACE) trace("kryo", "Read class name reference " + nameId + ": " + className(type)); } return kryo.getRegistration(type); }
protected Registration readName (Input input) { int nameId = input.readVarInt(true); if (nameIdToClass == null) nameIdToClass = new IntMap(); Class type = nameIdToClass.get(nameId); if (type == null) { // Only read the class name the first time encountered in object graph. String className = input.readString(); if (nameToClass != null) type = nameToClass.get(className); if (type == null) { try { type = Class.forName(className, false, kryo.getClassLoader()); } catch (ClassNotFoundException ex) { throw new KryoException("Unable to find class: " + className, ex); } if (nameToClass == null) nameToClass = new ObjectMap(); nameToClass.put(className, type); } nameIdToClass.put(nameId, type); if (TRACE) trace("kryo", "Read class name: " + className); } else { if (TRACE) trace("kryo", "Read class name reference " + nameId + ": " + className(type)); } return kryo.getRegistration(type); }