Package net.glowstone.io.anvil
Class RegionFileCache
java.lang.Object
net.glowstone.io.anvil.RegionFileCache
A simple cache and wrapper for efficiently accessing multiple RegionFiles simultaneously.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
getRegionFile
(int chunkX, int chunkZ) Returns the region file where a chunk is stored, opening it if necessary.
-
Constructor Details
-
RegionFileCache
-
-
Method Details
-
getRegionFile
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 coordinatechunkZ
- the absolute chunk Z coordinate- Returns:
- the region file
-
clear
- Throws:
RejectedExecutionException
-