Debian Codegraph @

src/test/resources/ehcache-unloadablecachemanagerlistenerclass.xml

raw
1 <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../main/config/ehcache.xsd">
2
3 <!-- Sets the path to the directory where cache .data files are created.
4
5 If the path is a Java System Property it is replaced by
6 its value in the running VM. Subdirectories can be specified below the property e.g. java.io.tmpdir/one
7
8 The following properties are translated:
9 user.home - User's home directory
10 user.dir - User's current working directory
11 java.io.tmpdir - Default temp file path -->
12 <diskStore path="java.io.tmpdir"/>
13
14 <!--
15 Specifies a CacheManagerEventListenerFactory which will be used to create a CacheManagerPeerProvider, which
16 is notified when Caches are added or removed from the CacheManager.
17
18 The attributes of CacheManagerEventListenerFactory are:
19 - class - a fully qualified factory class name
20 - properties - comma separated properties having meaning only to the factory.
21
22 Sets the fully qualified class name to be registered as the CacheManager event listener.
23
24 The events include:
25 - adding a Cache
26 - removing a Cache
27
28 Callbacks to listener methods are synchronous and unsynchronized. It is the responsibility of the implementer
29 to safely handle the potential performance and thread safety issues depending on what their listener is doing.
30
31 If no class is specified, no listener is created. There is no default.
32 -->
33 <cacheManagerEventListenerFactory class="net.sf.ehcache.event.TestTypoNotLoadableCacheManagerEventListenerFactory"
34 properties="type=missing"/>
35
36
37
38 <!--Default Cache configuration. These will applied to caches programmatically created through
39 the CacheManager.
40
41 The following attributes are required:
42
43 maxElementsInMemory - Sets the maximum number of objects that will be created in memory
44 eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the
45 element is never expired.
46 overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
47 has reached the maxInMemory limit.
48
49 The following attributes are optional:
50 timeToIdleSeconds - Sets the time to idle for an element before it expires.
51 i.e. The maximum amount of time between accesses before an element expires
52 Is only used if the element is not eternal.
53 Optional attribute. A value of 0 means that an Element can idle for infinity.
54 The default value is 0.
55 timeToLiveSeconds - Sets the time to live for an element before it expires.
56 i.e. The maximum time between creation time and when an element expires.
57 Is only used if the element is not eternal.
58 Optional attribute. A value of 0 means that and Element can live for infinity.
59 The default value is 0.
60 diskPersistent - Whether the disk store persists between restarts of the Virtual Machine.
61 The default value is false.
62 diskExpiryThreadIntervalSeconds- The number of seconds between runs of the disk expiry thread. The default value
63 is 120 seconds.
64 -->
65
66 <defaultCache
67 maxElementsInMemory="10"
68 eternal="false"
69 timeToIdleSeconds="5"
70 timeToLiveSeconds="10"
71 overflowToDisk="true"
72 />
73
74 <!--Predefined caches. Add your cache configuration settings here.
75 If you do not have a configuration for your cache a WARNING will be issued when the
76 CacheManager starts
77
78 The following attributes are required for defaultCache:
79
80 name - Sets the name of the cache. This is used to identify the cache.
81 It must be unique.
82 maxElementsInMemory - Sets the maximum number of objects that will be created in memory
83 eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the
84 element is never expired.
85 overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
86 has reached the maxInMemory limit.
87
88 The following attributes are optional:
89 timeToIdleSeconds - Sets the time to idle for an element before it expires.
90 i.e. The maximum amount of time between accesses before an element expires
91 Is only used if the element is not eternal.
92 Optional attribute. A value of 0 means that an Element can idle for infinity.
93 The default value is 0.
94 timeToLiveSeconds - Sets the time to live for an element before it expires.
95 i.e. The maximum time between creation time and when an element expires.
96 Is only used if the element is not eternal.
97 Optional attribute. A value of 0 means that and Element can live for infinity.
98 The default value is 0.
99 diskPersistent - Whether the disk store persists between restarts of the Virtual Machine.
100 The default value is false.
101 diskExpiryThreadIntervalSeconds- The number of seconds between runs of the disk expiry thread. The default value
102 is 120 seconds.
103 -->
104
105 <!-- Sample cache named sampleCache1 -->
106 <cache name="sampleCache1"
107 maxElementsInMemory="10000"
108 eternal="false"
109 timeToIdleSeconds="360"
110 timeToLiveSeconds="1000"
111 overflowToDisk="true"
112 />
113
114 <!-- Sample cache named sampleCache2. Is eternal -->
115 <cache name="sampleCache2"
116 maxElementsInMemory="1000"
117 eternal="true"
118 overflowToDisk="false"
119 />
120
121 <!-- Sample cache named sampleCacheNoIdle, which does not specify the optional idle time -->
122 <cache name="sampleCacheNoIdle"
123 maxElementsInMemory="1000"
124 eternal="false"
125 timeToLiveSeconds="5"
126 overflowToDisk="false"
127 />
128
129 <!-- Sample cache named sampleCacheNotEternalButNoIdleOrExpiry -->
130 <cache name="sampleCacheNotEternalButNoIdleOrExpiry"
131 maxElementsInMemory="1000"
132 eternal="false"
133 overflowToDisk="false"
134 />
135
136 <!-- A cache with short idle and live expiries, suitable for tests -->
137 <cache name="sampleIdlingExpiringCache"
138 maxElementsInMemory="1"
139 eternal="false"
140 timeToIdleSeconds="2"
141 timeToLiveSeconds="5"
142 overflowToDisk="true"
143 />
144
145 <!-- A cache which overflows to disk. The disk store is persistent
146 between cache and VM restarts. The disk expiry thread interval is set to 10 minutes, overriding
147 the default of 2 minutes. -->
148 <cache name="persistentLongExpiryIntervalCache"
149 maxElementsInMemory="500"
150 eternal="false"
151 timeToIdleSeconds="300"
152 timeToLiveSeconds="600"
153 overflowToDisk="true"
154 diskPersistent="true"
155 diskExpiryThreadIntervalSeconds="600"
156 />
157
158 <!-- Page Caches -->
159
160 <cache name="CachedLogin"
161 maxElementsInMemory="10"
162 eternal="false"
163 timeToIdleSeconds="10000"
164 timeToLiveSeconds="10000"
165 overflowToDisk="true"
166 />
167 <cache name="FooterPageCache"
168 maxElementsInMemory="10"
169 eternal="false"
170 timeToIdleSeconds="10000"
171 timeToLiveSeconds="10000"
172 overflowToDisk="true"
173 />
174
175 </ehcache>