public class SaveCubeColumns
extends java.lang.Object
implements java.io.Closeable
| Constructor and Description |
|---|
SaveCubeColumns(SaveSection2D saveSection2D,
SaveSection3D saveSection3D) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static SaveCubeColumns |
create(java.nio.file.Path directory) |
SaveSection2D |
getSaveSection2D() |
SaveSection3D |
getSaveSection3D() |
java.util.Optional<java.nio.ByteBuffer> |
load(EntryLocation2D location,
boolean createRegion)
Reads entry at given location.
|
java.util.Optional<java.nio.ByteBuffer> |
load(EntryLocation3D location,
boolean createRegion)
Reads entry at given location.
|
void |
save2d(EntryLocation2D location,
java.nio.ByteBuffer data)
Schedules entry for writing
This can be accessed from multiple threads.
|
void |
save3d(EntryLocation3D location,
java.nio.ByteBuffer data)
Schedules entry for writing
This can be accessed from multiple threads.
|
public SaveCubeColumns(SaveSection2D saveSection2D, SaveSection3D saveSection3D)
public SaveSection2D getSaveSection2D()
public SaveSection3D getSaveSection3D()
public void save3d(EntryLocation3D location, java.nio.ByteBuffer data) throws java.io.IOException
location - location of the entrydata - the entry data to be savedjava.io.IOException - when an unexpected IO error occurspublic void save2d(EntryLocation2D location, java.nio.ByteBuffer data) throws java.io.IOException
location - location of the entrydata - the entry data to be savedjava.io.IOException - when an unexpected IO error occurspublic java.util.Optional<java.nio.ByteBuffer> load(EntryLocation3D location, boolean createRegion) throws java.io.IOException
location - the location of the entry data to loadcreateRegion - if true, a new region file will be created and cached. This is the preferred option.java.io.IOException - when an unexpected IO error occurspublic java.util.Optional<java.nio.ByteBuffer> load(EntryLocation2D location, boolean createRegion) throws java.io.IOException
This can be accessed from multiple threads. (thread safe)
location - the location of the entry data to loadcreateRegion - if true, a new region file will be created and cached. This is the preferred option.java.io.IOException - when an unexpected IO error occurspublic static SaveCubeColumns create(java.nio.file.Path directory) throws java.io.IOException
directory - directory for the savejava.io.IOException - when an unexpected IO error occurspublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException