Subversion
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
svn_cache_config.h
Go to the documentation of this file.
1 /**
2  * @copyright
3  * ====================================================================
4  * Licensed to the Apache Software Foundation (ASF) under one
5  * or more contributor license agreements. See the NOTICE file
6  * distributed with this work for additional information
7  * regarding copyright ownership. The ASF licenses this file
8  * to you under the Apache License, Version 2.0 (the
9  * "License"); you may not use this file except in compliance
10  * with the License. You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing,
15  * software distributed under the License is distributed on an
16  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17  * KIND, either express or implied. See the License for the
18  * specific language governing permissions and limitations
19  * under the License.
20  * ====================================================================
21  * @endcopyright
22  *
23  * @file svn_cache_config.h
24  * @brief Configuration interface to internal Subversion caches.
25  */
26 
27 #ifndef SVN_CACHE_CONFIG_H
28 #define SVN_CACHE_CONFIG_H
29 
30 #include <apr.h>
31 #include "svn_types.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif /* __cplusplus */
36 
37 /** @defgroup svn_fs_cache_config caching configuration
38  * @{
39  * @since New in 1.7. */
40 
41 /** Cache resource settings. It controls what caches, in what size and
42  how they will be created. The settings apply for the whole process.
43 
44  @note Do not extend this data structure as this would break binary
45  compatibility.
46 
47  @since New in 1.7.
48  */
49 typedef struct svn_cache_config_t
50 {
51  /** total cache size in bytes. Please note that this is only soft limit
52  to the total application memory usage and will be exceeded due to
53  temporary objects and other program state.
54  May be 0, resulting in default caching code being used. */
55  apr_uint64_t cache_size;
56 
57  /** maximum number of files kept open */
58  apr_size_t file_handle_count;
59 
60  /** is this application guaranteed to be single-threaded? */
62 
63  /* DON'T add new members here. Bump struct and API version instead. */
65 
66 /** Get the current cache configuration. If it has not been set,
67  this function will return the default settings.
68 
69  @since New in 1.7.
70  */
71 const svn_cache_config_t *
73 
74 /** Set the cache configuration. Please note that it may not change
75  the actual configuration *in use*. Therefore, call it before reading
76  data from any repo and call it only once.
77 
78  This function is not thread-safe. Therefore, it should be called
79  from the processes' initialization code only.
80 
81  @since New in 1.7.
82  */
83 void
85 
86 /** @} */
87 
88 /** @} */
89 
90 
91 #ifdef __cplusplus
92 }
93 #endif /* __cplusplus */
94 
95 #endif /* SVN_CACHE_CONFIG_H */