Examples of unref()


Examples of org.tmatesoft.sqljet.core.internal.ISqlJetPage.unref()

                         * rollback journal.
                         */
                        pDbPage.dontWrite();
                    }
                } finally {
                    pDbPage.unref();
                }
            }

            /* Overwrite the data in page i of the target database */
            if (i != iSkip && i <= nNewPage) {
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetPage.unref()

                        nTo += (((iFrom - 1) * nFromPageSize) - (i - 1) * nToPageSize);
                        nCopy = nFromPageSize;
                    }
                    SqlJetUtility.memcpy(zTo, nTo, zFrom, nFrom, nCopy);

                    pFromPage.unref();
                }

                if (pToPage != null) {
                    SqlJetMemPage p = (SqlJetMemPage) pToPage.getExtra();
                    p.isInit = false;
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetPage.unref()

                }

                pFromPage = pBtFrom.pPager.getPage(iFrom);
                ISqlJetMemoryPointer zFrom = pFromPage.getData();
                pFile.write(zFrom, nFromPageSize, iOff);
                pFromPage.unref();
            }
        }

        /* Sync the database file */
        try {
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetPage.unref()

             * If the b-tree is not holding a reference to page 1, then one was
             * requested from the pager layer in the above block. Release it
             * now.
             */
            if (pBt.pPage1 == null) {
                pDbPage.unref();
            }

            /* Grab the read-lock on page 1. */
            lockTable(1, SqlJetBtreeLockMode.READ);

View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetPage.unref()

            TRACE("PTRMAP_UPDATE: %d->(%d,%d)\n", key, eType, parent);
            pDbPage.write();
            SqlJetUtility.putUnsignedByte(pPtrmap, offset, eType);
            SqlJetUtility.put4byte(pPtrmap, offset + 1, parent);
        }
        pDbPage.unref();
    }

    /**
     * Read an entry from the pointer map.
     *
 
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetPage.unref()

        assert (pEType != null && pEType.length > 0);
        pEType[0] = (short) SqlJetUtility.getUnsignedByte(pPtrmap, offset);
        if (pPgno != null && pPgno.length > 0)
            pPgno[0] = SqlJetUtility.get4byte(pPtrmap, offset + 1);

        pDbPage.unref();

        if (pEType[0] < 1 || pEType[0] > 5)
            throw new SqlJetException(SqlJetErrorCode.CORRUPT);
    }
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetPage.unref()

            int nMax;
            try {
                nMax = getPageCount();
            } catch (SqlJetException e) {
                page.unref();
                throw e;
            }

            if (nMax < pageNumber || memDb || !read) {
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetPage.unref()

            }

            if (nMax < pageNumber || memDb || !read) {

                if (pageNumber > mxPgno) {
                    page.unref();
                    throw new SqlJetException(SqlJetErrorCode.FULL);
                }

                SqlJetUtility.memset(page.getData(), (byte) 0, pageSize);
                if (!read) {
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetPage.unref()

            assert (pageCache.getRefCount() > 0 || 1 == pageNumber);
            if (read) {
                try {
                    getContent(page);
                } catch (SqlJetException e) {
                    page.unref();
                    throw e;
                }
            }
        }
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetPage.unref()

                            this.dbSize = this.dbOrigSize;
                            for (i = dbSize + 1; i <= this.dbOrigSize; i++) {
                                if (!SqlJetUtility.bitSetTest(pagesInJournal, i) && i != iSkip) {
                                    final ISqlJetPage pg = getPage(i);
                                    pg.write();
                                    pg.unref();
                                }
                            }
                            this.dbSize = dbSize;
                        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.