Package com.antlersoft.odb

Examples of com.antlersoft.odb.InvalidObjectKeyException


        {
            int localOffset=key.index%ENTRY_PAGE_SIZE;
            deleteLock.enterCritical();
            EntryPage page=makePageCurrent( streams, key.index/ENTRY_PAGE_SIZE);
            if ( key.reuseCount!=page.reuseCount[localOffset])
                throw new InvalidObjectKeyException();
            int classIndex=page.classIndex[localOffset];
            try
            {
                classList.classChangeLock.enterProtected();
                if ( classIndex>classList.classEntries.size() || classIndex<0)
                    throw new InvalidObjectKeyException();
                ClassEntry classEntry=
                    (ClassEntry)classList.classEntries.get( classIndex);
                if ( classEntry.reuseCount!=page.classReuse[localOffset])
                    throw new InvalidObjectKeyException();
                classEntry.objectStreams.enterCritical();
                try
                {
                  if ( classEntry.indices.size()!=0)
                  {
View Full Code Here


            EntryPage page;
            page=makePageCurrent( streams, key.index/ENTRY_PAGE_SIZE);
            int localOffset=key.index%ENTRY_PAGE_SIZE;
            if ( page.reuseCount[localOffset]!=key.reuseCount ||
                page.classIndex[localOffset]<0)
                throw new InvalidObjectKeyException();
            page.offset[localOffset]=region;
            page.modified=true;
        }
        finally
        {
View Full Code Here

        {
            deleteLock.enterProtected();
            EntryPage page=makePageCurrent( streams, key.index/ENTRY_PAGE_SIZE);
            int localOffset=key.index%ENTRY_PAGE_SIZE;
            if ( key.reuseCount!=page.reuseCount[localOffset])
                throw new InvalidObjectKeyException();
            int classIndex=page.classIndex[localOffset];
            try
            {
                classList.classChangeLock.enterProtected();
                if ( classIndex>classList.classEntries.size() ||
                    classIndex<0)
                    throw new InvalidObjectKeyException();
                ClassEntry classEntry=
                    (ClassEntry)classList.classEntries.get( classIndex);
                if ( classEntry.reuseCount!=page.classReuse[localOffset])
                    throw new InvalidObjectKeyException();
                classEntry.objectStreams.enterProtected();
                try
                {
                  return classEntry.objectStreams.readObjectWithPrefix(
                      page.offset[localOffset]);
View Full Code Here

        {
            deleteLock.enterProtected();
            EntryPage page=makePageCurrent( streams, key.index/ENTRY_PAGE_SIZE);
            int localOffset=key.index%ENTRY_PAGE_SIZE;
            if ( key.reuseCount!=page.reuseCount[localOffset])
                throw new InvalidObjectKeyException();
            int classIndex=page.classIndex[localOffset];
            try
            {
                classList.classChangeLock.enterProtected();
                if ( classIndex>classList.classEntries.size() ||
                    classIndex<0)
                    throw new InvalidObjectKeyException();
                ClassEntry classEntry=
                    (ClassEntry)classList.classEntries.get( classIndex);
                if ( classEntry.reuseCount!=page.classReuse[localOffset])
                    throw new InvalidObjectKeyException();
                classEntry.objectStreams.enterCritical();
                try
                {
                  if ( classEntry.indices.size()!=0)
                  {
View Full Code Here

    private EntryPage makePageCurrent( StreamPair streams, int pageIndex)
        throws ClassNotFoundException, DiskAllocatorException, IOException, InvalidObjectKeyException
    {
      pageFlushLock.enterProtected();
      if (pageIndex < 0 || pageIndex > pages.size())
        throw new InvalidObjectKeyException();
        EntryPageHeader header=(EntryPageHeader)pages.get( pageIndex);
        if ( header.page!=null)
        {
            promotePage( pageIndex);
            return header.page;
View Full Code Here

TOP

Related Classes of com.antlersoft.odb.InvalidObjectKeyException

Copyright © 2018 www.massapicom. 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.