/** * @param factory optional * @param cache optional * @param crypto optional */ static DurablePageDb open(boolean explicitPageSize, int pageSize, File[] files, FileFactory factory, EnumSet<OpenOption> options, PageCache cache, Crypto crypto, boolean destroy) throws IOException { while (true) { try { return new DurablePageDb (openPageArray(pageSize, files, factory, options), cache, crypto, destroy); } catch (WrongPageSize e) { if (explicitPageSize) { throw e.rethrow(); } pageSize = e.mActual; explicitPageSize = true; } } }
/** * @param factory optional * @param cache optional * @param crypto optional */ static DurablePageDb open(EventListener debugListener, boolean explicitPageSize, int pageSize, File[] files, FileFactory factory, EnumSet<OpenOption> options, PageCache cache, Crypto crypto, boolean destroy) throws IOException { while (true) { try { return new DurablePageDb (debugListener, openPageArray(pageSize, files, factory, options), cache, crypto, destroy); } catch (WrongPageSize e) { if (explicitPageSize) { throw e.rethrow(); } pageSize = e.mActual; explicitPageSize = true; } } }
/** * @param factory optional * @param cache optional * @param crypto optional */ static DurablePageDb open(EventListener debugListener, boolean explicitPageSize, int pageSize, File[] files, FileFactory factory, EnumSet<OpenOption> options, PageCache cache, Crypto crypto, boolean destroy) throws IOException { while (true) { try { return new DurablePageDb (debugListener, openPageArray(pageSize, files, factory, options), cache, crypto, destroy); } catch (WrongPageSize e) { if (explicitPageSize) { throw e.rethrow(); } pageSize = e.mActual; explicitPageSize = true; } } }
buffer = new byte[pageSize]; bufferPage = p_transfer(buffer); pa = openPageArray(pageSize, files, factory, options); if (!pa.isEmpty()) { throw new DatabaseException("Cannot restore into a non-empty file"); pa = openPageArray(pageSize, files, factory, options);
buffer = new byte[pageSize]; bufferPage = p_transfer(buffer); pa = openPageArray(pageSize, files, factory, options); if (!pa.isEmpty()) { throw new DatabaseException("Cannot restore into a non-empty file"); pa = openPageArray(pageSize, files, factory, options);
PageArray pa = openPageArray(pageSize, files, factory, options);