31
31
/// constant definitions
32
32
enum _PersistenceConstantDef
33
33
{
34
- resIsNoFile = 0 , /// flag to identify that resource a not file
35
- resIsFile = 1 , /// flag to identify that resource a file
36
- accessNoLock = 1 , /// flag to indicate that access is not locked
34
+ ResIsNoFile = 0 , /// flag to identify that resource a not file
35
+ ResIsFile = 1 , /// flag to identify that resource a file
36
+ AccessNoLock = 1 , /// flag to indicate that access is not locked
37
37
38
38
FileClosed = 0 ,
39
39
FileOpen = 1 ,
@@ -44,9 +44,11 @@ enum _PersistenceConstantDef
44
44
45
45
PrctKeySize = 64 , /// persistence resource config table max key size
46
46
PrctValueSize = 256 , /// persistence resource config table max value size
47
+ PrctDbTableSize = 1024 , /// number of persistence resource config tables to store
47
48
48
49
DbKeySize = 64 , /// database max key size
49
50
DbValueSize = 16384 , /// database max value size
51
+ DbTableSize = 1024 , /// database table size
50
52
51
53
PasMsg_Block = 1 , /// persistence administration service block access
52
54
PasMsg_WriteBack = 2 , /// persistence administration service write_back
@@ -56,10 +58,10 @@ enum _PersistenceConstantDef
56
58
PasErrorStatus_FAIL = -1 , /// persistence administration service msg return status
57
59
58
60
CustLibMaxLen = 128 , /// max length of the custom library name and path
59
- dbKeyMaxLen = 128 , /// max database key length
60
- dbPathMaxLen = 128 , /// max database path length
61
- maxAppNameLen = 128 , /// max application name
62
- maxPersHandle = 256 , /// max number of parallel open persistence handles
61
+ DbKeyMaxLen = 128 , /// max database key length
62
+ DbPathMaxLen = 128 , /// max database path length
63
+ MaxAppNameLen = 128 , /// max application name
64
+ MaxPersHandle = 256 , /// max number of parallel open persistence handles
63
65
64
66
defaultMaxKeyValDataSize = 16384 /// default limit the key-value data size to 16kB
65
67
};
@@ -104,17 +106,23 @@ typedef struct _PersistenceConfigurationKey_s
104
106
{
105
107
PersistencePolicy_e policy ; /**< policy */
106
108
PersistenceStorage_e storage ; /**< definition of storage to use */
107
- PersistenceDbContext_s context ; /**< database context*/
108
109
unsigned int permission ; /**< access right, corresponds to UNIX */
109
110
unsigned int max_size ; /**< max size expected for the key */
110
111
char * reponsible ; /**< name of responsible application */
111
112
char * custom_name ; /**< name of the customer plugin */
112
113
} PersistenceConfigurationKey_s ;
113
114
114
115
116
+ /// persistence information
117
+ typedef struct _PersistenceInfo_s
118
+ {
119
+ PersistenceDbContext_s context ; /**< database context*/
120
+ PersistenceConfigurationKey_s configKey ; /**< prct configuration key*/
115
121
122
+ } PersistenceInfo_s ;
116
123
117
124
125
+ /// persistence resource config table type definition
118
126
typedef enum _PersistenceRCT_e
119
127
{
120
128
PersistenceRCT_local = 0 ,
@@ -171,7 +179,7 @@ extern const char* gSharedPublicWtPath;
171
179
172
180
173
181
/// application id
174
- extern char gAppId [maxAppNameLen ];
182
+ extern char gAppId [MaxAppNameLen ];
175
183
176
184
/// max key value data size
177
185
extern int gMaxKeyValDataSize ;
0 commit comments