00001 /** 00002 * @copyright 00003 * ==================================================================== 00004 * Licensed to the Apache Software Foundation (ASF) under one 00005 * or more contributor license agreements. See the NOTICE file 00006 * distributed with this work for additional information 00007 * regarding copyright ownership. The ASF licenses this file 00008 * to you under the Apache License, Version 2.0 (the 00009 * "License"); you may not use this file except in compliance 00010 * with the License. You may obtain a copy of the License at 00011 * 00012 * http://www.apache.org/licenses/LICENSE-2.0 00013 * 00014 * Unless required by applicable law or agreed to in writing, 00015 * software distributed under the License is distributed on an 00016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 00017 * KIND, either express or implied. See the License for the 00018 * specific language governing permissions and limitations 00019 * under the License. 00020 * ==================================================================== 00021 * @endcopyright 00022 * 00023 * @file svn_cache_config.h 00024 * @brief Configuration interface to internal Subversion caches. 00025 */ 00026 00027 #ifndef SVN_CACHE_CONFIG_H 00028 #define SVN_CACHE_CONFIG_H 00029 00030 #include <apr.h> 00031 #include "svn_types.h" 00032 00033 #ifdef __cplusplus 00034 extern "C" { 00035 #endif /* __cplusplus */ 00036 00037 /** @defgroup svn_fs_cache_config caching configuration 00038 * @{ 00039 * @since New in 1.7. */ 00040 00041 /** Cache resource settings. It controls what caches, in what size and 00042 how they will be created. The settings apply for the whole process. 00043 00044 @note Do not extend this data structure as this would break binary 00045 compatibility. 00046 00047 @since New in 1.7. 00048 */ 00049 typedef struct svn_cache_config_t 00050 { 00051 /** total cache size in bytes. Please note that this is only soft limit 00052 to the total application memory usage and will be exceeded due to 00053 temporary objects and other program state. 00054 May be 0, resulting in default caching code being used. */ 00055 apr_uint64_t cache_size; 00056 00057 /** maximum number of files kept open */ 00058 apr_size_t file_handle_count; 00059 00060 /** is this application guaranteed to be single-threaded? */ 00061 svn_boolean_t single_threaded; 00062 00063 /* DON'T add new members here. Bump struct and API version instead. */ 00064 } svn_cache_config_t; 00065 00066 /** Get the current cache configuration. If it has not been set, 00067 this function will return the default settings. 00068 00069 @since New in 1.7. 00070 */ 00071 const svn_cache_config_t * 00072 svn_cache_config_get(void); 00073 00074 /** Set the cache configuration. Please note that it may not change 00075 the actual configuration *in use*. Therefore, call it before reading 00076 data from any repo and call it only once. 00077 00078 This function is not thread-safe. Therefore, it should be called 00079 from the processes' initialization code only. 00080 00081 @since New in 1.7. 00082 */ 00083 void 00084 svn_cache_config_set(const svn_cache_config_t *settings); 00085 00086 /** @} */ 00087 00088 /** @} */ 00089 00090 00091 #ifdef __cplusplus 00092 } 00093 #endif /* __cplusplus */ 00094 00095 #endif /* SVN_CACHE_CONFIG_H */
1.6.1