Package org.apache.derby.iapi.store.raw

Examples of org.apache.derby.iapi.store.raw.Transaction


    {
      Enumeration e = mergeRuns.elements();

      try
      {
        Transaction rawTran = tran.getRawStoreXact();
        long segmentId = StreamContainerHandle.TEMPORARY_SEGMENT;

        while (e.hasMoreElements())
        {
          long containerId = ((Long) e.nextElement()).longValue();
          rawTran.dropStreamContainer(segmentId, containerId);
        }
      }
      catch (StandardException se)
      {
        // Ignore problems with dropping, worst case
View Full Code Here


            }

      // Create and open another temporary stream conglomerate
      // which will become
      // a merge run made up with the merged runs from the subset.
      Transaction rawTran = tran.getRawStoreXact();
      int segmentId = StreamContainerHandle.TEMPORARY_SEGMENT;
      long id = rawTran.addAndLoadStreamContainer(segmentId,
        properties, msRowSource);

      mergeRuns.addElement(new Long(id));

      // Drop the conglomerates in the merge subset
      e = subset.elements();
      while (e.hasMoreElements())
      {
        Long containerId = (Long) e.nextElement();
        rawTran.dropStreamContainer(segmentId, containerId.longValue());
      }
    }
  }
View Full Code Here

    // TransactionManager.
    SortBufferRowSource rowSource =
      new SortBufferRowSource(sortBuffer, (TransactionManager)null, sortObserver, true, sortBufferMax);

    // Create a temporary stream conglomerate...
    Transaction rawTran = tran.getRawStoreXact()// get raw transaction
    int segmentId = StreamContainerHandle.TEMPORARY_SEGMENT;
    long id = rawTran.addAndLoadStreamContainer(segmentId,
      properties, rowSource);

    // Don't close the sortBuffer, we just emptied it, the caller may reuse
    // that sortBuffer for the next run.
    rowSource = null;
View Full Code Here

     throws StandardException
  {
    if (work == null)
      return Serviceable.DONE;

    Transaction tran =
            rawStoreFactory.findUserTransaction(
                contextMgr, AccessFactoryGlobals.SYS_TRANS_NAME);

    if (SanityManager.DEBUG)
    {
View Full Code Here

    {
      Enumeration<Long> e = mergeRuns.elements();

      try
      {
        Transaction rawTran = tran.getRawStoreXact();
        long segmentId = StreamContainerHandle.TEMPORARY_SEGMENT;

        while (e.hasMoreElements())
        {
          long containerId = (e.nextElement()).longValue();
          rawTran.dropStreamContainer(segmentId, containerId);
        }
      }
      catch (StandardException se)
      {
        // Ignore problems with dropping, worst case
View Full Code Here

            }

      // Create and open another temporary stream conglomerate
      // which will become
      // a merge run made up with the merged runs from the subset.
      Transaction rawTran = tran.getRawStoreXact();
      int segmentId = StreamContainerHandle.TEMPORARY_SEGMENT;
      long id = rawTran.addAndLoadStreamContainer(segmentId,
        properties, msRowSource);

      mergeRuns.addElement(new Long(id));

      // Drop the conglomerates in the merge subset
      e = subset.elements();
      while (e.hasMoreElements())
      {
        Long containerId = (Long) e.nextElement();
        rawTran.dropStreamContainer(segmentId, containerId.longValue());
      }
    }
  }
View Full Code Here

    // TransactionManager.
    SortBufferRowSource rowSource =
      new SortBufferRowSource(sortBuffer, (TransactionManager)null, sortObserver, true, sortBufferMax);

    // Create a temporary stream conglomerate...
    Transaction rawTran = tran.getRawStoreXact()// get raw transaction
    int segmentId = StreamContainerHandle.TEMPORARY_SEGMENT;
    long id = rawTran.addAndLoadStreamContainer(segmentId,
      properties, rowSource);

    // Don't close the sortBuffer, we just emptied it, the caller may reuse
    // that sortBuffer for the next run.
    rowSource = null;
View Full Code Here

    while (e.hasMoreElements())
    {
      // get the container id
      long id = (e.nextElement()).longValue();

      Transaction rawTran = tran.getRawStoreXact()// get raw transaction
      int segmentId = StreamContainerHandle.TEMPORARY_SEGMENT;
      openScans[scanindex++] =
                rawTran.openStreamContainer(segmentId, id, hold);
    }

    // Load the initial rows.
    for (scanindex = 0; scanindex < openScans.length; scanindex++)
      mergeARow(scanindex);
View Full Code Here

        // Create a transaction, make a context for it, and push the context.
        // Note this puts the raw store transaction context
        // above the access context, which is required for
        // error handling assumptions to be correct.
       
        Transaction rawtran =
            accessmanager.getRawStore().startInternalTransaction(cm);
        RAMTransaction rt   = new RAMTransaction(accessmanager, rawtran, null);
        RAMTransactionContext rtc   =
      new RAMTransactionContext(
                cm, AccessFactoryGlobals.RAMXACT_INTERNAL_CONTEXT_ID,
                rt, true /*abortAll */);

        rawtran.setDefaultLockingPolicy(
                accessmanager.getDefaultLockingPolicy());

        return(rt);
    }
View Full Code Here

        // Note that the nested transaction inherits the compatibility space
        // from "this", thus the new transaction shares the compatibility space
        // of the current transaction.
       

        Transaction child_rawtran =
            ((readOnly) ?
                accessmanager.getRawStore().startNestedReadOnlyUserTransaction(
                    rawtran,
                    getLockSpace(),
                    cm,
                    AccessFactoryGlobals.NESTED_READONLY_USER_TRANS) :
                accessmanager.getRawStore().startNestedUpdateUserTransaction(
                    rawtran,
                    cm,
                    AccessFactoryGlobals.NESTED_UPDATE_USER_TRANS,
                    flush_log_on_xact_end));

        RAMTransaction rt   =
            new RAMTransaction(accessmanager, child_rawtran, this);

        RAMTransactionContext rtc   =
      new RAMTransactionContext(
                cm,
                AccessFactoryGlobals.RAMXACT_CHILD_CONTEXT_ID,
                rt, true /*abortAll */);

        child_rawtran.setDefaultLockingPolicy(
                accessmanager.getDefaultLockingPolicy());

        return(rt);
    }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.store.raw.Transaction

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.