root / trunk / extensions / extGeoProcessing / lib / ehcache / ehcache.xml @ 11445
History | View | Annotate | Download (9.22 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 |
<!-- Sets the fully qualified class name to be registered as the CacheManager event listener.
|
15 |
The event listener allows implementers to register callback methods that will be executed when a CacheManager event occurs.
|
16 |
The events include:
|
17 |
- adding a Cache
|
18 |
- removing a Cache
|
19 |
|
20 |
Callbacks to these methods are synchronous and unsynchronized. It is the responsibility of the implementer
|
21 |
to safely handle the potential performance and thread safety issues depending on what their listener is doing.
|
22 |
|
23 |
net.sf.ehcache.event.NullCacheManagerEventListener is the default implementation, unless another is
|
24 |
specified. As the name suggests it does nothing.
|
25 |
-->
|
26 |
<!--<cacheManagerEventListenerFactory class="" properties=""/>-->
|
27 |
|
28 |
|
29 |
|
30 |
<!--Default Cache configuration. These will applied to caches programmatically created through
|
31 |
the CacheManager.
|
32 |
|
33 |
The following attributes are required:
|
34 |
|
35 |
maxElementsInMemory - Sets the maximum number of objects that will be created in memory
|
36 |
eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the
|
37 |
element is never expired.
|
38 |
overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
|
39 |
has reached the maxInMemory limit.
|
40 |
|
41 |
The following attributes are optional:
|
42 |
timeToIdleSeconds - Sets the time to idle for an element before it expires.
|
43 |
i.e. The maximum amount of time between accesses before an element expires
|
44 |
Is only used if the element is not eternal.
|
45 |
Optional attribute. A value of 0 means that an Element can idle for infinity.
|
46 |
The default value is 0.
|
47 |
timeToLiveSeconds - Sets the time to live for an element before it expires.
|
48 |
i.e. The maximum time between creation time and when an element expires.
|
49 |
Is only used if the element is not eternal.
|
50 |
Optional attribute. A value of 0 means that and Element can live for infinity.
|
51 |
The default value is 0.
|
52 |
diskPersistent - Whether the disk store persists between restarts of the Virtual Machine.
|
53 |
The default value is false.
|
54 |
diskExpiryThreadIntervalSeconds- The number of seconds between runs of the disk expiry thread. The default value
|
55 |
is 120 seconds.
|
56 |
memoryStoreEvictionPolicy - Policy would be enforced upon reaching the maxElementsInMemory limit. Default
|
57 |
policy is Least Recently Used (specified as LRU). Other policies available -
|
58 |
First In First Out (specified as FIFO) and Less Frequently Used
|
59 |
(specified as LFU)
|
60 |
cacheEventListenerClassNames - A comma separated list of CacheEventListeners. The fully qualified class name of
|
61 |
the class which implements CacheEventListener is required.
|
62 |
Registered listeners will be notified of cache events such as Element puts, removes and expiries
|
63 |
and Cache status changes. The default if unspecified is an empty notifications list
|
64 |
which does nothing.
|
65 |
-->
|
66 |
|
67 |
<defaultCache
|
68 |
maxElementsInMemory="10000" |
69 |
eternal="false" |
70 |
timeToIdleSeconds="120" |
71 |
timeToLiveSeconds="120" |
72 |
overflowToDisk="true" |
73 |
diskPersistent="false" |
74 |
diskExpiryThreadIntervalSeconds="120" |
75 |
memoryStoreEvictionPolicy="LRU" |
76 |
/>
|
77 |
|
78 |
<!--Predefined caches. Add your cache configuration settings here.
|
79 |
If you do not have a configuration for your cache a WARNING will be issued when the
|
80 |
CacheManager starts
|
81 |
|
82 |
The following attributes are required:
|
83 |
|
84 |
name - Sets the name of the cache. This is used to identify the cache.
|
85 |
It must be unique.
|
86 |
maxElementsInMemory - Sets the maximum number of objects that will be created in memory
|
87 |
eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the
|
88 |
element is never expired.
|
89 |
overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
|
90 |
has reached the maxInMemory limit.
|
91 |
|
92 |
The following attributes are optional:
|
93 |
timeToIdleSeconds - Sets the time to idle for an element before it expires.
|
94 |
i.e. The maximum amount of time between accesses before an element expires
|
95 |
Is only used if the element is not eternal.
|
96 |
Optional attribute. A value of 0 means that an Element can idle for infinity.
|
97 |
The default value is 0.
|
98 |
timeToLiveSeconds - Sets the time to live for an element before it expires.
|
99 |
i.e. The maximum time between creation time and when an element expires.
|
100 |
Is only used if the element is not eternal.
|
101 |
Optional attribute. A value of 0 means that and Element can live for infinity.
|
102 |
The default value is 0.
|
103 |
diskPersistent - Whether the disk store persists between restarts of the Virtual Machine.
|
104 |
The default value is false.
|
105 |
diskExpiryThreadIntervalSeconds- The number of seconds between runs of the disk expiry thread. The default value
|
106 |
is 120 seconds.
|
107 |
memoryStoreEvictionPolicy - Policy would be enforced upon reaching the maxElementsInMemory limit. Default
|
108 |
policy is Least Recently Used (specified as LRU). Other policies available -
|
109 |
First In First Out (specified as FIFO) and Less Frequently Used
|
110 |
(specified as LFU)
|
111 |
cacheEventListenerClassNames - A comma separated list of CacheEventListeners. The fully qualified class name of
|
112 |
the class which implements CacheEventListener is required.
|
113 |
Registered listeners will be notified of cache events such as Element puts, removes and expiries
|
114 |
and Cache status changes. The default if unspecified is an empty notifications list
|
115 |
which does nothing.
|
116 |
-->
|
117 |
|
118 |
<!-- Sample cache named sampleCache1
|
119 |
This cache contains a maximum in memory of 10000 elements, and will expire
|
120 |
an element if it is idle for more than 5 minutes and lives for more than
|
121 |
10 minutes.
|
122 |
|
123 |
If there are more than 10000 elements it will overflow to the
|
124 |
disk cache, which in this configuration will go to wherever java.io.tmp is
|
125 |
defined on your system. On a standard Linux system this will be /tmp"
|
126 |
-->
|
127 |
<cache name="sampleCache1" |
128 |
maxElementsInMemory="10000" |
129 |
eternal="false" |
130 |
overflowToDisk="true" |
131 |
timeToIdleSeconds="300" |
132 |
timeToLiveSeconds="600" |
133 |
memoryStoreEvictionPolicy="LFU" |
134 |
/>
|
135 |
|
136 |
<!-- Sample cache named sampleCache2
|
137 |
This cache has a maximum of 1000 elements in memory. There is no overflow to disk, so 1000
|
138 |
is also the maximum cache size. Note that when a cache is eternal, timeToLive and timeToIdle
|
139 |
are not used and do not need to be specified -->
|
140 |
<cache name="sampleCache2" |
141 |
maxElementsInMemory="1000" |
142 |
eternal="true" |
143 |
overflowToDisk="false" |
144 |
memoryStoreEvictionPolicy="FIFO" |
145 |
/>
|
146 |
|
147 |
<!-- Sample cache named sampleCache3. This cache overflows to disk. The disk store is persistent
|
148 |
between cache and VM restarts. The disk expiry thread interval is set to 10 minutes, overriding
|
149 |
the default of 2 minutes. -->
|
150 |
|
151 |
<cache name="sampleCache3" |
152 |
maxElementsInMemory="500" |
153 |
eternal="false" |
154 |
overflowToDisk="true" |
155 |
timeToIdleSeconds="300" |
156 |
timeToLiveSeconds="600" |
157 |
diskPersistent="true" |
158 |
diskExpiryThreadIntervalSeconds="1" |
159 |
memoryStoreEvictionPolicy="LFU" |
160 |
/>
|
161 |
|
162 |
<!-- Place configuration for your caches following -->
|
163 |
|
164 |
</ehcache>
|