@Override public Serializer newDefaultSerializer( Kryo kryo, Class<?> type ) { return new CompatibleFieldSerializer( kryo, type ); }
public T read (Kryo kryo, Input input, Class<T> type) { T object = create(kryo, input, type); kryo.reference(object); ObjectMap context = kryo.getGraphContext(); CachedField[] allFields = getFields(); String schemaName = names[i]; for (int ii = 0, nn = allFields.length; ii < nn; ii++) { if (getCachedFieldName(allFields[ii]).equals(schemaName)) { fields[i] = allFields[ii]; continue outer; String midVal = getCachedFieldName(allFields[mid]); compare = schemaName.compareTo(midVal); boolean hasGenerics = getGenerics() != null; for (int i = 0, n = fields.length; i < n; i++) { CachedField cachedField = fields[i]; cachedField = getField(getCachedFieldName(cachedField));
public void write (Kryo kryo, Output output, T object) { CachedField[] fields = getFields(); ObjectMap context = kryo.getGraphContext(); if (!context.containsKey(this)) { context.put(this, null); if (TRACE) trace("kryo", "Write " + fields.length + " field names."); output.writeVarInt(fields.length, true); for (int i = 0, n = fields.length; i < n; i++) output.writeString(getCachedFieldName(fields[i])); } OutputChunked outputChunked = new OutputChunked(output, 1024); for (int i = 0, n = fields.length; i < n; i++) { fields[i].write(outputChunked, object); outputChunked.endChunks(); } }
public void write (Kryo kryo, Output output, T object) { CachedField[] fields = getFields(); ObjectMap context = kryo.getGraphContext(); if (!context.containsKey(this)) { context.put(this, null); if (TRACE) trace("kryo", "Write " + fields.length + " field names."); output.writeVarInt(fields.length, true); for (int i = 0, n = fields.length; i < n; i++) output.writeString(fields[i].field.getName()); } OutputChunked outputChunked = new OutputChunked(output, 1024); for (int i = 0, n = fields.length; i < n; i++) { fields[i].write(outputChunked, object); outputChunked.endChunks(); } }
public T read (Kryo kryo, Input input, Class<T> type) { T object = create(kryo, input, type); kryo.reference(object); ObjectMap context = kryo.getGraphContext(); CachedField[] allFields = getFields(); String schemaName = names[i]; for (int ii = 0, nn = allFields.length; ii < nn; ii++) { if (getCachedFieldName(allFields[ii]).equals(schemaName)) { fields[i] = allFields[ii]; continue outer; String midVal = getCachedFieldName(allFields[mid]); compare = schemaName.compareTo(midVal); boolean hasGenerics = getGenerics() != null; for (int i = 0, n = fields.length; i < n; i++) { CachedField cachedField = fields[i]; cachedField = getField(getCachedFieldName(cachedField));
public void write (Kryo kryo, Output output, T object) { CachedField[] fields = getFields(); ObjectMap context = kryo.getGraphContext(); if (!context.containsKey(this)) { context.put(this, null); if (TRACE) trace("kryo", "Write " + fields.length + " field names."); output.writeVarInt(fields.length, true); for (int i = 0, n = fields.length; i < n; i++) output.writeString(getCachedFieldName(fields[i])); } OutputChunked outputChunked = new OutputChunked(output, 1024); for (int i = 0, n = fields.length; i < n; i++) { fields[i].write(outputChunked, object); outputChunked.endChunks(); } }
public void write (Kryo kryo, Output output, T object) { CachedField[] fields = getFields(); ObjectMap context = kryo.getGraphContext(); if (!context.containsKey(this)) { context.put(this, null); if (TRACE) trace("kryo", "Write " + fields.length + " field names."); output.writeVarInt(fields.length, true); for (int i = 0, n = fields.length; i < n; i++) output.writeString(fields[i].field.getName()); } OutputChunked outputChunked = new OutputChunked(output, 1024); for (int i = 0, n = fields.length; i < n; i++) { fields[i].write(outputChunked, object); outputChunked.endChunks(); } }
public T read (Kryo kryo, Input input, Class<T> type) { T object = create(kryo, input, type); kryo.reference(object); ObjectMap context = kryo.getGraphContext(); CachedField[] allFields = getFields(); outer: for (int i = 0, n = names.length; i < n; i++) { boolean hasGenerics = getGenerics() != null; for (int i = 0, n = fields.length; i < n; i++) { CachedField cachedField = fields[i]; cachedField = getField(cachedField.field.getName());