Package org.apache.parquet.format.event
Class Consumers
- java.lang.Object
-
- org.apache.parquet.format.event.Consumers
-
public class Consumers extends Object
Entry point for reading thrift in a streaming fashion
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceConsumers.Consumer<T>To consume objects coming from a DelegatingFieldConsumerstatic classConsumers.DelegatingFieldConsumerDelegates reading the field to TypedConsumers.
-
Constructor Summary
Constructors Constructor Description Consumers()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Consumers.DelegatingFieldConsumerfieldConsumer()call onField on the resulting DelegatingFieldConsumer to handle individual fieldsstatic TypedConsumer.ListConsumerlistElementsOf(TypedConsumer consumer)To consume list elements one by onestatic <T extends org.apache.thrift.TBase<T,? extends org.apache.thrift.TFieldIdEnum>>
TypedConsumer.ListConsumerlistOf(Class<T> c, Consumers.Consumer<List<T>> consumer)To consume a list of elementsstatic <T extends org.apache.thrift.TBase<T,? extends org.apache.thrift.TFieldIdEnum>>
TypedConsumer.StructConsumerstruct(Class<T> c, Consumers.Consumer<T> consumer)
-
-
-
Method Detail
-
fieldConsumer
public static Consumers.DelegatingFieldConsumer fieldConsumer()
call onField on the resulting DelegatingFieldConsumer to handle individual fields- Returns:
- a new DelegatingFieldConsumer
-
listOf
public static <T extends org.apache.thrift.TBase<T,? extends org.apache.thrift.TFieldIdEnum>> TypedConsumer.ListConsumer listOf(Class<T> c, Consumers.Consumer<List<T>> consumer)
To consume a list of elements- Type Parameters:
T- the type of the list content- Parameters:
c- the class of the list contentconsumer- the consumer that will receive the list- Returns:
- a ListConsumer that can be passed to the DelegatingFieldConsumer
-
listElementsOf
public static TypedConsumer.ListConsumer listElementsOf(TypedConsumer consumer)
To consume list elements one by one- Parameters:
consumer- the consumer that will read the elements- Returns:
- a ListConsumer that can be passed to the DelegatingFieldConsumer
-
struct
public static <T extends org.apache.thrift.TBase<T,? extends org.apache.thrift.TFieldIdEnum>> TypedConsumer.StructConsumer struct(Class<T> c, Consumers.Consumer<T> consumer)
-
-