DBA Data[Home] [Help]

PACKAGE: SYS.DBMS_RESULT_CACHE_API

Source


1 PACKAGE DBMS_RESULT_CACHE_API as
2 
3   /**
4    * NAME:
5    *   Get
6    * DESCRIPTION:
7    *   Finds a given object in the cache or (optionally) creates one if one
8    *   is not found.
9    * PARAMETERS
10    *   name      - the key of the value to fetch
11    *   value     - the value (or object) corresponding to the key
12    *   isPublic  - 1(TRUE)          => result is public available all schemas
13    *               0(FALSE) DEFAULT => result is private to creator's schema
14    *   noCreate  - 1(TRUE)          => does not create a new object
15    *               0(FALSE) DEFAULT => creates a new object when one isn't found
16    *   noFetch   - 1(TRUE)          => does not return the value
17    *               0(FALSE) DEFAULT => returns the value
18    * RETURNS:
19    *    0 => Failed to find/create.
20    *    1 => Found the requested object.
21    *    2 => Created an (empty) new object with the given key.
22    * EXCEPTIONS:
23    *   None.
24    * NOTES:
25    *   None.
26    */
27   FUNCTION Get(key      IN         VARCHAR2,
28                value    OUT NOCOPY RAW,
29                isPublic IN         NUMBER DEFAULT 0,
30                noCreate IN         NUMBER DEFAULT 0,
31                noFetch  IN         NUMBER DEFAULT 0) RETURN NUMBER;
32   pragma interface(C, Get);
33 
34   FUNCTION GetC(key      IN         VARCHAR2,
35                 value    OUT NOCOPY VARCHAR2,
36                 isPublic IN         NUMBER DEFAULT 0,
37                 noCreate IN         NUMBER DEFAULT 0,
38                 noFetch  IN         NUMBER DEFAULT 0) RETURN NUMBER;
39   pragma interface(C, GetC);
40 
41   /**
42    * NAME:
43    *   Set
44    * DESCRIPTION:
45    *   Stores the value with the key specified with the last
46    *   call to Find (which had created an empty new object).
47    * PARAMETERS
48    *   value   - the value (or object) to be stored
49    *   discard - 1(TRUE)          => invalidates the key/value
50    *             0(FALSE) DEFAULT => publishes the key/value
51    * RETURNS:
52    *   0      => Result was NOT published.
53    *   Others => Result was published.
54    * EXCEPTIONS:
55    *   None.
56    * NOTES:
57    *   None.
58    */
59   FUNCTION Set(value   IN  RAW,
60                discard IN  NUMBER DEFAULT 0) RETURN NUMBER;
61   pragma interface(C, Set);
62 
63   FUNCTION SetC(value   IN  VARCHAR2,
64                 discard IN  NUMBER DEFAULT 0) RETURN NUMBER;
65   pragma interface(C, SetC);
66 
67 
68 
69 END DBMS_RESULT_CACHE_API;