Class AvroItemWriterBuilder<T>

java.lang.Object
org.springframework.batch.item.avro.builder.AvroItemWriterBuilder<T>

public class AvroItemWriterBuilder<T> extends Object
A builder implementation for the AvroItemWriter.
Since:
4.2
Author:
David Turanski, Mahmoud Ben Hassine
  • Constructor Details

    • AvroItemWriterBuilder

      public AvroItemWriterBuilder()
  • Method Details

    • resource

      public AvroItemWriterBuilder<T> resource(org.springframework.core.io.WritableResource resource)
      Parameters:
      resource - the WritableResource used to write the serialized data.
      Returns:
      The current instance of the builder.
    • schema

      public AvroItemWriterBuilder<T> schema(org.springframework.core.io.Resource schema)
      Parameters:
      schema - the Resource containing the schema JSON used to serialize the output.
      Returns:
      The current instance of the builder.
    • schema

      public AvroItemWriterBuilder<T> schema(String schemaString)
      Parameters:
      schemaString - the String containing the schema JSON used to serialize the output.
      Returns:
      The current instance of the builder.
    • type

      public AvroItemWriterBuilder<T> type(Class<T> type)
      Parameters:
      type - the Class of objects to be serialized.
      Returns:
      The current instance of the builder.
    • name

      public AvroItemWriterBuilder<T> name(String name)
      The name used to calculate the key within the ExecutionContext.
      Parameters:
      name - name of the reader instance
      Returns:
      The current instance of the builder.
      See Also:
    • build

      public AvroItemWriter<T> build()
      Build an instance of AvroItemWriter.
      Returns:
      the instance;