move method only used in tests to the tests

This commit is contained in:
2018-10-13 20:03:02 +02:00
parent b42fec8fe2
commit a2520c0238
2 changed files with 13 additions and 14 deletions

View File

@@ -54,18 +54,6 @@ public class DiskStorage implements AutoCloseable {
fileChannel.close();
}
public long[] allocateBlocks(final int numNewBlocks, final int blockSize) throws IOException {
final long[] result = new long[numNewBlocks];
synchronized (fileChannel) {
for (int i = 0; i < numNewBlocks; i++) {
final long blockOffset = allocateBlock(blockSize);
result[i] = blockOffset;
}
}
return result;
}
public synchronized long allocateBlock(final int blockSize) throws IOException {
if (blockSize < FREE_LIST_NODE_SIZE) {