3 Replies Latest reply on Apr 17, 2009 9:34 AM by jmesnil

    StorageManager API

    jmesnil

      The StorageManager interface has the method

       void loadMessageJournal(PostOffice postOffice,
       StorageManager storageManager,
       HierarchicalRepository<AddressSettings> addressSettingsRepository,
       Map<Long, Queue> queues,
       ResourceManager resourceManager,
       Map<SimpleString, List<Pair<byte[], Long>>> duplicateIDMap) throws Exception;
      


      The only place we call this method in the source, the storageManager passed in parameter in the storageManager instance we called the method on.
      Does it make sense to call this method with *another* storageManager instance or should the storageManager parameter be removed?


        • 1. Re: StorageManager API
          jmesnil

          If I'm not mistaken there are other useless dependencies for this API (PostOffice, addressSettingsRepository)

          the simplest API that could possibly work is:

          public void loadMessageJournal(final PagingManager pagingManager,
           final ResourceManager resourceManager,
           final Map<Long, Queue> queues,
           final Map<SimpleString, List<Pair<byte[], Long>>> duplicateIDMap) throws Exception
          


          I'm looking at the dependencies between components when the server is started. Having the minimal dependencies which *really* count helps see how things should be properly created/started/deployed.

          • 2. Re: StorageManager API
            timfox

            Yes, please remove any unneeded dependencies :)

            • 3. Re: StorageManager API
              jmesnil

              It's when you have to draw a dependency graph than you really appreciate enforcing Demeter's law ;)