Package org.apache.nemo.common.coder
Interface DecoderFactory<T>
-
- Type Parameters:
T
- element type.
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
BeamDecoderFactory
,BytesDecoderFactory
,DecoderFactory.DummyDecoderFactory
,IntDecoderFactory
,LongDecoderFactory
,NemoEventDecoderFactory
,PairDecoderFactory
public interface DecoderFactory<T> extends java.io.Serializable
A decoder factory object which generates decoders that decode byte streams into values of typeT
. To avoid generating instance-based coder such as Spark serializer for every decoding, user need to instantiate a decoder instance and use it.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
DecoderFactory.Decoder<T>
Interface of Decoder.static class
DecoderFactory.DummyDecoderFactory
Dummy coder factory implementation which is not supposed to be used.
-
Field Summary
Fields Modifier and Type Field Description static DecoderFactory
DUMMY_DECODER_FACTORY
Dummy coder factory.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DecoderFactory.Decoder<T>
create(java.io.InputStream inputStream)
Get a decoder instance.
-
-
-
Field Detail
-
DUMMY_DECODER_FACTORY
static final DecoderFactory DUMMY_DECODER_FACTORY
Dummy coder factory.
-
-
Method Detail
-
create
DecoderFactory.Decoder<T> create(java.io.InputStream inputStream) throws java.io.IOException
Get a decoder instance.- Parameters:
inputStream
- the input stream to decode.- Returns:
- the decoder instance.
- Throws:
java.io.IOException
- if fail to get the instance.
-
-