Example: Index Definition Structure
In this scenario, assume that each record that the cache stores has this structure:
int nlnt1 JCHAR cLetter1 JCHAR cLetter2 JCHAR cLetter3 JCHAR szArray(5)
The next step is to determine which values to use to index each record in the cache uniquely. In this example, assume that these values are required:
nInt1
cLetter1
cLetter3
Pass that information to jdeCacheInit or jdeCacheInitEx, and JDECACHE creates this Index Definition Structure for internal use. This table lists Index Definition Structure is for STRUCT letters:
Index Key No. |
Index Key Offset |
Index Key Offset INTEGER |
---|---|---|
Index Key #1 |
0 |
INTEGER |
Index Key #2 |
4 |
JCHAR |
Index Key #3 |
6 |
JCHAR |