/** * Creates a new block file which contains an AVL tree. * * @param objectPool An existing object pool to get blocks from. * @param file A {@link java.io.File} object giving the details of the file. * @param payloadSize Size of the payload in longs. Must be at least 1. * @throws IOException If an i/o error occurs. */ public AVLFile( ObjectPool objectPool, File file, int payloadSize ) throws IOException { if (payloadSize < 1) { throw new IllegalArgumentException("payloadSize is less than 1"); } avlBlockFile = new ManagedBlockFile( objectPool, file, (AVLNode.HEADER_SIZE + payloadSize) * Constants.SIZEOF_LONG, BlockFile.IOType.MAPPED ); this.payloadSize = payloadSize; }
blockFiles[i] = new ManagedBlockFile( writerObjectPool, fileName + ".sp_" + num, blockSize, blockSize > MappedBlockFile.REGION_SIZE ?