[infinispan-issues] [JBoss JIRA] (ISPN-1242) Add dynamic grouping capabilities for unmodifiable key classes.
Mircea Markus (JIRA)
issues at jboss.org
Fri Jan 24 14:04:28 EST 2014
[ https://issues.jboss.org/browse/ISPN-1242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mircea Markus updated ISPN-1242:
--------------------------------
Component/s: Core
> 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
> Components: Core
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list