|Oracle Call Interface Programmer's Guide
Part Number A89857-01
OCI Navigational and Type Functions, 3 of 36
Refreshes all pinned persistent objects in the cache.
sword OCICacheRefresh ( OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, OCIRefreshOpt option, dvoid *context, OCIRef *(*get)(dvoid *context), OCIRef **ref );
The OCI error handle. If there is an error, it is recorded in
err and this function returns OCI_ERROR. Obtain diagnostic information by calling
OCI service context.
If OCI_REFRESH_LOADED is specified, all objects that are loaded within the transaction are refreshed. If the option is OCI_REFRESH_LOADED and the parameter
get is not null, this function will ignore the parameter.
Specifies an user context that is an argument to the client callback function
get. This parameter is set to null if there is no user context.
A client-defined function which acts an iterator to retrieve a batch of objects that need to be refreshed. If the function is not null, this function will be called to get a reference of an object. If the reference is not null, then the object will be refreshed. These steps are repeated until a null reference is returned by this function. The parameter
context is passed to
get() for each invocation of the client function. This parameter should be null if user callback is not given.
If there is an error in refreshing the objects, (
*ref) will point to the object that is causing the error. If
ref is null, then the object will not be returned. If
*ref is null, then a reference will be allocated and set to point to the object. If
*ref is not null, then the reference of the object is copied into the given space. If the error is not caused by any of the object, the given ref is initialized to be a null reference (
This function refreshes all pinned persistent objects and all unpinned persistent objects are freed from the object cache.
For more information about refreshing, see the description of
When objects are refreshed, the secondary-level memory of those objects could potentially move to a different place in memory. As a result, any pointers to attributes which were saved prior to this call may be invalidated. Examples of attributes using secondary-level memory include OCIString *, OCIColl *, and OCIRaw *.