This is an automated email from the ASF dual-hosted git repository. bchapuis pushed a commit to branch data-refactoring in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git
commit 98f00c952609803d72fecaa9122f24338f9d82ff Author: Bertil Chapuis <[email protected]> AuthorDate: Sat Apr 5 09:29:36 2025 +0200 Format code --- .../src/main/java/org/apache/baremaps/data/memory/Memory.java | 8 ++++---- .../org/apache/baremaps/data/memory/MemoryMappedDirectory.java | 4 ++-- .../java/org/apache/baremaps/data/memory/MemoryMappedFile.java | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/baremaps-data/src/main/java/org/apache/baremaps/data/memory/Memory.java b/baremaps-data/src/main/java/org/apache/baremaps/data/memory/Memory.java index 5c3e39dc9..6e9a36b76 100644 --- a/baremaps-data/src/main/java/org/apache/baremaps/data/memory/Memory.java +++ b/baremaps-data/src/main/java/org/apache/baremaps/data/memory/Memory.java @@ -156,8 +156,8 @@ public abstract class Memory<T extends ByteBuffer> implements Closeable { protected abstract T allocate(int index, int size); /** - * Releases resources associated with this memory. - * Unlike {@link #clear()}, this method does not delete underlying data. + * Releases resources associated with this memory. Unlike {@link #clear()}, this method does not + * delete underlying data. * * @throws IOException if an I/O error occurs */ @@ -169,8 +169,8 @@ public abstract class Memory<T extends ByteBuffer> implements Closeable { } /** - * Deletes all data managed by this memory. - * Unlike {@link #close()}, this method removes underlying data. + * Deletes all data managed by this memory. Unlike {@link #close()}, this method removes + * underlying data. * * @throws IOException if an I/O error occurs */ diff --git a/baremaps-data/src/main/java/org/apache/baremaps/data/memory/MemoryMappedDirectory.java b/baremaps-data/src/main/java/org/apache/baremaps/data/memory/MemoryMappedDirectory.java index 37a7a9edf..d00e3a90a 100644 --- a/baremaps-data/src/main/java/org/apache/baremaps/data/memory/MemoryMappedDirectory.java +++ b/baremaps-data/src/main/java/org/apache/baremaps/data/memory/MemoryMappedDirectory.java @@ -90,10 +90,10 @@ public class MemoryMappedDirectory extends Memory<MappedByteBuffer> { public synchronized void clear() throws IOException { // Release resources first close(); - + // Clear the segment list segments.clear(); - + // Delete the directory and all files in it FileUtils.deleteRecursively(directory); } diff --git a/baremaps-data/src/main/java/org/apache/baremaps/data/memory/MemoryMappedFile.java b/baremaps-data/src/main/java/org/apache/baremaps/data/memory/MemoryMappedFile.java index be863a33d..54a9ddeb0 100644 --- a/baremaps-data/src/main/java/org/apache/baremaps/data/memory/MemoryMappedFile.java +++ b/baremaps-data/src/main/java/org/apache/baremaps/data/memory/MemoryMappedFile.java @@ -88,10 +88,10 @@ public class MemoryMappedFile extends Memory<MappedByteBuffer> { public synchronized void clear() throws IOException { // Release resources first close(); - + // Clear the segment list segments.clear(); - + // Delete the file Files.deleteIfExists(file); }
