[infinispan-issues] [JBoss JIRA] Updated: (ISPN-1242) Add dynamic grouping capabilities for unmodifiable key classes.
Erik Salter (JIRA)
jira-events at lists.jboss.org
Thu Jul 14 16:02:23 EDT 2011
[ https://issues.jboss.org/browse/ISPN-1242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Erik Salter updated ISPN-1242:
------------------------------
Summary: Add dynamic grouping capabilities for unmodifiable key classes. (was: Add dynamic grouping capabilities for immutable key classes.)
> 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
> Reporter: Erik Salter
> Assignee: Manik Surtani
>
> 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