1 /******************************************************************************* 2 3 Cache info interface. 4 5 Copyright: 6 Copyright (c) 2009-2016 dunnhumby Germany GmbH. 7 All rights reserved. 8 9 License: 10 Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. 11 Alternatively, this file may be distributed under the terms of the Tango 12 3-Clause BSD License (see LICENSE_BSD.txt for details). 13 14 *******************************************************************************/ 15 16 module ocean.util.container.cache.model.ICacheInfo; 17 18 interface ICacheInfo 19 { 20 /*************************************************************************** 21 22 Returns: 23 the maximum number of items the cache can have. 24 25 ***************************************************************************/ 26 27 public size_t max_length ( ); 28 29 /*************************************************************************** 30 31 Returns: 32 the number of items currently in the cache. 33 34 ***************************************************************************/ 35 36 public size_t length ( ); 37 38 /*************************************************************************** 39 40 Returns: 41 the number of cache lookups since instantiation or the last call of 42 resetStats(). 43 44 ***************************************************************************/ 45 46 uint num_lookups ( ); 47 48 /*************************************************************************** 49 50 Returns: 51 the number of cache lookups since instantiation or the last call of 52 resetStats() where the element could not be found. 53 54 ***************************************************************************/ 55 56 uint num_misses ( ); 57 58 /*************************************************************************** 59 60 Resets the statistics counter values. 61 62 ***************************************************************************/ 63 64 void resetStats ( ); 65 }