Interface BlockCache.Loader
-
- Enclosing interface:
- BlockCache
public static interface BlockCache.Loader
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,BlockCache.Loader>
getDependencies()
The cache blocks that this loader depends on.byte[]
load(int maxSize, Map<String,byte[]> dependencies)
Loads a block.
-
-
-
Method Detail
-
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 callingload(int, Map)
.
-
load
byte[] load(int maxSize, Map<String,byte[]> dependencies)
Loads a block. Anything returned bygetDependencies()
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.
-
-