Class SmfRecordReaderBuilder

java.lang.Object
com.blackhillsoftware.smf.SmfRecordReaderBuilder
Direct Known Subclasses:
LogstreamBuilder, LogstreamBuilderGmt, LogstreamBuilderLocal, StreamReaderBuilder

public abstract class SmfRecordReaderBuilder extends Object
Create a SmfRecordReader using the builder pattern. Used for e.g. creating a SmfRecordReader to read from a logstream specifying start and end times.
 
 SmfRecordReader reader = SmfRecordReader
           .logstreamBuilder("IFASMF.MYRECS")
           .from(LocalTime.of(15,30))
           .to(LocalTime.of(16,05))
           .include(30,5)
           .build();
 
 
  • Constructor Details

    • SmfRecordReaderBuilder

      public SmfRecordReaderBuilder()
  • Method Details

    • include

      public abstract SmfRecordReaderBuilder include(int smftype)
      Include a SMF record type - see SmfRecordReader.include(int)
      Parameters:
      smftype - the SMF type to include
      Returns:
      this SmfRecordReaderBuilder to allow method chaining
    • include

      public abstract SmfRecordReaderBuilder include(int smftype, int subtype)
      Include a SMF record type and subtype - see SmfRecordReader.include(int, int)
      Parameters:
      smftype - the SMF type to include
      subtype - the SMF subtype to include
      Returns:
      this SmfRecordReaderBuilder to allow method chaining
    • build

      public abstract SmfRecordReader build() throws IOException
      Build the SmfRecordReader. Consider calling this method in a try-with-resources statement to ensure the SmfRecordReader is closed.
      Returns:
      the resulting SmfRecordReader
      Throws:
      IOException - if an I/O error occurs