Hi Vince. I'm pretty certain that the Python method is for convenience and not necessarily any more efficient than the three calls you would have to make with the Java API. Feel free to do your own benchmarking.
- Jason On Fri, Sep 4, 2009 at 12:27 PM, Vince Bonfanti <[email protected]> wrote: > > I notice that the Python memcache API supports an "increment with > initial value" operation: > > > http://code.google.com/appengine/docs/python/memcache/clientclass.html#Client_incr > > Are there any plans to support this on Java? In the Python > implementation, is this simply done as three memcache calls, something > like this: > > Long counter = memcache.increment( key, 1 ); > if ( counter == null ) { > memcache.put( key, (long)0, null, SetPolicy.ADD_ONLY_IF_NOT_PRESENT > ); > counter = memcache.increment( key, 1 ); > } > > If that's all Python is doing, then I don't see any value of adding it > to Java; but, if the Python implementation is somehow more efficient > than the three memcache calls in the Java example above, then I'd like > to see it added to Java. > > Thanks. > > Vince > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~----------~----~----~----~------~----~------~--~---
