Package net.glowstone.io
Interface ChunkIoService
- All Known Implementing Classes:
AnvilChunkIoService
public interface ChunkIoService
Provider of chunk I/O services.
Implemented by classes to provide a way of saving and loading chunks to external storage.
-
Method Summary
-
Method Details
-
read
Reads a single chunk. The provided chunk must not yet be initialized.- Parameters:
chunk
- The GlowChunk to read into.- Returns:
- if the read was successful.
- Throws:
IOException
- if an I/O error occurs.
-
write
Writes a single chunk.- Parameters:
chunk
- TheGlowChunk
to write from.- Throws:
IOException
- if an I/O error occurs.
-
unload
Unload the service, performing any cleanup necessary.- Throws:
IOException
- if an I/O error occurs.
-