Class ReadLargeChunksDemand

  • All Implemented Interfaces:
    IDemandStrategy

    public class ReadLargeChunksDemand
    extends AbstractDemandStrategy
    implements IDemandStrategy
    Reads large chunks of data up to MAX_FILE_SIZE Byte (default 8 MB) from a predefined hard disk drive. During initialisation, it is checked whether there is a directory fileDirectory. If yes, it is used to read data from the hard disk drive. If not, the directory is created and a number of files given by numberOfFiles are written. The files size is maxFileSize. It is recommended to restart the application or even the whole machine if the files are written during initialisation. To avoid caching effects, each consume reads from another file until all files of the list are read. Then, the first file is read again. TODO: Initialisation of the HD, variable file sizes, variable number of files, scattered reads, writes, variable file sizes.