Examples of ObjectStoreException


Examples of com.antlersoft.odb.ObjectStoreException

            {
                return new ClassIterator( entry.objectStreams);
            }
            catch ( IOException ioe)
            {
                throw new ObjectStoreException( "Creating iterator:", ioe);
            }
        }
        finally
        {
            classChangeLock.leaveProtected();
View Full Code Here

Examples of com.antlersoft.odb.ObjectStoreException

                        result.objectStreams=new StreamPair( allocator,
                            factory.getCustomizer( toFind));
                    }
                    catch ( Exception dae)
                    {
                        throw new ObjectStoreException( "Failed creating allocator "+
                            result.fileName+" for class "+result.className, dae);
                    }
                }
                else
                {
                    classIndex=classEntries.size();
                    result=new ClassEntry();
                    result.reuseCount=0;
                    result.index=classEntries.size();
                    result.className=toFind.getName();
                    result.fileName=Integer.toString( classIndex);
                    result.indices=new ArrayList();
                    try
                    {
                        DiskAllocator allocator=manager.createDiskAllocator(result.fileName, 128, DiskAllocator.FORCE_CREATE);
                        result.objectStreams=new StreamPair( allocator,
                            factory.getCustomizer( toFind));
                    }
                    catch ( Exception dae)
                    {
                        throw new ObjectStoreException( "Failed creating allocator "+
                            result.fileName+" for class "+result.className, dae);
                    }
                    classEntries.add( result);
                }
                classMap.put( toFind, result);
View Full Code Here

Examples of com.antlersoft.odb.ObjectStoreException

        {
            entry.startPageOffset=streams.writeImmovableObject( startPage, 0);
        }
        catch ( IOException ioe)
        {
            throw new ObjectStoreException( "I/O error creating index start page",
                ioe);
        }
        catch ( DiskAllocatorException dae)
        {
            throw new ObjectStoreException( "Error creating index start page:",
                dae);
        }
        entry.index=new Index( manager, entry, streams);
        startPage.thisPage=entry.index.getTopKey();
        manager.addNewIndexPageToCache( startPage);
View Full Code Here

Examples of com.antlersoft.odb.ObjectStoreException

        streams.enterProtected();
        evaluatePageStatistics( result, entry.startPageOffset);
      }
      catch ( ClassNotFoundException cnfe)
      {
        throw new ObjectStoreException( "getStatistics ", cnfe);
      }
      catch ( DiskAllocatorException dae)
      {
        throw new ObjectStoreException( "getStatistics allocator error ", dae);
      }
      catch ( IOException ioe)
      {
        throw new ObjectStoreException( "getStatistic io error", ioe);
      }
      finally
      {
        streams.leaveProtected();
      }
View Full Code Here

Examples of com.antlersoft.odb.ObjectStoreException

        streams.enterProtected();
        validateIndexPage(freeSet, entry.startPageOffset, null);
      }
      catch ( ClassNotFoundException cnfe)
      {
        throw new ObjectStoreException( "validate ", cnfe);
      }
      catch ( DiskAllocatorException dae)
      {
        throw new ObjectStoreException( "validate allocator error ", dae);
      }
      catch ( IOException ioe)
      {
        throw new ObjectStoreException( "validate io error", ioe);
      }
      finally
      {
        streams.leaveProtected();
      }
View Full Code Here

Examples of com.antlersoft.odb.ObjectStoreException

      IndexPage page=(IndexPage)streams.readImmovableObject(offset);
      Comparable previous=null;
      if ( parentKey!=null)
      {
        if ( parentKey.compareTo( page.keyArray[0])!=0)
          throw new ObjectStoreException( "Key in parent page doesn't match first key in child");
      }
      for ( int i=0; i<page.size; ++i)
      {
        Comparable next=page.keyArray[i];
        if ( previous!=null)
        {
          if ( previous.compareTo(next)>=0)
            throw new ObjectStoreException( "Keys in wrong order in index page");
        }
        previous=next;
        if ( page.reuseArray==null)
        {
          validateIndexPage( freeSet, page.nextOffsetArray[i], previous);
        }
        else if (freeSet != null)
        {
          DAKey objKey=new DAKey( page.nextOffsetArray[i], page.reuseArray[i]);
          Serializable obj=manager.retrieve( objKey);
          Comparable compareKey=entry.generator.generateKey( obj);
          if ( ! entry.unique)
          {
            compareKey=new UniqueKey(compareKey,objKey);
          }
           if ( compareKey.compareTo( previous)!=0)
            throw new ObjectStoreException( "Keys fail to compare");
           if (freeSet.contains(objKey.index))
           {
             throw new ObjectStoreException("Free set contains object index for object " + obj.toString());
           }
        }
      }
    }
View Full Code Here

Examples of com.antlersoft.odb.ObjectStoreException

    private void insertKey( DAKey objectRef, Comparable key)
        throws ObjectStoreException
    {
        FindResult fr=findKey( key);
        if ( fr.keyMatched)
            throw new ObjectStoreException( "Duplicate value for index: "
                +entry.indexName);
        if ( fr.offset==0)
            fixParentKey( fr.page, fr.page.keyArray[0], key);
        System.arraycopy( fr.page.nextOffsetArray, fr.offset,
            fr.page.nextOffsetArray, fr.offset+1, fr.page.size-fr.offset);
View Full Code Here

Examples of com.arjuna.ats.arjuna.exceptions.ObjectStoreException

         * Not a number at start of file.
         */
    }
    catch (IOException e)
    {
        throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore_2a"));
    }
      }
  }

  try
  {
      Uid.nullUid().pack(store);
  }
  catch (IOException e)
  {
      throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore_3"));
  }

  state.setBuffer(store.buffer());

  store = null;
View Full Code Here

Examples of com.arjuna.ats.arjuna.exceptions.ObjectStoreException

      result = allTypes(store, entry[i]);
        }
        catch (IOException e)
        {
      throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore_4"));
        }
    }

    tmpFile = null;
      }
  }

  try
  {
      store.packString("");
  }
  catch (IOException e)
  {
      throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore_5"));
  }

  foundTypes.setBuffer(store.buffer());

  return result;
View Full Code Here

Examples of com.arjuna.ats.arjuna.exceptions.ObjectStoreException

                    }
                    else
                        return fd;
                }
                else
                    throw new ObjectStoreException("FileSystemStore.openAndLock failed to create hierarchy "+fname);
            }

            if (!lock(fd, lmode, create))
                fd = null;
        }
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.