Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0
    • Component/s: None
    • Labels:
      None

      Description

      Right now the s3guard.LocalMetadataStore uses two HashMap in the implementation - one for the file and one for the dir hash.

        /** Contains directories and files. */
        private Cache<Path, PathMetadata> fileCache;
      
        /** Contains directory listings. */
        private Cache<Path, DirListingMetadata> dirCache;
      

      It would be nice to have only one hash instead of these two for storing the values. An idea for the implementation would be to have a class with nullable fields:

        static class LocalMetaEntry {
          @Nullable
          public PathMetadata pathMetadata;
          @Nullable
          public DirListingMetadata dirListingMetadata;
        }
      

      or a Pair (tuple):

      Pair<PathMetadata, DirListingMetadata> metaEntry;
      

      And only one hash/cache for these elements.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gabor.bota Gabor Bota
                Reporter:
                gabor.bota Gabor Bota
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: