Package org.cloudbus.cloudsim.util
Interface TraceReader
- All Known Implementing Classes:
GoogleMachineEventsTraceReader
,GoogleTaskEventsTraceReader
,GoogleTaskUsageTraceReader
,SwfWorkloadFileReader
,TraceReaderAbstract
,TraceReaderBase
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
-
Method Summary
Modifier and TypeMethodDescriptionString[]
Gets the Strings that identifies the start of a comment line.Gets the regex defining how fields are delimited in the trace file.Gets the path of the trace file.int
Gets the number of the last line read from the trace file (starting from 0).int
Gets the maximum number of lines of the workload reader that will be read.setCommentString
(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 of the workload reader that will be read.
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGER
-
-
Method Details
-
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
-
getFieldDelimiterRegex
String getFieldDelimiterRegex()Gets 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, semi-colon or tab (\t).- Returns:
-
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 semi-colon or tab (\t).- Parameters:
fieldDelimiterRegex
- the field separator regex to set
-
getMaxLinesToRead
int getMaxLinesToRead()Gets the maximum number of lines of the workload reader that will be read. The value -1 indicates that all lines will be read, creating a cloudlet from every one.- Returns:
-
setMaxLinesToRead
Sets the maximum number of lines of the workload reader that will be read. The value -1 indicates that all lines will be read, creating a cloudlet from every one.- Parameters:
maxLinesToRead
- the maximum number of lines to set
-
getFilePath
String getFilePath()Gets the path of the trace file.- Returns:
-
getLastLineNumber
int getLastLineNumber()Gets the number of the last line read from the trace file (starting from 0).- Returns:
-