public class AvroItemReaderBuilder<T>
extends java.lang.Object
AvroItemReader.| Constructor and Description |
|---|
AvroItemReaderBuilder() |
| Modifier and Type | Method and Description |
|---|---|
AvroItemReader<T> |
build()
Build an instance of
AvroItemReader. |
AvroItemReaderBuilder<T> |
currentItemCount(int currentItemCount)
Index for the current item.
|
AvroItemReaderBuilder<T> |
embeddedSchema(boolean embeddedSchema)
Disable or enable reading an embedded Avro schema.
|
AvroItemReaderBuilder<T> |
maxItemCount(int maxItemCount)
Configure the max number of items to be read.
|
AvroItemReaderBuilder<T> |
name(java.lang.String name)
The name used to calculate the key within the
ExecutionContext. |
AvroItemReaderBuilder<T> |
resource(org.springframework.core.io.Resource resource)
Configure a
Resource containing Avro serialized objects. |
AvroItemReaderBuilder<T> |
saveState(boolean saveState)
Configure if the state of the
ItemStreamSupport
should be persisted within the ExecutionContext
for restart purposes. |
AvroItemReaderBuilder<T> |
schema(org.springframework.core.io.Resource schema)
Configure an Avro
Schema from a Resource. |
AvroItemReaderBuilder<T> |
schema(java.lang.String schemaString)
Configure an Avro
Schema from a String. |
AvroItemReaderBuilder<T> |
type(java.lang.Class<T> type)
Configure a type to be deserialized.
|
public AvroItemReaderBuilder<T> resource(org.springframework.core.io.Resource resource)
Resource containing Avro serialized objects.resource - an existing Resource.public AvroItemReaderBuilder<T> schema(org.springframework.core.io.Resource schema)
Schema from a Resource.schema - an existing schema Resource.public AvroItemReaderBuilder<T> schema(java.lang.String schemaString)
Schema from a String.schemaString - the schema String.public AvroItemReaderBuilder<T> type(java.lang.Class<T> type)
type - the class to be deserialized.public AvroItemReaderBuilder<T> embeddedSchema(boolean embeddedSchema)
embeddedSchema - set to false to if the input does not contain an Avro schema.public AvroItemReaderBuilder<T> saveState(boolean saveState)
ItemStreamSupport
should be persisted within the ExecutionContext
for restart purposes.saveState - defaults to truepublic AvroItemReaderBuilder<T> name(java.lang.String name)
ExecutionContext. Required if
saveState(boolean) is set to true.name - name of the reader instanceItemStreamSupport.setName(String)public AvroItemReaderBuilder<T> maxItemCount(int maxItemCount)
maxItemCount - the max items to be readAbstractItemCountingItemStreamItemReader.setMaxItemCount(int)public AvroItemReaderBuilder<T> currentItemCount(int currentItemCount)
currentItemCount - current indexAbstractItemCountingItemStreamItemReader.setCurrentItemCount(int)public AvroItemReader<T> build()
AvroItemReader.