Examples of ObjectStoreException


Examples of com.antlersoft.odb.ObjectStoreException

        classList.classChangeLock.enterProtected();
        try
        {
            Index index=(Index)classList.indexMap.get( indexName);
            if ( index==null)
                throw new ObjectStoreException( "Index "+indexName+
                " undefined");
            return index.getIterator( toFind);
        }
        finally
        {
View Full Code Here

Examples of com.antlersoft.odb.ObjectStoreException

            for ( Iterator i=classEntry.indices.iterator(); i.hasNext();)
                ((IndexEntry)i.next()).index.insertKey( result, insertObject);
        }
        catch ( ClassNotFoundException cnfe)
        {
            throw new ObjectStoreException( "insert: class not found",
                cnfe);
        }
        catch ( IOException ioe)
        {
            throw new ObjectStoreException( "insert: IO Error",
                ioe);
        }
        catch ( DiskAllocatorException dae)
        {
            throw new ObjectStoreException(
                "insert: DiskAllocatorError", dae);
        }
        finally
        {
            classList.classChangeLock.leaveProtected();
View Full Code Here

Examples of com.antlersoft.odb.ObjectStoreException

              overhead.sync();
          }
        }
        catch ( IOException ioe)
        {
            throw new ObjectStoreException( "IO Error syncing",
                ioe);
        }
        catch ( DiskAllocatorException dae)
        {
            throw new ObjectStoreException(
                "DiskAllocator error syncing", dae);
        }
        finally
        {
          classList.classChangeLock.leaveProtected();
View Full Code Here

Examples of com.antlersoft.odb.ObjectStoreException

        }
    }

    public void rollback() throws ObjectStoreException
    {
        throw new ObjectStoreException(
            "DirectoryAllocatorStore does not support rollback");
    }
View Full Code Here

Examples of com.antlersoft.odb.ObjectStoreException

    public synchronized void close() throws ObjectStoreException
    {
        synchronized ( entryList)
        {
          ObjectStoreException storedException=null;
          try
          {
            sync();
          }
          catch ( ObjectStoreException ose)
          {
            storedException=ose;
          }
            try
            {
                classList.close();
            }
            catch ( IOException ioe)
            {
              if ( storedException==null)
                storedException=new ObjectStoreException( "IO error closing classlist", ioe);
              else
                storedException=new ObjectStoreException( "Exception closing classlist after sync exception: "+ioe.getMessage(), storedException);
            }
            try
            {
                overheadStreams.close();
            }
            catch ( IOException ioe)
            {
              if ( storedException==null)
                storedException=new ObjectStoreException( "IO error closing overhead streams", ioe);
              else
                storedException=new ObjectStoreException( "Exception closing overhead streams after class list exception: "+ioe.getMessage(), storedException);
            }
            if ( storedException!=null)
              emergencyCleanup( storedException);
        }
     }
View Full Code Here

Examples of com.antlersoft.odb.ObjectStoreException

                    flushIndexPage( toFlush);
                }
            }
            catch ( IOException ioe)
            {
                throw new ObjectStoreException( "IO Error paging index",
                    ioe);
            }
            catch ( DiskAllocatorException dae)
            {
                throw new ObjectStoreException(
                    "DiskAllocator error paging index", dae);
            }
            finally
            {
                indexPageFlushLock.leaveCritical();
View Full Code Here

Examples of com.antlersoft.odb.ObjectStoreException

            {
                toFree.thisPage.index.streams.freeImmovableObject( toFree.thisPage.offset);
            }
            catch ( IOException ioe)
            {
                throw new ObjectStoreException( "I/O Error freeing index page",
                    ioe);
            }
            catch ( DiskAllocatorException dae)
            {
                throw new ObjectStoreException( "Error freeing index page:",
                    dae);
            }
        }
    }
View Full Code Here

Examples of com.antlersoft.odb.ObjectStoreException

            return result;
        }
        catch ( ClassNotFoundException cnfe)
        {
            throw new ObjectStoreException( "Index page class not found",
                cnfe);
        }
        catch ( IOException ioe)
        {
            throw new ObjectStoreException( "IO Error paging index",
                ioe);
        }
        catch ( DiskAllocatorException dae)
        {
            throw new ObjectStoreException(
                "DiskAllocator error paging index", dae);
        }
    }
View Full Code Here

Examples of com.antlersoft.odb.ObjectStoreException

              entry.indexStreams.close();
            }
          }
          catch ( Exception e)
          {
            underlying=new ObjectStoreException( "Error closing object streams: "+e.getMessage(), underlying);
          }
        }
      }
      if ( overhead!=null)
      {
        try
        {
          overhead.close();
        }
        catch ( Exception e)
        {
          underlying=new ObjectStoreException( "Error closing overhead streams: "+e.getMessage(), underlying);
        }      
      }
      throw underlying;
    }
View Full Code Here

Examples of com.antlersoft.odb.ObjectStoreException

        try
        {
            ClassEntry entry=(ClassEntry)classMap.get( indexedClass);
            if ( entry==null)
                // Very rare circumstance; other thread snatched class from us
                throw new ObjectStoreException( "Class "+indexedClass.getName()
                    +" was removed.");
            if ( indexMap.get( indexName)!=null)
                throw new IndexExistsException( indexName);
            listModified=true;
            if ( entry.indexStreams==null)
            {
                entry.indexStreams=new StreamPair(
                  manager.createDiskAllocator(entry.fileName + "i", DirectoryAllocator.FAVORED_CHUNK_SIZE, 0),
                        factory.getCustomizer( indexedClass));
            }
            IndexEntry indexEntry=Index.createIndexEntry( indexName,
                keyGen, descending, unique, entriesPerPage, manager, entry.indexStreams);
            entry.indices.add( indexEntry);
            indexMap.put( indexName, indexEntry.index);

            // Add existing objects to index
            for ( Iterator i=entry.objectStreams.allocator.iterator();
                i.hasNext(); )
            {
                Object nextObject=entry.objectStreams.readObjectWithPrefix(
                    ((Integer)i.next()).intValue());
                indexEntry.index.insertKey( new DAKey(
                    entry.objectStreams.first, entry.objectStreams.second),
                    nextObject);
            }
        }
        catch ( ClassNotFoundException cnfe)
        {
            throw new ObjectStoreException(
                "Class not found while creating index", cnfe);
        }
        catch ( DiskAllocatorException dae)
        {
            throw new ObjectStoreException( "Error adding index: ", dae);
        }
        catch ( IOException ioe)
        {
            throw new ObjectStoreException( "I/O Error adding index: ", ioe);
        }
        finally
        {
            classChangeLock.leaveCritical();
        }
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.