[infinispan-dev] Clustering mode attribute

Manik Surtani manik at jboss.org
Fri Jul 17 09:00:06 EDT 2009


So the reason why I went with a more human-readable and case- 
insensitive approach (r, repl, replication => REPL, etc) is for user- 
friendliness and conciseness (the use of the single first letter) in  
peoples' config files.

Perhaps this can be documented as the complete name (replication,  
distribution, invalidation) where any uniquely identifying substring  
starting from the left will be allowed (case insensitive, of course).   
Modelling this in XSD could be tricky though.  :-)

On 15 Jul 2009, at 15:55, Vladimir Blagojevic wrote:

> On 7/15/09 4:28 PM, Manik Surtani wrote:
>>
>> On 15 Jul 2009, at 11:36, Vladimir Blagojevic wrote:
>>
>>> Hey dudes,
>>>
>>> Ambiguity that we allow in attribute mode of <clustering> element  
>>> is not good IMHO. Normally, we use allowedValues attribute of  
>>> ConfigurationElement annotation to capture that the type even  
>>> though is a String or int or whatever only allows only certain set  
>>> of values. We constrain properly locking, shutdownHook and what  
>>> not. However, for mode attribute in <clustering> we allow all  
>>> possible combination of substrings, upper caps, lower caps and  
>>> what not.
>>>
>>> I was wondering if we can constrain the allowed values to LOCAL,  
>>> INVALIDATION, REPL, and DIST.
>>
>> What about a regexp?  This is how I constrain it in the hand- 
>> written XSD.
> Hmmm, can work, but you calculate the trade off. If they are given  
> as comma delimited list, documentation is much more readable and I  
> think XML editor gives you drop down list for these options when  
> editing XML configuration file.
>
> Let me know.

--
Manik Surtani
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org







More information about the infinispan-dev mailing list