1 Reply Latest reply on Jan 17, 2007 9:48 AM by manik

    CacheLoader for very large data store

    pithray

      Hi,

      I am considering JBossCache with a custom CacheLoader for a very large data store. For nodes with large numbers of attributes, must I actually return all the attributes when implementing the following:

      Map get(Fqn name) throws Exception;
      byte[] loadEntireState() throws Exception;

      I will not be calling TreeCache.get(Fqn fqn) or any other TreeCache method that returns the full set of keys or values.

      Best regards,
      Tom

        • 1. Re: CacheLoader for very large data store
          manik

          loadEntireState() is used to transfer state to new cache instances in the cluster (unless you're using a shared cache loader - one where every instance points to a shared physical data store such as a database - in which case this won't be called)

          CacheLoader.get() is called in a number of cases, including TreeCache.put() TreeCache.remove(Fqn fqn, Object key) so it is quite necessary.

          If you have a very large number of attributes it may make sense to break up the attributes and spread them across different nodes. Improves concurrency and gives you finer grained control when it comes to passivating to disk.