]
Ryan Emerson updated ISPN-9624:
-------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request:
Deprecate StreamingMarshaller interface
---------------------------------------
Key: ISPN-9624
URL:
https://issues.jboss.org/browse/ISPN-9624
Project: Infinispan
Issue Type: Sub-task
Components: Core
Affects Versions: 9.4.0.Final
Reporter: Ryan Emerson
Assignee: Ryan Emerson
Priority: Major
Fix For: 10.0.0.Alpha1
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.
{code:java}
@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;
}
{code}