/** * * @param page * the page to write. The Page object must be fully populated with a valid pageId, type, and data. * @param marshaller * the marshaler to use to load the data portion of the Page, may be null if you do not wish to write the data. * @param overflow * If true, then if the page data marshalls to a bigger size than can fit in one page, then additional * overflow pages are automatically allocated and chained to this page to store all the data. If false, * and the overflow condition would occur, then the PageOverflowIOException is thrown. * @throws IOException * If an disk error occurred. * @throws PageOverflowIOException * If the page data marshalls to size larger than maximum page size and overflow was false. * @throws IllegalStateException * if the PageFile is not loaded */ public <T> void store(Page<T> page, Marshaller<T> marshaller, final boolean overflow) throws IOException { DataByteArrayOutputStream out = (DataByteArrayOutputStream)openOutputStream(page, overflow); if (marshaller != null) { marshaller.writePayload(page.get(), out); } out.close(); }
/** * * @param page * the page to write. The Page object must be fully populated with a valid pageId, type, and data. * @param marshaller * the marshaler to use to load the data portion of the Page, may be null if you do not wish to write the data. * @param overflow * If true, then if the page data marshalls to a bigger size than can fit in one page, then additional * overflow pages are automatically allocated and chained to this page to store all the data. If false, * and the overflow condition would occur, then the PageOverflowIOException is thrown. * @throws IOException * If an disk error occurred. * @throws PageOverflowIOException * If the page data marshalls to size larger than maximum page size and overflow was false. * @throws IllegalStateException * if the PageFile is not loaded */ public <T> void store(Page<T> page, Marshaller<T> marshaller, final boolean overflow) throws IOException { DataByteArrayOutputStream out = (DataByteArrayOutputStream)openOutputStream(page, overflow); if (marshaller != null) { marshaller.writePayload(page.get(), out); } out.close(); }
/** * * @param page * the page to write. The Page object must be fully populated with a valid pageId, type, and data. * @param marshaller * the marshaler to use to load the data portion of the Page, may be null if you do not wish to write the data. * @param overflow * If true, then if the page data marshalls to a bigger size than can fit in one page, then additional * overflow pages are automatically allocated and chained to this page to store all the data. If false, * and the overflow condition would occur, then the PageOverflowIOException is thrown. * @throws IOException * If an disk error occurred. * @throws PageOverflowIOException * If the page data marshalls to size larger than maximum page size and overflow was false. * @throws IllegalStateException * if the PageFile is not loaded */ public <T> void store(Page<T> page, Marshaller<T> marshaller, final boolean overflow) throws IOException { DataByteArrayOutputStream out = (DataByteArrayOutputStream)openOutputStream(page, overflow); if (marshaller != null) { marshaller.writePayload(page.get(), out); } out.close(); }
/** * * @param page * the page to write. The Page object must be fully populated with a valid pageId, type, and data. * @param marshaller * the marshaler to use to load the data portion of the Page, may be null if you do not wish to write the data. * @param overflow * If true, then if the page data marshalls to a bigger size than can fit in one page, then additional * overflow pages are automatically allocated and chained to this page to store all the data. If false, * and the overflow condition would occur, then the PageOverflowIOException is thrown. * @throws IOException * If an disk error occurred. * @throws PageOverflowIOException * If the page data marshalls to size larger than maximum page size and overflow was false. * @throws IllegalStateException * if the PageFile is not loaded */ public <T> void store(Page<T> page, Marshaller<T> marshaller, final boolean overflow) throws IOException { DataByteArrayOutputStream out = (DataByteArrayOutputStream)openOutputStream(page, overflow); if (marshaller != null) { marshaller.writePayload(page.get(), out); } out.close(); }