MAINSAIL Language Manual, Section 45.1

previous   next   top   complete contents   complete index   framed top   this page unframed


45.1. $queryFileCacheParms

Temporary feature: subject to change

Figure 45–1. $queryFileCacheParms
BOOLEAN
PROCEDURE   $queryFileCacheParms
                        (
POINTER(filef;
                         
OPTIONAL PRODUCES LONG BITS
                             
attributes;
                         
OPTIONAL PRODUCES LONG INTEGER
                             
requestedMinSize,
                             
requestedMaxSize,
                             
currentSize;
                         
OPTIONAL PRODUCES INTEGER
                             
requestedHitPercent,
                             
currentHitPercent;
                         
OPTIONAL BITS ctrlBits);

$queryFileCacheParms returns information about the cache associated with the file f, except that if f is NULLPOINTER, then information about the global cache is returned. If f is not NULLPOINTER and f cannot be cached, e.g., if it is a sequential, unbuffered, or mapped disk file, an error occurs and $queryFileCacheParms returns FALSE.

If f is a globally cached file or if f is NULLPOINTER, information about the global cache is returned. If f is a privately cached file, information about the private cache is returned. If f is not cached, all PRODUCES parameters are set to Zero and $queryFileCacheParms returns TRUE. The PRODUCES parameters and their meanings are as follows:

attributes If f is not NULLPOINTER, then attributes returns information about how the file is cached, i.e., globally cached (the predefined bit $globallyCached is set), privately cached (the predefined bit $privatelyCached is set), or not cached (attributes is Zero).
requestedMinSize The requested minimum number of buffers in the LRU list
requestedMaxSize The requested maximum number of buffers in the LRU list
currentSize The current number of buffers in the LRU list
requestedHitPercent The requested hit percent
currentHitPercent The current hit percent

The only valid ctrlBits is errorOK. An error message is generated if an error occurs and errorOK is not specified.

Section 22.16 and the description of GCCHP in Chapter 14 of the MAINSAIL Utilities User's Guide tell more about how the file cache works.


previous   next   top   complete contents   complete index   framed top   this page unframed

MAINSAIL Language Manual, Section 45.1