move method only used in tests to the tests
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user