73
To avoid this problem, the CNKBuf must have at least as many rows as
the largest possible
CNKBufWriter::setRequestRows value plus the
largest possible
CNKBufReader::setRequestRows value (from the
multiple readers).
In order to determine whether this is true, it is necessary to know the
maximum number of rows a given
CNKProc will request from its input
or output.
CNKProc maintains two properties, the maximum number
of rows that will be requested from any of its inputs (accessed with
CNKProc::getNumRows), and the maximum number of rows spaces
that will be requested from any of its outputs (accessed with
CNKProc::getOutputNumRows).
The
getMinRowsToAvoidDeadlock and isDeadlockPossible methods
are used to check whether the
CNKBuf has enough rows to avoid this
deadlock.
getMinRowsToAvoidDeadlock() returns the minimum
number of rows that would be necessary to avoid deadlock.
isDeadlockPossible() returns true (non-zero) if this value is less than
CNKBuf::getNumRows().
isDeadlockPossible() is called from CNKBuf::init(), to check
whether a deadlock is possible. If it is, the error string is set for the
CNKBuf.
CNKBackingFileB
uf Methods
CNKBackingFileBuf is a subclass of CNKBuf that implements a data
buffer with an associated "backing file" on disk. Whereas
CNKMemoryBuf only supports procs that sequentially read their input
data,
CNKBackingFileBuf can be used with procs that need to scan
through their input data multiple times, or access it in random order.
A
CNKBackingFileBuf can be used in two ways,
1. as a file writer, or
2. as a file reader.
In the first case, the backing file is initially empty, the
CNKBackingFileBuf has a single buf writer, and zero or more
sequential buf readers. As the pipeline executes, the buf writer writes
data to the
CNKBackingFileBuf, which writes it to the backing file, and
also passes it to any sequential readers. In the second case, the
backing file is an existing data file, the
CNKBackingFileBuf has no buf
writer, and it has exactly one buf reader. As the pipeline executes, the
Kommentare zu diesen Handbüchern