Package org.apache.batchee.extras.transaction

## Class CountedReader

- java.lang.Object
- - org.apache.batchee.extras.transaction.CountedReader

- All Implemented Interfaces:
    `javax.batch.api.chunk.ItemReader`
  Direct Known Subclasses:
    `BeanIOReader`, `CommonsCsvReader`, `FlatFileItemReader`, `JacksonJsonReader`, `JSefaReader`, `JsonpReader`, `StaxItemReader`

      public abstract class CountedReader
      extends Object
      implements javax.batch.api.chunk.ItemReader

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected long` | `items` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CountedReader()` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Serializable` | `checkpointInfo()` |
    `protected abstract Object` | `doRead()` |
    `protected void` | `incrementCount​(int number)` |
    `protected void` | `incrementReaderCount()` |
    `void` | `open​(Serializable checkpoint)` |
    `Object` | `readItem()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface javax.batch.api.chunk.ItemReader

      `close`

- - ### Field Detail

    - #### items

          protected long items

  - ### Constructor Detail

    - #### CountedReader

          public CountedReader()

  - ### Method Detail

    - #### incrementReaderCount

          protected void incrementReaderCount()

    - #### incrementCount

          protected void incrementCount​(int number)

    - #### open

          public void open​(Serializable checkpoint)
                    throws Exception

      Specified by:
        `open` in interface `javax.batch.api.chunk.ItemReader`
      Throws:
        `Exception`

    - #### doRead

          protected abstract Object doRead()
                                    throws Exception

      Throws:
        `Exception`

    - #### readItem

          public Object readItem()
                          throws Exception

      Specified by:
        `readItem` in interface `javax.batch.api.chunk.ItemReader`
      Throws:
        `Exception`

    - #### checkpointInfo

          public Serializable checkpointInfo()
                                      throws Exception

      Specified by:
        `checkpointInfo` in interface `javax.batch.api.chunk.ItemReader`
      Throws:
        `Exception`