minimumRead=

>>--minimumRead-=-sizeKB-----------------><

Adjusts the minimum size of the read buffer in increments of 1024 bytes. Note that the programmer need not worry about the read buffer. This method is documented because it does exist and for the sake of the rare Rexx programmer that might need to change the minimum size of the read buffer.

The read buffer is used by the underlying implementation during the readRecords() method only. During a read operation, the WindowsEventLog attempts to allocate a buffer that is big enough to read in all the records at once. The size of the buffer is guessed at by using the number of records in the event log. The size is constrained by a minimum and maximum. The buffer will never be larger than the maximum and never smaller than the minimum. The maximum value is fixed. The minimum value can be adjusted by the programmer by this, the minimumRead() method.

In almost all cases, the size of the buffer will be set towards the maximum constraint and the minimum constraint will not come into play at all. There is only one circumstance where the Rexx programmer would need to change the minimum constraint, which is this:

The Windows Event Log Service will only place whole records into the buffer. If a record is bigger in size than the buffer, the record can not be read and an execution error will be raised by the WindowsEventLog object. In this case the minimum constraint for the buffer size would need to be set to a size bigger than the record size. The text of the error message lists both the record size and the buffer size. To read the record, the programmer would set the minimum constraint larger than the record size.

Again, it must be stressed that the above scenario is extremely unlikely.

Arguments:

The single argument is:

sizeKB

The minimum size to allocate the read buffer, in kilobytes.

Return value:

There is no return.

Example:

This method is straight forward to use:


  log = .WindowsEventLog~new
  log~minimumRead = 64
  say 'Current minimum read is' log~minimumRead 'KB.'

::requires 'winSystm.cls'

/* Output might be:

Current minimum size of the read buffer is: 64 KB

*/