[infinispan-dev] wildcard in cache names

Galder Zamarreno galder.zamarreno at redhat.com
Wed Sep 30 03:06:20 EDT 2009



On 09/29/2009 10:12 AM, Mircea Markus wrote:
>
> On Sep 28, 2009, at 2:04 PM, Galder Zamarreno wrote:
>
>>
>>
>> On 09/28/2009 10:24 AM, Mircea Markus wrote:
>>> Hi,
>>>
>>> While looking into a migration script for coherence I saw that they
>>> allow wildcard as cache names. E.g.
>>>
>>> <cache-mapping>
>>> <cache-name>*</cache-name>
>>> <scheme-name>default-replicated</scheme-name>
>>> </cache-mapping>
>>> <cache-mapping>
>>> <cache-name>VirtualCache</cache-name>
>>> <scheme-name>default-distributed</scheme-name>
>>> </cache-mapping>
>>>
>>>
>>>
>>> So when the code asks for any cache name, they will return the
>>> corresponding mapping:
>>> e.g.
>>>
>>>
>>> CacheFactory.getCache("SomeCache") would return the "default-
>>> replicated"
>>> cache, and CacheFactory.getCache("VirtualCache") would return the
>>> default-distributed cache.
>>
>> Hmmm, that seems to work exactly like out default and named caches do.
>> The default being the * one and the named cache the VirtualCache. Now,
>> the thing that would be different is if they allow things like:
>>
>>   <cache-mapping>
>>     <cache-name>Replicated*</cache-name>
>>     <scheme-name>default-replicated</scheme-name>
>>   </cache-mapping>
>>
>> And so, CacheFactory.getCache("Replicated1") and
>> CacheFactory.getCache("Replicated2") would return "default-
>> replicated".
> this is the kind of behavior I wanted to describe - thanks for the
> better suited example!
> So, does anyone see benefits in having this feature?

I see some benefit but right now this looks like an edge case to me and 
would not implement it.

>>
>>> Anyone working with coherence and found this feature useful? I'd
>>> love to
>>> see some use cases for this :)
>>>
>>> Cheers,
>>> Mircea
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> infinispan-dev mailing list
>>> infinispan-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>
>> --
>> Galder Zamarreño
>> Sr. Software Engineer
>> Infinispan, JBoss Cache
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

-- 
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache



More information about the infinispan-dev mailing list