-
Sub-task
-
Resolution: Done
-
Major
-
9.4.0.Final
-
None
-
Sprint 10.0.0.Alpha1, Sprint 10.0.0.Alpha2, Sprint 10.0.0.Beta1, DataGrid Sprint #29, DataGrid Sprint #30, DataGrid Sprint #39
The StreamingMarshaller interface is no longer fit for purpose once we move away from jboss-marshalling as the ObjectOutput abstraction does not fit with non-serialization based marshallers. We should provide a simpler interface that simply allows reading/writing objects to a provided stream. This interface should then be exposed via the InitializationContext to store implementations.
@ThreadSafe public interface StreamAwareMarshaller extends Marshaller { /** * Marshall an object to the {@link OutputStream} * * @param o the object to write to the {@link OutputStream} * @param out the {@link OutputStream} to write the object to * @throws IOException if the object cannot be marshalled to the {@link OutputStream} due to some I/O error */ void writeObject(Object o, OutputStream out) throws IOException; /** * Unmarshall an object from the {@link InputStream} * * @param in the {@link InputStream} to unmarshall an object from * @return the unmarshalled object instance * @throws IOException if unmarshalling cannot complete due to some I/O error * @throws ClassNotFoundException if the class of the object trying to unmarshall is not found */ Object readObject(InputStream in) throws ClassNotFoundException, IOException; }