forked from ehcache/ehcache.github.io
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathehcache-clustered-ext-3.11.xsd
More file actions
304 lines (275 loc) · 10.8 KB
/
Copy pathehcache-clustered-ext-3.11.xsd
File metadata and controls
304 lines (275 loc) · 10.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
<?xml version="1.0"?>
<!--
~ Copyright Terracotta, Inc.
~ Copyright IBM Corp. 2024, 2025
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<xs:schema version="1.0"
xmlns:eh="http://www.ehcache.org/v3"
xmlns:tc="http://www.ehcache.org/v3/clustered"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
targetNamespace="http://www.ehcache.org/v3/clustered">
<xs:import namespace="http://www.ehcache.org/v3"/>
<!--
Service configuration elements
-->
<xs:element name="cluster" type="tc:cluster-spec" substitutionGroup="eh:service-creation-configuration">
<xs:annotation>
<xs:documentation xml:lang="en">
Used within the /config/service element of an Ehcache configuration, this element
describes cluster service properties.
</xs:documentation>
</xs:annotation>
</xs:element>
<!--
Top level elements open for extension via substitution groups
-->
<xs:element name="cluster-connection" type="tc:cluster-connection-spec">
<xs:annotation>
<xs:documentation>
Specifies the cluster connection as a sequence of servers and a cluster tier manager identifier.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="connection" type="tc:connection-spec">
<xs:annotation>
<xs:documentation>
Specifies the cluster connection as a single embedded URL.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="server-side-config" type="tc:server-side-config-spec">
<xs:annotation>
<xs:documentation>
Specifies the server-side configuration of the entity to be accessed and or created.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="cluster-spec">
<xs:sequence minOccurs="1" maxOccurs="1">
<xs:choice>
<xs:element ref="tc:cluster-connection"/>
<xs:element ref="tc:connection"/>
</xs:choice>
<xs:element name="read-timeout" type="eh:time-type-with-prop-subst" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Specifies the amount of time a cache read operation will wait for a response from a cluster
server before abandoning the cluster operation.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="write-timeout" type="eh:time-type-with-prop-subst" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Specifies the amount of time a cache write operation will wait for a response from a cluster
server before abandoning the cluster operation.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="connection-timeout" type="eh:time-type-with-prop-subst" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Specifies the amount of time a cache will wait to connect to a cluster
server before abandoning the cluster operation.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="tc:server-side-config" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="connection-spec">
<xs:attribute name="url" type="tc:connectionUrl" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">
Identifies a single cluster member by URL.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:simpleType name="connectionUrl">
<xs:union memberTypes="eh:stringWithProperties">
<xs:simpleType>
<xs:restriction base="xs:anyURI">
<xs:pattern value="\w+://([^\]\[/?#@]+@)?[^:?#/]+(:[1-9][0-9]{0,4})?(,([^\]\[/?#@]+@)?[^:?#/]+(:[1-9][0-9]{0,4})?)*(/[^?#]*)?(\?[^#]*)?(#.*)?"/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:complexType name="cluster-connection-spec">
<xs:sequence>
<xs:element name="server" type="tc:server" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="cluster-tier-manager" type="eh:propertyOrString" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">
Cluster Tier Manager identifier.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="server">
<xs:annotation>
<xs:documentation xml:lang="en">
Data specific to a particular server.
</xs:documentation>
</xs:annotation>
<xs:attribute name="host" type="eh:propertyOrString" use="required">
<xs:annotation>
<xs:documentation>
The host that the server is running on.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="port" type="eh:propertyOrPositiveInteger">
<xs:annotation>
<xs:documentation>
The port that the server is listening on.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="server-side-config-spec">
<xs:sequence>
<xs:element name="default-resource" type="tc:default-resource-spec" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Specifies the default server-side storage resource to use for storing cache data.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="shared-pool" type="tc:shared-pool-spec" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
Defines a pool of server-side storage resource to be shared amongst multiple caches.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="auto-create" type="xs:boolean" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
True if server side components should be automatically created if they are absent.
This attribute is deprecated, and has been replaced by the 'client-mode' attribute.
Use of both at the same time (although legal per the schema) will fail at parse time in Ehcache.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="client-mode" type="tc:client-mode-spec" use="optional">
<xs:annotation>
<xs:documentation> xml:lang="en">
The client connection behavior, either:
* expecting - expect a matching server configuration (fail otherwise)
* auto-create - expect a matching server configuration or create one if none is present
* auto-create-on-reconnect - as 'auto-create' but also auto-create on reconnection
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="default-resource-spec">
<xs:attributeGroup ref="tc:from-required"/>
</xs:complexType>
<xs:complexType name="shared-pool-spec">
<xs:complexContent>
<xs:extension base="eh:memory-type-with-prop-subst">
<xs:attribute name="name" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
Shared pool name.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="tc:from-optional"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="client-mode-spec">
<xs:union memberTypes="eh:propertyReference">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="expecting"/>
<xs:enumeration value="auto-create"/>
<xs:enumeration value="auto-create-on-reconnect"/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:element name="clustered-dedicated" type="tc:clustered-dedicated-resource-type" substitutionGroup="eh:resource">
<xs:annotation>
<xs:documentation>
Clustered cache resource with a dedicated size.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="clustered-dedicated-resource-type">
<xs:complexContent>
<xs:extension base="eh:memory-type-with-prop-subst">
<xs:attributeGroup ref="tc:from-optional"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="clustered-shared" type="tc:clustered-shared-resource-type" substitutionGroup="eh:resource">
<xs:annotation>
<xs:documentation>
Clustered cache resource sharing a pool with other cache resources.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="clustered-shared-resource-type">
<xs:attribute name="sharing" type="eh:propertyOrString" use="required">
<xs:annotation>
<xs:documentation>
Name of the shared pool this resource uses.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:element name="clustered" substitutionGroup="eh:resource">
<xs:annotation>
<xs:documentation>
Clustered cache resource which inherits the resource pool configured on the server.
</xs:documentation>
</xs:annotation>
<xs:complexType/>
</xs:element>
<xs:attributeGroup name="from-optional">
<xs:attribute name="from" type="eh:propertyOrString" use="optional">
<xs:annotation>
<xs:documentation>
Optional reference to a server-side storage resource.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:attributeGroup name="from-required">
<xs:attribute name="from" type="eh:propertyOrString" use="required">
<xs:annotation>
<xs:documentation>
Required reference to a server-side storage resource.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="clustered-store" type="tc:clustered-store-type" substitutionGroup="eh:service-configuration"/>
<xs:complexType name="clustered-store-type">
<xs:attribute name="consistency" type="tc:consistency-type" default="eventual"/>
</xs:complexType>
<xs:simpleType name="consistency-type">
<xs:restriction base="xs:string">
<xs:enumeration value="eventual"/>
<xs:enumeration value="strong"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>