Interface BlockCache.Loader

Enclosing interface:
BlockCache

public static interface BlockCache.Loader
  • Method Details

    • getDependencies

      Map<String,BlockCache.Loader> getDependencies()
      The cache blocks that this loader depends on. If a loader has no dependencies, then it should return an empty map. All dependencies must be loaded before calling load(int, Map).
    • load

      byte[] load(int maxSize, Map<String,byte[]> dependencies)
      Loads a block. Anything returned by getDependencies() should be loaded and passed.
      Parameters:
      maxSize - This is the maximum block size that will be cached.
      Returns:
      The loaded block or null if loading the block would exceed maxSize.