| 1 | /** |
| 2 | * Copyright (C) 2008 NetMind Consulting Bt. |
| 3 | * |
| 4 | * This library is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU Lesser General Public |
| 6 | * License as published by the Free Software Foundation; either |
| 7 | * version 3 of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This library is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | * Lesser General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU Lesser General Public |
| 15 | * License along with this library; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 | */ |
| 18 | |
| 19 | package hu.netmind.beankeeper.cache.impl; |
| 20 | |
| 21 | import hu.netmind.beankeeper.cache.ResultsCache; |
| 22 | |
| 23 | /** |
| 24 | * Cache management bean. |
| 25 | * @author Brautigam Robert |
| 26 | * @version Revision: $Revision$ |
| 27 | */ |
| 28 | public class Cache implements CacheMBean |
| 29 | { |
| 30 | private long hitCount; |
| 31 | private long missCount; |
| 32 | private long objectCount; |
| 33 | private long resultCount; |
| 34 | |
| 35 | private ResultsCache cache = null; |
| 36 | |
| 37 | public Cache(ResultsCache cache) |
| 38 | { |
| 39 | this.cache=cache; |
| 40 | } |
| 41 | |
| 42 | public long getHitCount() |
| 43 | { |
| 44 | return hitCount; |
| 45 | } |
| 46 | public void setHitCount(long hitCount) |
| 47 | { |
| 48 | this.hitCount=hitCount; |
| 49 | } |
| 50 | |
| 51 | public long getMissCount() |
| 52 | { |
| 53 | return missCount; |
| 54 | } |
| 55 | public void setMissCount(long missCount) |
| 56 | { |
| 57 | this.missCount=missCount; |
| 58 | } |
| 59 | |
| 60 | public long getObjectCount() |
| 61 | { |
| 62 | return objectCount; |
| 63 | } |
| 64 | public void setObjectCount(long objectCount) |
| 65 | { |
| 66 | this.objectCount=objectCount; |
| 67 | } |
| 68 | |
| 69 | public long getResultCount() |
| 70 | { |
| 71 | return resultCount; |
| 72 | } |
| 73 | public void setResultCount(long resultCount) |
| 74 | { |
| 75 | this.resultCount=resultCount; |
| 76 | } |
| 77 | |
| 78 | public void clear() |
| 79 | { |
| 80 | cache.clear(); |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | |