Interface TraceReader
- All Known Implementing Classes:
GoogleMachineEventsTraceReader,GoogleTaskEventsTraceReader,GoogleTaskUsageTraceReader,SwfWorkloadFileReader,TraceReaderAbstract
public interface TraceReader
A basic interface for classes that read specific trace file formats.
- Author:
- Marcos Dias de Assuncao, Manoel Campos da Silva Filho
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionString[]Gets the Strings that identifies the start of a comment line.Returns the regex defining how fields are delimited in the trace file.intintsetCommentString(String... commentString) Sets a string that identifies the start of a comment line.setFieldDelimiterRegex(String fieldDelimiterRegex) Sets the regex defining how fields are delimited in the trace file.setMaxLinesToRead(int maxLinesToRead) Sets the maximum number of lines from the workload reader that will be read.
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGER
-
-
Method Details
-
getFilePath
String getFilePath()- Returns:
- the path of the trace file.
-
getLastLineNumber
int getLastLineNumber()- Returns:
- the number of the last line read from the trace file (starting from 0).
-
getFieldDelimiterRegex
String getFieldDelimiterRegex()Returns the regex defining how fields are delimited in the trace file. Usually, this can be just a String with a single character such as a space, comma, semicolon or tab (\t).- Returns:
- the regex defining how fields are delimited in the trace file
-
setFieldDelimiterRegex
Sets the regex defining how fields are delimited in the trace file. Usually, this can be just a String with a single character such as a space, comma or semicolon or tab (\t).- Parameters:
fieldDelimiterRegex- the field separator regex to set- Returns:
- the file reader
-
getMaxLinesToRead
int getMaxLinesToRead()- Returns:
- the maximum number of lines from the workload reader that will be read. The value -1 indicates that all lines will be read, creating a cloudlet from everyone.
-
setMaxLinesToRead
Sets the maximum number of lines from the workload reader that will be read. The value -1 indicates that all lines will be read, creating a cloudlet from everyone.- Parameters:
maxLinesToRead- the maximum number of lines to set- Returns:
- the file reader
-
getCommentString
String[] getCommentString()Gets the Strings that identifies the start of a comment line. For instance ; # % //. -
setCommentString
Sets a string that identifies the start of a comment line. If there are multiple ways to comment a line, the different Strings representing comments can be specified as parameters.- Parameters:
commentString- the comment Strings to set- Returns:
- the file reader
-