Package org.apache.derby.iapi.store.access.conglomerate

Examples of org.apache.derby.iapi.store.access.conglomerate.Sort


  @exception StandardException Standard error policy.
  **/
  public RowLocationRetRowSource openSortRowSource(long id)
     throws StandardException
  {
    Sort sort;

    // Find the sort in the sorts list, throw an error
    // if it doesn't exist.
    if (sorts == null || id >= sorts.size()
      || (sort = ((Sort) sorts.elementAt((int) id))) == null)
    {
      throw StandardException.newException(
                    SQLState.AM_NO_SUCH_SORT, new Long(id));
    }

    // Open a scan row source on it.
    ScanControllerRowSource sc = sort.openSortRowSource(this);

    // Keep track of it so we can release on close.
    scanControllers.addElement(sc);

    return sc;
View Full Code Here


            {
                // Loop from the end since the call to drop() will remove the
                // element from the list.
                for (int i = sorts.size() - 1; i >= 0; i--)
                {
                    Sort sort = sorts.get(i);
                    if (sort != null)
                        sort.drop(this);
                }
                sorts.clear();
                freeSortIds.clear();
            }
    }
View Full Code Here

            if (sorts != null)
            {
                for (int i = 0; i < sorts.size(); i++)
                {
                    Sort sort = sorts.get(i);

                    if (sort != null)
                    {
                        str +=
                            "sorts created by createSort() in current xact:" +
View Full Code Here

    // Decide what segment the sort should use.
    int segment = 0; // XXX (nat) sorts always in segment 0

    // Create the sort.
    Sort sort = sfactory.createSort(this, segment,
            implParameters,  template, columnOrdering,
            sortObserver, alreadyInOrder, estimatedRows,
                        estimatedRowSize);

    // Add the sort to the sorts vector
View Full Code Here

  **/
    public void dropSort(long sortid)
        throws StandardException
    {
        // should call close on the sort.
        Sort sort = sorts.get((int) sortid);

        if (sort != null)
        {
            sort.drop(this);
            sorts.set((int) sortid, null);
            freeSortIds.add(ReuseFactory.getInteger((int) sortid));
        }
    }
View Full Code Here

  @exception StandardException Standard error policy.
  **/
  public SortController openSort(long id)
    throws StandardException
  {
    Sort sort;

    // Find the sort in the sorts list, throw an error
    // if it doesn't exist.
    if (sorts == null || id >= sorts.size()
      || (sort = (sorts.get((int) id))) == null)
    {
      throw StandardException.newException(
                    SQLState.AM_NO_SUCH_SORT, new Long(id));
    }

    // Open it.
    SortController sc = sort.open(this);

    // Keep track of it so we can release on close.
    if (sortControllers == null)
      sortControllers = new ArrayList<SortController>();
    sortControllers.add(sc);
View Full Code Here

  public ScanController openSortScan(
    long    id,
    boolean hold)
    throws StandardException
  {
    Sort sort;

    // Find the sort in the sorts list, throw an error
    // if it doesn't exist.
    if (sorts == null || id >= sorts.size()
      || (sort = ((Sort) sorts.get((int) id))) == null)
    {
      throw StandardException.newException(
                    SQLState.AM_NO_SUCH_SORT, new Long(id));
    }

    // Open a scan on it.
    ScanManager sc = sort.openSortScan(this, hold);

    // Keep track of it so we can release on close.
    scanControllers.add(sc);

    return sc;
View Full Code Here

  @exception StandardException Standard error policy.
  **/
  public RowLocationRetRowSource openSortRowSource(long id)
     throws StandardException
  {
    Sort sort;

    // Find the sort in the sorts list, throw an error
    // if it doesn't exist.
    if (sorts == null || id >= sorts.size()
      || (sort = (sorts.get((int) id))) == null)
    {
      throw StandardException.newException(
                    SQLState.AM_NO_SUCH_SORT, new Long(id));
    }

    // Open a scan row source on it.
    ScanControllerRowSource sc = sort.openSortRowSource(this);

    // Keep track of it so we can release on close.
    scanControllers.add( (ScanManager) sc );

    return sc;
View Full Code Here

            {
                // Loop from the end since the call to drop() will remove the
                // element from the list.
                for (int i = sorts.size() - 1; i >= 0; i--)
                {
                    Sort sort = (Sort) sorts.get(i);
                    if (sort != null)
                        sort.drop(this);
                }
                sorts.clear();
                freeSortIds.clear();
            }
    }
View Full Code Here

            if (sorts != null)
            {
                for (int i = 0; i < sorts.size(); i++)
                {
                    Sort sort = (Sort) sorts.get(i);

                    if (sort != null)
                    {
                        str +=
                            "sorts created by createSort() in current xact:" +
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.store.access.conglomerate.Sort

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.