root / tags / v1_1_Build_1013 / extensions / extGeoProcessing / lib / ehcache.xml @ 13521
History | View | Annotate | Download (8.94 KB)
1 |
<ehcache>
|
---|---|
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.
|
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="" properties=""/> |
34 |
|
35 |
|
36 |
<!--Default Cache configuration. These will applied to caches programmatically created through
|
37 |
the CacheManager.
|
38 |
|
39 |
The following attributes are required:
|
40 |
|
41 |
maxElementsInMemory - Sets the maximum number of objects that will be created in memory
|
42 |
eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the
|
43 |
element is never expired.
|
44 |
overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
|
45 |
has reached the maxInMemory limit.
|
46 |
|
47 |
The following attributes are optional:
|
48 |
timeToIdleSeconds - Sets the time to idle for an element before it expires.
|
49 |
i.e. The maximum amount of time between accesses before an element expires
|
50 |
Is only used if the element is not eternal.
|
51 |
Optional attribute. A value of 0 means that an Element can idle for infinity.
|
52 |
The default value is 0.
|
53 |
timeToLiveSeconds - Sets the time to live for an element before it expires.
|
54 |
i.e. The maximum time between creation time and when an element expires.
|
55 |
Is only used if the element is not eternal.
|
56 |
Optional attribute. A value of 0 means that and Element can live for infinity.
|
57 |
The default value is 0.
|
58 |
diskPersistent - Whether the disk store persists between restarts of the Virtual Machine.
|
59 |
The default value is false.
|
60 |
diskExpiryThreadIntervalSeconds- The number of seconds between runs of the disk expiry thread. The default value
|
61 |
is 120 seconds.
|
62 |
memoryStoreEvictionPolicy - Policy would be enforced upon reaching the maxElementsInMemory limit. Default
|
63 |
policy is Least Recently Used (specified as LRU). Other policies available -
|
64 |
First In First Out (specified as FIFO) and Less Frequently Used
|
65 |
(specified as LFU)
|
66 |
|
67 |
Cache elements can also contain zero or more cacheEventListenerFactory elements.
|
68 |
|
69 |
The attributes of cacheManagerPeerProviderFactory are:
|
70 |
class - a fully qualified factory class name (required)
|
71 |
properties - comma separated properties having meaning only to the factory. (optional, depends on the factory)
|
72 |
|
73 |
-->
|
74 |
|
75 |
<defaultCache
|
76 |
maxElementsInMemory="10000" |
77 |
eternal="false" |
78 |
timeToIdleSeconds="120" |
79 |
timeToLiveSeconds="120" |
80 |
overflowToDisk="true" |
81 |
diskPersistent="false" |
82 |
diskExpiryThreadIntervalSeconds="120" |
83 |
memoryStoreEvictionPolicy="LRU" |
84 |
/>
|
85 |
|
86 |
<!--Predefined caches. Add your cache configuration settings here.
|
87 |
If you do not have a configuration for your cache a WARNING will be issued when the
|
88 |
CacheManager starts
|
89 |
|
90 |
The following attributes are required:
|
91 |
|
92 |
name - Sets the name of the cache. This is used to identify the cache.
|
93 |
It must be unique.
|
94 |
maxElementsInMemory - Sets the maximum number of objects that will be created in memory
|
95 |
eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the
|
96 |
element is never expired.
|
97 |
overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
|
98 |
has reached the maxInMemory limit.
|
99 |
|
100 |
The following attributes are optional:
|
101 |
timeToIdleSeconds - Sets the time to idle for an element before it expires.
|
102 |
i.e. The maximum amount of time between accesses before an element expires
|
103 |
Is only used if the element is not eternal.
|
104 |
Optional attribute. A value of 0 means that an Element can idle for infinity.
|
105 |
The default value is 0.
|
106 |
timeToLiveSeconds - Sets the time to live for an element before it expires.
|
107 |
i.e. The maximum time between creation time and when an element expires.
|
108 |
Is only used if the element is not eternal.
|
109 |
Optional attribute. A value of 0 means that and Element can live for infinity.
|
110 |
The default value is 0.
|
111 |
diskPersistent - Whether the disk store persists between restarts of the Virtual Machine.
|
112 |
The default value is false.
|
113 |
diskExpiryThreadIntervalSeconds- The number of seconds between runs of the disk expiry thread. The default value
|
114 |
is 120 seconds.
|
115 |
memoryStoreEvictionPolicy - Policy would be enforced upon reaching the maxElementsInMemory limit. Default
|
116 |
policy is Least Recently Used (specified as LRU). Other policies available -
|
117 |
First In First Out (specified as FIFO) and Less Frequently Used
|
118 |
(specified as LFU)
|
119 |
|
120 |
Cache elements can also contain zero or more cacheEventListenerFactory elements.
|
121 |
|
122 |
The attributes of cacheManagerPeerProviderFactory are:
|
123 |
class - a fully qualified factory class name (required)
|
124 |
properties - comma separated properties having meaning only to the factory. (optional, depends on the factory)
|
125 |
-->
|
126 |
|
127 |
<!-- Sample cache named sampleCache1
|
128 |
This cache contains a maximum in memory of 10000 elements, and will expire
|
129 |
an element if it is idle for more than 5 minutes and lives for more than
|
130 |
10 minutes.
|
131 |
|
132 |
If there are more than 10000 elements it will overflow to the
|
133 |
disk cache, which in this configuration will go to wherever java.io.tmp is
|
134 |
defined on your system. On a standard Linux system this will be /tmp"
|
135 |
-->
|
136 |
<cache name="sampleCache1" |
137 |
maxElementsInMemory="10000" |
138 |
eternal="false" |
139 |
overflowToDisk="true" |
140 |
timeToIdleSeconds="300" |
141 |
timeToLiveSeconds="600" |
142 |
memoryStoreEvictionPolicy="LFU" |
143 |
/>
|
144 |
|
145 |
<!-- Sample cache named sampleCache2
|
146 |
This cache has a maximum of 1000 elements in memory. There is no overflow to disk, so 1000
|
147 |
is also the maximum cache size. Note that when a cache is eternal, timeToLive and timeToIdle
|
148 |
are not used and do not need to be specified -->
|
149 |
<cache name="sampleCache2" |
150 |
maxElementsInMemory="1000" |
151 |
eternal="true" |
152 |
overflowToDisk="false" |
153 |
memoryStoreEvictionPolicy="FIFO" |
154 |
/>
|
155 |
|
156 |
<!-- Sample cache named sampleCache3. This cache overflows to disk. The disk store is persistent
|
157 |
between cache and VM restarts. The disk expiry thread interval is set to 10 minutes, overriding
|
158 |
the default of 2 minutes. -->
|
159 |
|
160 |
<cache name="sampleCache3" |
161 |
maxElementsInMemory="500" |
162 |
eternal="false" |
163 |
overflowToDisk="true" |
164 |
timeToIdleSeconds="300" |
165 |
timeToLiveSeconds="600" |
166 |
diskPersistent="true" |
167 |
diskExpiryThreadIntervalSeconds="1" |
168 |
memoryStoreEvictionPolicy="LFU" |
169 |
/>
|
170 |
</ehcache>
|