[infinispan-issues] [JBoss JIRA] Updated: (ISPN-1242) Add dynamic grouping capabilities for unmodifiable key classes.
Pete Muir (JIRA)
jira-events at lists.jboss.org
Mon Jul 18 05:35:23 EDT 2011
[ https://issues.jboss.org/browse/ISPN-1242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pete Muir updated ISPN-1242:
----------------------------
Assignee: Pete Muir (was: Manik Surtani)
Affects Version/s: 5.0.0.CR7
Providing "ad-hoc" grouping support such as requested here will break a basic assumption of Infinispan - that any node can locate a key without any metadata about that key being available across the grid. The metadata required would be the group of the key, and this metadata would need distributing across the grid.
Because of this, we are deferring this issue for now, however if there are any community members who fancy taking this on, please speak up and we can discuss designs.
> Add dynamic grouping capabilities for unmodifiable key classes.
> ---------------------------------------------------------------
>
> Key: ISPN-1242
> URL: https://issues.jboss.org/browse/ISPN-1242
> Project: Infinispan
> Issue Type: Feature Request
> Affects Versions: 5.0.0.CR7
> Reporter: Erik Salter
> Assignee: Pete Muir
>
> The grouping API should be enhanced to add grouping capabilities to a a cache's put() or replace() methods.
> This encompasses the following scenario:
> Cache A uses a custom key class where the group is dynamically generated. Cache B's key is an unmodifiable String that needs to be grouped with the dynamic value of a key from Cache A. (Cache B's key can't be encapsulated in a custom key class since it needs to be queried from external entities that will not know the group context).
> And in pseudo-code:
> {code}
> Group class InternalResourceKey {
> String group;
> ...
> @Group
> String getGroup() {
> return group;
> }
> }
> InternalResourceKey key = new InternalResourceKey();
> {code}
> ...
> {code}
> resourceCache.lock( key );
> // Get the previous result.
> ResourceResult result = resourceCache.get( key );
> ResourceResult newResult = doWork( key, result );
> resourceCache.put( key, newResult );
> // I also want to group an external identifier that an external client knows about with the result so they will be on the same node
> employeeCache.put( "111-111-1111", newResult, key.getGroup() );
> {code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list