Click or drag to resize

RecordReaderTHasRecords Property

Gets a value that indicates whether there are records available on the data source that this reader is reading from.

Namespace:  Ookii.Jumbo.IO
Assembly:  Ookii.Jumbo (in Ookii.Jumbo.dll) Version: 2.0.0
Syntax
public bool HasRecords { get; protected set; }

Property Value

Type: Boolean
if this instance has records available and is not waiting for input; otherwise, .

Implements

IRecordReaderHasRecords
Remarks

The HasRecords property indicates if the record reader is waiting for an external source to provide it with data, or has data available from which it can read records immediately. If this property is , it indicates that the ReadRecord method will not block waiting for an external event (it may, however, still block waiting for IO).

For example, a multi-input record reader may use the HasRecords property to indicate whether any inputs have been added yet. If this multi-input record reader is reading from a file channel, this could be used to determine if the reader is waiting for data to be shuffled or if it is available now.

If the HasRecords property is , it is still safe to call ReadRecord, there is just no guarantee that the call will return immediately.

If the HasRecords property is and HasFinished is , then the HasRecords property must become at some point, provided there are no error conditions.

If the HasRecords property is , the next call to ReadRecord can still return . After ReadRecord has returned , the HasRecords property will also be

When the HasRecords property changes, the HasRecordsChanged event will be raised.

For multi-input record readers, this property applies only to the current partition; if the current partition changes, the value of the HasRecords property should be reset.

This is a default implementation for HasRecords that simply always returns until a call to ReadRecord has returned .

See Also