Package org.apache.vinci.transport
Class SimpleTransportable
java.lang.Object
org.apache.vinci.transport.SimpleTransportable
- All Implemented Interfaces:
Transportable
SimpleTransportable is an immutable Transportable object that simply writes a byte buffer for its
toStream implementation. It can be used for creating lightweight copies of more heavy-weight
documents for high performance and simplified synchronization. Because it is immutable, the
fromStream() method of this class throws an unchecked exception if invoked.
-
Constructor Summary
ConstructorDescriptionSimpleTransportable
(Transportable convert_me) Create a SimpleTransportable that is an immutable copy of the provided Transportable object. -
Method Summary
Modifier and TypeMethodDescriptionNot implemented (throws UnsupportedOperationException if invoked) to preserve immutability.void
toStream
(OutputStream os) Write the object to the output stream.
-
Constructor Details
-
SimpleTransportable
Create a SimpleTransportable that is an immutable copy of the provided Transportable object.- Parameters:
convert_me
- -
-
-
Method Details
-
toStream
Description copied from interface:Transportable
Write the object to the output stream.- Specified by:
toStream
in interfaceTransportable
- Parameters:
os
- The stream to write into.- Throws:
IOException
- -
-
fromStream
Not implemented (throws UnsupportedOperationException if invoked) to preserve immutability.- Specified by:
fromStream
in interfaceTransportable
- Parameters:
os
- The stream to read from.- Returns:
- -
- Throws:
UnsupportedOperationException
- thrown unconditionally.IOException
- -
-