Package com.blackhillsoftware.smf
Class SmfRecordReaderBuilder
java.lang.Object
com.blackhillsoftware.smf.SmfRecordReaderBuilder
- Direct Known Subclasses:
LogstreamBuilder
,LogstreamBuilderGmt
,LogstreamBuilderLocal
,StreamReaderBuilder
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract SmfRecordReader
build()
Build theSmfRecordReader
.abstract SmfRecordReaderBuilder
include
(int smftype) Include a SMF record type - seeSmfRecordReader.include(int)
abstract SmfRecordReaderBuilder
include
(int smftype, int subtype) Include a SMF record type and subtype - seeSmfRecordReader.include(int, int)
-
Constructor Details
-
SmfRecordReaderBuilder
public SmfRecordReaderBuilder()
-
-
Method Details
-
include
Include a SMF record type - seeSmfRecordReader.include(int)
- Parameters:
smftype
- the SMF type to include- Returns:
- this SmfRecordReaderBuilder to allow method chaining
-
include
Include a SMF record type and subtype - seeSmfRecordReader.include(int, int)
- Parameters:
smftype
- the SMF type to includesubtype
- the SMF subtype to include- Returns:
- this SmfRecordReaderBuilder to allow method chaining
-
build
Build theSmfRecordReader
. 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
-