[jboss-dev-forums] [Design of JBossCache] - Re: JBoss Cache Public API

manik.surtani@jboss.com do-not-reply at jboss.com
Mon Jun 9 13:55:15 EDT 2008


"genman" wrote : 
  | The problem with "putAll" (and "put" and "remove") is that they require a storage read for every call. If you can get them to perform okay, then I don't really care.
  | 

Why?  I agree that such calls should be optimised by the Interceptors not to do a load if the state needed is already in mem (for the return value of a put or remove), but beyond that, why would putAll, etc. do a storage read?

"genman" wrote : 
  | "manik.surtani at jboss.com" wrote : 
  |   | Something like this already exists - JBCACHE-1082.  Needs to be worked in to the codebase, properly profiled and optimised though.
  | 
  | It'd be nice if there was a canonical key object though. Something that could be optimally serialized and deserialized as a single byte using the existing CacheMarshaller. Maybe like have something like:
  | 
  | 
  |   | public interface Node {
  |   | 
  |   |    private enum Key { KEY; }
  |   | 
  |   |    /** For nodes that store a single value, use this as the key */ 
  |   |    Object key = KEY;
  |   | 
  |   |    ... node methods here
  |   | }
  |   | 
  | 
  | "enum" is good for creating singleton instances.

Yup.  Good thoughts to add to the relevant JIRA.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156790#4156790

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156790



More information about the jboss-dev-forums mailing list