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

Examples of org.apache.derby.iapi.store.access.TransactionController


        if( permissionsCache == null)
        {
            CacheFactory cf =
              (CacheFactory) Monitor.startSystemModule(org.apache.derby.iapi.reference.Module.CacheFactory);
            LanguageConnectionContext lcc = getLCC();
            TransactionController tc = lcc.getTransactionExecute();
            permissionsCacheSize = PropertyUtil.getServiceInt( tc,
                                                               Property.LANG_PERMISSIONS_CACHE_SIZE,
                                                               40, /* min value */
                                                               Integer.MAX_VALUE,
                                                               permissionsCacheSize /* value from boot time. */);
 
View Full Code Here


   */
  public boolean isSchemaEmpty(SchemaDescriptor sd)
    throws StandardException
  {
    DataValueDescriptor     schemaIdOrderable;
    TransactionController  tc = getTransactionCompile();

    schemaIdOrderable = getIDValueAsCHAR(sd.getUUID());

    if (isSchemaReferenced(tc, coreInfo[SYSTABLES_CORE_NUM],
          SYSTABLESRowFactory.SYSTABLES_INDEX1_ID,
View Full Code Here

  {
    ConglomerateController  heapCC;
    ExecIndexRow      keyRow1 = null;
    DataValueDescriptor    idOrderable;
    TabInfoImpl          ti = getNonCoreTI(SYSFILES_CATALOG_NUM);
    TransactionController   tc = getTransactionExecute();
   
    /* Use tableIdOrderable and schemaIdOrderable in both start
     * and stop position for index 1 scan.
     */
    idOrderable = getIDValueAsCHAR(fid.getUUID());
View Full Code Here

  void clearSPSPlans() throws StandardException
  {
    TabInfoImpl ti = getNonCoreTI(SYSSTATEMENTS_CATALOG_NUM);
    faultInTabInfo(ti);

    TransactionController tc = getTransactionExecute();

    FormatableBitSet columnToReadSet = new FormatableBitSet(SYSSTATEMENTSRowFactory.SYSSTATEMENTS_COLUMN_COUNT);
    FormatableBitSet columnToUpdateSet = new FormatableBitSet(SYSSTATEMENTSRowFactory.SYSSTATEMENTS_COLUMN_COUNT);
    columnToUpdateSet.set(SYSSTATEMENTSRowFactory.SYSSTATEMENTS_VALID -1);
    columnToUpdateSet.set(SYSSTATEMENTSRowFactory.SYSSTATEMENTS_CONSTANTSTATE -1);

    DataValueDescriptor[] replaceRow =
            new DataValueDescriptor[SYSSTATEMENTSRowFactory.SYSSTATEMENTS_COLUMN_COUNT];

    /* Set up a couple of row templates for fetching CHARS */

    replaceRow[SYSSTATEMENTSRowFactory.SYSSTATEMENTS_VALID - 1] =
            dvf.getDataValue(false);
    replaceRow[SYSSTATEMENTSRowFactory.SYSSTATEMENTS_CONSTANTSTATE - 1] =
            dvf.getDataValue((Object) null);

    /* Scan the entire heap */
    ScanController sc =
            tc.openScan(
                ti.getHeapConglomerate(),
                false,
                TransactionController.OPENMODE_FORUPDATE,
                TransactionController.MODE_TABLE,
                TransactionController.ISOLATION_REPEATABLE_READ,
View Full Code Here

    ExecIndexRow        indexRow1;
    ExecIndexRow      indexTemplateRow;
    ExecRow         outRow;
    RowLocation        baseRowLocation;
    ScanController      scanController;
    TransactionController  tc;

    // Get the current transaction controller
    tc = getTransactionCompile();

    outRow = rf.makeEmptyRow();

    heapCC =
            tc.openConglomerate(
                ti.getHeapConglomerate(), false, 0,
                TransactionController.MODE_RECORD,
                TransactionController.ISOLATION_REPEATABLE_READ);


    /* Scan the index and go to the data pages for qualifying rows to
     * build the column descriptor.
     */
    scanController = tc.openScan(
        ti.getIndexConglomerate(indexId)// conglomerate to open
        false, // don't hold open across commit
        (forUpdate) ? TransactionController.OPENMODE_FORUPDATE : 0,
                TransactionController.MODE_RECORD,
                TransactionController.ISOLATION_REPEATABLE_READ,
View Full Code Here

    SYSCONSTRAINTSRowFactory rf = (SYSCONSTRAINTSRowFactory) ti.getCatalogRowFactory();
    ConglomerateController  heapCC;
    ExecRow         outRow;
    ExecRow         templateRow;
    ScanController      scanController;
    TransactionController  tc;
    ConstraintDescriptor  cd = null;

    // Get the current transaction controller
    tc = getTransactionCompile();

    outRow = rf.makeEmptyRow();

    /*
    ** Table scan
    */
    scanController = tc.openScan(
        ti.getHeapConglomerate(),    // conglomerate to open
        false,               // don't hold open across commit
        0,                 // for read
        TransactionController.MODE_TABLE,
                TransactionController.ISOLATION_REPEATABLE_READ,
View Full Code Here

    ExecIndexRow      indexTemplateRow;
    ExecRow         outRow;
    RowLocation        baseRowLocation;
    ConglomerateController  heapCC = null;
    ScanController      scanController = null;
    TransactionController  tc;
    TabInfoImpl         ti = getNonCoreTI(SYSCONSTRAINTS_CATALOG_NUM);
    SYSCONSTRAINTSRowFactory rf = (SYSCONSTRAINTSRowFactory) ti.getCatalogRowFactory();
    TableDescriptor      td = null;
    List          slist = newSList();

    if (SanityManager.DEBUG)
    {
      SanityManager.ASSERT(indexId == SYSCONSTRAINTSRowFactory.SYSCONSTRAINTS_INDEX1_ID ||
                 indexId == SYSCONSTRAINTSRowFactory.SYSCONSTRAINTS_INDEX3_ID,
                  "bad index id, must be one of the indexes on a uuid");
      SanityManager.ASSERT(columnNum > 0 &&
                 columnNum <= SYSCONSTRAINTSRowFactory.SYSCONSTRAINTS_COLUMN_COUNT,
                  "invalid column number for column to be retrieved");
    }

    try
    {
      /* Use tableIDOrderable in both start and stop positions for scan */
      DataValueDescriptor orderable = getIDValueAsCHAR(uuid);
 
      /* Set up the start/stop position for the scan */
      ExecIndexRow keyRow = (ExecIndexRow) exFactory.getIndexableRow(1);
      keyRow.setColumn(1, orderable);

      // Get the current transaction controller
      tc = getTransactionCompile();
 
      outRow = rf.makeEmptyRow();
 
      heapCC =
                tc.openConglomerate(
                    ti.getHeapConglomerate(), false, 0,
                    TransactionController.MODE_RECORD,
                    TransactionController.ISOLATION_REPEATABLE_READ);

      // create an index row template
      indexRow1 = getIndexRowFromHeapRow(
                ti.getIndexRowGenerator(indexId),
                heapCC.newRowLocationTemplate(),
                outRow);
 
      // just interested in one column
      DataValueDescriptor[] rowTemplate    =
              new DataValueDescriptor[SYSCONSTRAINTSRowFactory.SYSCONSTRAINTS_COLUMN_COUNT];
      FormatableBitSet  columnToGetSet =
              new FormatableBitSet(SYSCONSTRAINTSRowFactory.SYSCONSTRAINTS_COLUMN_COUNT);
      columnToGetSet.set(columnNum - 1);

      rowTemplate[columnNum - 1] = new SQLChar();
 
      // Scan the index and go to the data pages for qualifying rows
      scanController = tc.openScan(
          ti.getIndexConglomerate(indexId),// conglomerate to open
          false,               // don't hold open across commit
          0,                 // for read
                  TransactionController.MODE_RECORD,
                  TransactionController.ISOLATION_REPEATABLE_READ,// RESOLVE: should be level 2
View Full Code Here

    public ConglomerateDescriptor[] getConglomerateDescriptors(
                    long conglomerateNumber)
                    throws StandardException
    {
      ScanController        scanController;
      TransactionController    tc;
      ExecRow           outRow;
      DataValueDescriptor      conglomNumberOrderable = null;
      TabInfoImpl            ti = coreInfo[SYSCONGLOMERATES_CORE_NUM];
      SYSCONGLOMERATESRowFactory  rf = (SYSCONGLOMERATESRowFactory) ti.getCatalogRowFactory();
View Full Code Here

   */
  public List getAllDependencyDescriptorsList()
        throws StandardException
  {
    ScanController         scanController;
    TransactionController      tc;
    ExecRow              outRow;
    ExecRow             templateRow;
    List            ddl = newSList();
    TabInfoImpl            ti = getNonCoreTI(SYSDEPENDS_CATALOG_NUM);
    SYSDEPENDSRowFactory    rf = (SYSDEPENDSRowFactory) ti.getCatalogRowFactory();


    // Get the current transaction controller
    tc = getTransactionCompile();

    outRow = rf.makeEmptyRow();

    scanController = tc.openScan(
      ti.getHeapConglomerate()// conglomerate to open
      false, // don't hold open across commit
      0, // for read
            TransactionController.MODE_TABLE,   // scans entire table.
            TransactionController.ISOLATION_REPEATABLE_READ,
View Full Code Here

    ExecIndexRow        indexRow1;
    ExecIndexRow      indexTemplateRow;
    ExecRow         outRow;
    RowLocation        baseRowLocation;
    ScanController      scanController;
    TransactionController  tc;
    TupleDescriptor      td = null;

    // Get the current transaction controller
    tc = getTransactionCompile();

    outRow = rf.makeEmptyRow();

    heapCC = tc.openConglomerate(
                ti.getHeapConglomerate(), false, 0,
                TransactionController.MODE_RECORD,
                TransactionController.ISOLATION_REPEATABLE_READ);

    /* Scan the index and go to the data pages for qualifying rows to
     * build the column descriptor.
     */
    scanController = tc.openScan(
        ti.getIndexConglomerate(indexId)// conglomerate to open
        false, // don't hold open across commit
        (forUpdate) ? TransactionController.OPENMODE_FORUPDATE : 0,
                TransactionController.MODE_RECORD,
                TransactionController.ISOLATION_REPEATABLE_READ,
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.store.access.TransactionController

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.