[infinispan-issues] [JBoss JIRA] Created: (ISPN-748) provide an API to expose core operations omitting return values as safe alternative to Flags

Sanne Grinovero (JIRA) jira-events at lists.jboss.org
Fri Oct 29 10:22:56 EDT 2010


provide an API to expose core operations omitting return values as safe alternative to Flags
--------------------------------------------------------------------------------------------

                 Key: ISPN-748
                 URL: https://jira.jboss.org/browse/ISPN-748
             Project: Infinispan
          Issue Type: Feature Request
          Components: Core API
            Reporter: Sanne Grinovero
            Assignee: Manik Surtani
            Priority: Minor
             Fix For: 5.0.0.BETA1, 5.0.0.Final


On mailing list we discussed the possibility to provide the same methods as defined by Map but omitting return values.

This would be useful for those cases in which return values are not needed, so that Infinispan can enable all possible optimizations to disregard retrieveing an appropriate return value.
Several alternatives where proposed, and there's also an interesting proposal to do the same relating to async methods, and the combination of async+noReturn

A suggestion:

cache.noReturnValue().remote(K); //returns void and enables both flags SKIP_CACHE_LOAD and SKIP_REMOTE_LOOKUP.

The advantage is that people refactoring code don't have to remember to adjust flags according to using the return value or not, or would at least get a compiler error in case of abuse of method; also Infinispan might introduce more optimizations in future and apply them without code changes for new flags arising.

See all discussion started by: http://lists.jboss.org/pipermail/infinispan-dev/2010-October/006484.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the infinispan-issues mailing list