Package org.apache.nemo.common.coder
Class PairDecoderFactory<A extends java.io.Serializable,B extends java.io.Serializable>
- java.lang.Object
-
- org.apache.nemo.common.coder.PairDecoderFactory<A,B>
-
- Type Parameters:
A
- type for the left coder.B
- type for the right coder.
- All Implemented Interfaces:
java.io.Serializable
,DecoderFactory<Pair<A,B>>
public final class PairDecoderFactory<A extends java.io.Serializable,B extends java.io.Serializable> extends java.lang.Object implements DecoderFactory<Pair<A,B>>
An DecoderFactory forPair
. Reference: KvCoder in BEAM.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.nemo.common.coder.DecoderFactory
DecoderFactory.Decoder<T>, DecoderFactory.DummyDecoderFactory
-
-
Field Summary
-
Fields inherited from interface org.apache.nemo.common.coder.DecoderFactory
DUMMY_DECODER_FACTORY
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DecoderFactory.Decoder<Pair<A,B>>
create(java.io.InputStream inputStream)
Get a decoder instance.static <A extends java.io.Serializable,B extends java.io.Serializable>
PairDecoderFactory<A,B>of(DecoderFactory<A> leftDecoderFactory, DecoderFactory<B> rightDecoderFactory)
static initializer of the class.java.lang.String
toString()
-
-
-
Method Detail
-
of
public static <A extends java.io.Serializable,B extends java.io.Serializable> PairDecoderFactory<A,B> of(DecoderFactory<A> leftDecoderFactory, DecoderFactory<B> rightDecoderFactory)
static initializer of the class.- Type Parameters:
A
- type of the left element.B
- type of the right element.- Parameters:
leftDecoderFactory
- left coder.rightDecoderFactory
- right coder.- Returns:
- the new PairDecoderFactory.
-
create
public DecoderFactory.Decoder<Pair<A,B>> create(java.io.InputStream inputStream) throws java.io.IOException
Description copied from interface:DecoderFactory
Get a decoder instance.- Specified by:
create
in interfaceDecoderFactory<A extends java.io.Serializable>
- Parameters:
inputStream
- the input stream to decode.- Returns:
- the decoder instance.
- Throws:
java.io.IOException
- if fail to get the instance.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-