private static Object readUserDataSerializable(final DataInput in, int classId) throws IOException { Instantiator instantiator = InternalInstantiator.getInstantiator(classId); if (instantiator == null) { logger.error(LogMarker.SERIALIZER_MARKER, "No Instantiator has been registered for class with id {}", classId); throw new IOException( String.format("No Instantiator has been registered for class with id %s", classId)); } else { try { DataSerializable ds; if (instantiator instanceof CanonicalInstantiator) { CanonicalInstantiator ci = (CanonicalInstantiator) instantiator; ds = ci.newInstance(in); } else { ds = instantiator.newInstance(); } ds.fromData(in); return ds; } catch (Exception ex) { throw new SerializationException( String.format("Could not deserialize an instance of %s", instantiator.getInstantiatedClass().getName()), ex); } } }
Instantiator instantiator = InternalInstantiator.getInstantiator(in.readByte()); return "org.apache.geode.Instantiator:" + instantiator.getInstantiatedClass().getName(); Instantiator instantiator = InternalInstantiator.getInstantiator(in.readShort()); return "org.apache.geode.Instantiator:" + instantiator.getInstantiatedClass().getName(); Instantiator instantiator = InternalInstantiator.getInstantiator(in.readInt()); return "org.apache.geode.Instantiator:" + instantiator.getInstantiatedClass().getName();