com.hazelcast.jet.pipeline

## Interface SourceBuilder.SourceBuffer<T>

- Type Parameters:
    `T` - type of the emitted item
  All Known Subinterfaces:
    SourceBuilder.TimestampedSourceBuffer<T>
  Enclosing class:
    SourceBuilder<C>

      public static interface SourceBuilder.SourceBuffer<T>

  The buffer object that the `fillBufferFn` gets on each call. Used in sources that emit items without a timestamp.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(T item)` Adds an item to the buffer.
    `void` | `close()` Closes the buffer, signaling that all items have been emitted.
    `int` | `size()` Returns the number of items the buffer holds.

- - ### Method Detail

    - #### size

          int size()

      Returns the number of items the buffer holds.

    - #### close

          void close()
              throws JetException

      Closes the buffer, signaling that all items have been emitted. Only SourceBuilder.batch(java.lang.String, com.hazelcast.jet.function.FunctionEx<? super com.hazelcast.jet.core.Processor.Context, ? extends C>) sources are allowed to call this method.
      Throws:
        `JetException` - if the source is a streaming source

    - #### add

          void add(@Nonnull
                   T item)

      Adds an item to the buffer.

Copyright © 2020. All rights reserved.