VASResult shore_vas::openPoolScan( const lrid_t &pool, Cookie *cookie ); VASResult shore_vas::openPoolScan( const Path name, Cookie *cookie ); // get oid of next object in pool VASResult shore_vas::nextPoolScan( Cookie *cookie, bool *eof, // TRUE if no result // if FALSE, result is legit lrid_t *result, LockMode lock=NL, SysProps *sysprops = 0 // optional ); VASResult shore_vas::nextPoolScan( Cookie *cookie, bool *eof, // TRUE if no result // if FALSE, result is legit lrid_t *result, // snapped ref ObjectOffset offset, ObjectSize requested, // -- could be WholeObject const vec_t &buf, // -- where to put it ObjectSize *used = 0, // - amount copied ObjectSize *more = 0, // requested amt not copied LockMode lock=NL, SysProps *sysprops = 0 // optional ); VASResult shore_vas::closePoolScan( const Cookie &cookie );
The argument eof is also a pointer into the caller's address space, where the SVAS writes the value TRUE (1) if the operation yielded no object, and FALSE (0) if the operation resulted in another object. If *eof is returned TRUE, the values of the other return arguments are meaningful.
The argument result points to an area in the caller's address space where the SVAS will write the logical object identifier for the next object in the pool. result may not be a null pointer. The value written into *result is the snapped form of the object's identifier.
The argument sysprops points to an area in the caller's address space where the SVAS will place the system properties of the object, if sysprops is a non-null pointer.
The argument lock can be used to increase (but not decrease) the strength of the lock acquired on the object when it is inspected by the SVAS.
The second form of nextPoolScan takes several more arguments, whose purpose is to make the method as general as readObj. They allow the object to be read in full or in part, by the scan.