1279377Simp/** 2279377Simp * @copyright 3279377Simp * ==================================================================== 4279377Simp * Licensed to the Apache Software Foundation (ASF) under one 5279377Simp * or more contributor license agreements. See the NOTICE file 6279377Simp * distributed with this work for additional information 7279377Simp * regarding copyright ownership. The ASF licenses this file 8279377Simp * to you under the Apache License, Version 2.0 (the 9279377Simp * "License"); you may not use this file except in compliance 10279377Simp * with the License. You may obtain a copy of the License at 11279377Simp * 12279377Simp * http://www.apache.org/licenses/LICENSE-2.0 13279377Simp * 14279377Simp * Unless required by applicable law or agreed to in writing, 15279377Simp * software distributed under the License is distributed on an 16279377Simp * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17279377Simp * KIND, either express or implied. See the License for the 18279377Simp * specific language governing permissions and limitations 19279377Simp * under the License. 20279377Simp * ==================================================================== 21279377Simp * @endcopyright 22279377Simp * 23279377Simp * @file svn_cache_config.h 24279377Simp * @brief Configuration interface to internal Subversion caches. 25279377Simp */ 26279377Simp 27279377Simp#ifndef SVN_CACHE_CONFIG_H 28279377Simp#define SVN_CACHE_CONFIG_H 29279377Simp 30279377Simp#include <apr.h> 31279377Simp#include "svn_types.h" 32279377Simp 33279377Simp#ifdef __cplusplus 34279377Simpextern "C" { 35279377Simp#endif /* __cplusplus */ 36279377Simp 37279377Simp/** @defgroup svn_fs_cache_config caching configuration 38279377Simp * @{ 39279377Simp * @since New in 1.7. */ 40279377Simp 41279377Simp/** Cache resource settings. It controls what caches, in what size and 42279377Simp how they will be created. The settings apply for the whole process. 43279377Simp 44279377Simp @note Do not extend this data structure as this would break binary 45279377Simp compatibility. 46279377Simp 47295436Sandrew @since New in 1.7. 48279377Simp */ 49279377Simptypedef struct svn_cache_config_t 50279377Simp{ 51279377Simp /** total cache size in bytes. Please note that this is only soft limit 52279377Simp to the total application memory usage and will be exceeded due to 53279377Simp temporary objects and other program state. 54279377Simp May be 0, resulting in default caching code being used. */ 55279377Simp apr_uint64_t cache_size; 56279377Simp 57279377Simp /** maximum number of files kept open */ 58279377Simp apr_size_t file_handle_count; 59279377Simp 60279377Simp /** is this application guaranteed to be single-threaded? */ 61279377Simp svn_boolean_t single_threaded; 62279377Simp 63279377Simp /* DON'T add new members here. Bump struct and API version instead. */ 64279377Simp} svn_cache_config_t; 65279377Simp 66279377Simp/** Get the current cache configuration. If it has not been set, 67279377Simp this function will return the default settings. 68279377Simp 69279377Simp @since New in 1.7. 70279377Simp */ 71279377Simpconst svn_cache_config_t * 72279377Simpsvn_cache_config_get(void); 73279377Simp 74279377Simp/** Set the cache configuration. Please note that it may not change 75279377Simp the actual configuration *in use*. Therefore, call it before reading 76279377Simp data from any repo and call it only once. 77279377Simp 78279377Simp This function is not thread-safe. Therefore, it should be called 79279377Simp from the processes' initialization code only. 80279377Simp 81279377Simp @since New in 1.7. 82279377Simp */ 83279377Simpvoid 84279377Simpsvn_cache_config_set(const svn_cache_config_t *settings); 85279377Simp 86279377Simp/** @} */ 87279377Simp 88279377Simp/** @} */ 89279377Simp 90279377Simp 91279377Simp#ifdef __cplusplus 92279377Simp} 93279377Simp#endif /* __cplusplus */ 94279377Simp 95279377Simp#endif /* SVN_CACHE_CONFIG_H */ 96279377Simp