Skip Headers

Oracle Call Interface Programmer's Guide
Release 2 (9.2)

Part Number A96584-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

OCI Navigational and Type Functions, 3 of 36


OCICacheRefresh()

Purpose

Refreshes all pinned persistent objects in the cache.

Syntax

sword OCICacheRefresh ( OCIEnv            *env, 
                       OCIError           *err, 
                       CONST OCISvcCtx    *svc,
                       OCIRefreshOpt      option, 
                       dvoid              *context,
                       OCIRef             *(*get)(dvoid *context), 
                       OCIRef             **ref );

Parameters

env (IN/OUT)

The OCI environment handle initialized in object mode. See the description of OCIEnvCreate() and OCIInitialize() for more information.

err (IN/OUT)

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 OCIErrorGet().

svc (IN)

OCI service context.

option (IN) [optional]

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.

context (IN) [optional]

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.

get (IN) [optional]

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.

ref (OUT) [optional]

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 (OCIRefIsNull(*ref) is TRUE).

Comments

This function refreshes all pinned persistent objects and all unpinned persistent objects are freed from the object cache.

See Also:

For more information about refreshing, see the description of OCIObjectRefresh(), and the section "Refreshing an Object Copy".


Caution:

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 *.


Related Functions

OCIObjectRefresh()


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback