-
Notifications
You must be signed in to change notification settings - Fork 612
/
InfinispanMessages.java
296 lines (260 loc) · 12.1 KB
/
InfinispanMessages.java
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
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.as.clustering.infinispan;
import java.net.UnknownHostException;
import java.util.Properties;
import org.infinispan.commons.CacheConfigurationException;
import org.infinispan.configuration.cache.CacheMode;
import org.jboss.as.controller.OperationFailedException;
import org.jboss.as.controller.persistence.ConfigurationPersistenceException;
import org.jboss.as.domain.management.SecurityRealm;
import org.jboss.as.network.OutboundSocketBinding;
import org.jboss.logging.Messages;
import org.jboss.logging.annotations.Cause;
import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.MessageBundle;
import org.jboss.msc.inject.InjectionException;
import org.jboss.msc.service.StartException;
/**
* InfinispanMessages
*
* @author <a href="mailto:jperkins@redhat.com">James R. Perkins</a>
*/
@MessageBundle(projectCode = "DGISPN", length = 4)
public interface InfinispanMessages {
/**
* A logger with the category of the default clustering package.
*/
InfinispanMessages MESSAGES = Messages.getBundle(InfinispanMessages.class);
/**
* Creates an exception indicating a failure to resolve the outbound socket binding represented by the
* {@code binding} parameter.
*
* @param cause the cause of the error.
* @param binding the outbound socket binding.
*
* @return a {@link ConfigurationPersistenceException} for the error.
*/
@Message(id = 100, value = "Could not resolve destination address for outbound socket binding named '%s'")
InjectionException failedToInjectSocketBinding(@Cause UnknownHostException cause, OutboundSocketBinding binding);
@Message(id = 101, value = "Failed to add %s %s cache to non-clustered %s cache container.")
StartException transportRequired(CacheMode mode, String cache, String cacheContainer);
/**
* Creates an exception indicating an invalid cache store.
*
* @param cause the cause of the error.
* @param cacheStoreName the name of the cache store.
*
* @return an {@link OperationFailedException} for the error.
*/
@Message(id = 102, value = "%s is not a valid cache store")
OperationFailedException invalidCacheStore(@Cause Throwable cause, String cacheStoreName);
/**
* Creates an exception indicating an invalid cache store.
*
* @param cacheName the name of the cache store.
* @param cacheContainerName the container name.
*
* @return an {@link IllegalArgumentException} for the error.
*/
@Message(id = 103, value = "%s is not a valid default cache. The %s cache container does not contain a cache with that name")
IllegalArgumentException invalidDefaultCache(String cacheName, String cacheContainerName);
/**
* Creates an exception indicating the an executor property is invalid.
*
* @param id the id of the property.
* @param properties the properties that were searched.
*
* @return an {@link IllegalStateException} for the error.
*/
@Message(id = 104, value = "No %s property was specified within the executor properties: %s")
IllegalStateException invalidExecutorProperty(String id, Properties properties);
/**
* Creates an exception indicating the an transport property is invalid.
*
* @param id the id of the property.
* @param properties the properties that were searched.
*
* @return an {@link IllegalStateException} for the error.
*/
@Message(id = 105, value = "No %s property was specified within the transport properties: %s")
IllegalStateException invalidTransportProperty(String id, Properties properties);
/**
* Creates an exception indicating that the cache is aborting after the specified number of retries.
*
* @param cause the cause of the error.
* @param numberOfRetries the number of retries.
*
* @return a {@link RuntimeException}
*/
@Message(id = 106, value = "Aborting cache operation after %d retries.")
RuntimeException abortingCacheOperation(@Cause Throwable cause, int numberOfRetries);
/**
* Creates an exception indicating the an operation parameter is invalid.
*
* @param id the id of the parameter.
* @param allowableValues the allowable values for the parameter
*
* @return the String.
*/
@Message(id = 107, value = "Invalid value for parameter %s. Allowable values: %s")
String invalidParameterValue(String id, String allowableValues);
/**
* Creates an exception indicating the a cache store cannot be added as one already exists.
*
* @param existingStoreName the store which already exists.
*
* @return an {@link OperationFailedException} for the error.
*/
@Message(id = 108, value = "Cache store cannot be created: cache store %s is already defined")
OperationFailedException cacheStoreAlreadyDefined(String existingStoreName);
/**
* Creates an exception indicating the a cache store cannot be added as one already exists.
*
* @param propertyKey the name of the property.
*
* @return an {@link OperationFailedException} for the error.
*/
@Message(id = 109, value = "Value for property with key %s is not defined")
OperationFailedException propertyValueNotDefined(String propertyKey);
/**
* A message indicating that the resource could not be located.
*
* @param resourceName the name of the resource.
*
* @return the String message.
*/
@Message(id = 110, value = "Failed to locate %s")
String notFound(String resourceName);
/**
* A message indicating that the resource could not be parsed.
*
* @param resourceName the name of the resource.
*
* @return IllegalStateException instance.
*/
@Message(id = 111, value = "Failed to parse %s")
IllegalStateException failedToParse(@Cause Throwable cause, String resourceName);
/**
* Creates an exception indicating a singleton resource already exists.
*
* @param resourceName the name of the resource.
*
* @return an {@link OperationFailedException} for the error.
*/
@Message(id = 112, value = "Add operation failed: singleton %s already exists.")
OperationFailedException singletonResourceAlreadyExists(String resourceName);
/**
* Creates an exception indicating unable to remove an alias from an empty list of aliases.
*
* @param aliasName the name of the alias.
*
* @return an {@link OperationFailedException} for the error.
*/
@Message(id = 113, value = "cannot remove alias % from empty list.")
OperationFailedException cannotRemoveAliasFromEmptyList(String aliasName);
/**
* Creates an exception indicating that an attribute has been deprecated.
*
* @param attributeName the name of the deprecated attribute
* @return an {@link OperationFailedException} for the error
*/
@Message(id = 114, value = "Attribute '%s' has been deprecated.")
OperationFailedException attributeDeprecated(String attributeName);
@Message(id = 115, value = "Attribute 'segments' is an expression and therefore cannot be translated to legacy attribute 'virtual-nodes'. This resource will need to be ignored on that host.")
String virtualNodesDoesNotSupportExpressions();
/**
* Creates an exception indicating the a cache loader cannot be added as one already exists.
*
* @param existingStoreName the loader which already exists.
* @return an {@link OperationFailedException} for the error
*/
@Message(id = 116, value = "Cache loader cannot be created: cache loader %s is already defined")
OperationFailedException cacheLoaderAlreadyDefined(String existingStoreName);
/**
* Creates an exception indicating an invalid cache loader.
*
* @param cause the cause of the error.
* @param cacheLoaderName the name of the cache loader.
*
* @return an {@link IllegalArgumentException} for the error.
*/
@Message(id = 117, value = "%s is not a valid cache loader")
IllegalArgumentException invalidCacheLoader(@Cause Throwable cause, String cacheLoaderName);
/**
* Returns a message for failed operations
*
* @param message
* @return
*/
@Message(id = 118, value = "Failed to invoke operation: %s")
String failedToInvokeOperation(String message);
/**
* Creates an exception indicating an invalid compatibility marshaller.
*
* @param cause the cause of the error.
* @param marshallerClassName the name of the marshaller.
*
* @return an {@link IllegalArgumentException} for the error.
*/
@Message(id = 119, value = "%s is not a valid marshaller")
IllegalArgumentException invalidCompatibilityMarshaller(@Cause Throwable cause, String marshallerClassName);
/**
* Creates an exception indicating incompatible parameter sizes
*
* @param firstParameter the first parameter name
* @param secondParameter the second parameter name
* @return an {@link IllegalArgumentException} for the error.
*/
@Message(id = 120, value = "Parameter %s must be the same size as parameter %s")
IllegalArgumentException invalidParameterSizes(String firstParameter, String secondParameter);
/**
* Creates an exception indicating incompatible parameter type
*
* @param name the parameter name
* @param requiredType the required type of the parameter
* @return an {@link IllegalArgumentException} for the error.
*/
@Message(id = 121, value = "Parameter %s must be of type %s")
IllegalArgumentException invalidParameterType(String name, String requiredType);
/**
* Error message thrown when Subsystem can't instantiate given class.
*/
@Message(id = 122, value = "Could not instantiate class %s")
IllegalStateException unableToInstantiateClass(String className);
@Message(id = 123, value = "%s has been removed since 9.0.0. Please use %s instead")
CacheConfigurationException removeJDBCStoreSpecified(String oldStore, String newStore);
@Message(id = 124, value = "Could not inject resolve destination address for outbound socket binding named '%s'")
InjectionException failedToInjectSecurityRealm(@Cause UnknownHostException cause, SecurityRealm realm);
@Message(id = 125, value = "%s is not a valid EntryMergePolicy")
IllegalArgumentException invalidEntryMergePolicy(@Cause Throwable cause, String mergePolicy);
@Message(id = 126, value = "Cannot create cache '%s'")
CacheConfigurationException cannotCreateCache(@Cause Throwable cause, String name);
@Message(id = 127, value = "Cannot remove cache '%s'")
CacheConfigurationException cannotRemoveCache(@Cause Throwable e, String name);
@Message(id = 128, value = "Cache '%s' does not exist")
CacheConfigurationException nonExistingCache(String name);
@Message(id = 129, value = "Cannot create non-permanent cache '%s'")
CacheConfigurationException cannotCreateNonPermamentCache(String name);
@Message(id = 130, value = "Cannot create cache '%s' since template '%s' does not exist")
CacheConfigurationException nonExistingTemplate(String name, String template);
}