Class RegionFileCache

java.lang.Object
net.glowstone.io.anvil.RegionFileCache

public class RegionFileCache extends Object
A simple cache and wrapper for efficiently accessing multiple RegionFiles simultaneously.
  • Constructor Details

    • RegionFileCache

      public RegionFileCache(File basePath, String extension)
  • Method Details

    • getRegionFile

      public RegionFile getRegionFile(int chunkX, int chunkZ)
      Returns the region file where a chunk is stored, opening it if necessary. Both the region file and the directory containing it will be created if they don't exist.
      Parameters:
      chunkX - the absolute chunk X coordinate
      chunkZ - the absolute chunk Z coordinate
      Returns:
      the region file
    • clear

      public void clear() throws RejectedExecutionException
      Throws:
      RejectedExecutionException