Package org.apache.derby.iapi.services.locks

Examples of org.apache.derby.iapi.services.locks.CompatibilitySpace


          ** back and lock released already, so don't try to unlock if statement context
          ** is cleared.
          */
          if ((lcc.getStatementContext() != null) && lcc.getStatementContext().inUse())
          {
            CompatibilitySpace space =
              lcc.getTransactionExecute().getLockSpace();
            int unlockCount =
              lockFactory.unlock(
                space, space.getOwner(),
                cacheCoordinator, ShExQual.SH);
            if (SanityManager.DEBUG)
            {
              if (unlockCount != 1)
              {
View Full Code Here


                            //
                            // See if we can get this lock granted without
                            // waiting (while holding the dataDictionary
                            // synchronization).

                            CompatibilitySpace space =
                                lcc.getTransactionExecute().getLockSpace();

                            lockGranted =
                                lockFactory.lockObject(
                                    space, space.getOwner(),
                                    cacheCoordinator,
                                    ShExQual.SH,
                                    C_LockFactory.NO_WAIT);
                        }
                        catch (StandardException e)
View Full Code Here

          ** back and lock released already, so don't try to unlock if statement context
          ** is cleared.
          */
          if ((lcc.getStatementContext() != null) && lcc.getStatementContext().inUse())
          {
            CompatibilitySpace space =
              lcc.getTransactionExecute().getLockSpace();
            int unlockCount =
              lockFactory.unlock(
                space, space.getOwner(),
                cacheCoordinator, ShExQual.SH);
            if (SanityManager.DEBUG)
            {
              if (unlockCount != 1)
              {
View Full Code Here

                    SQLState.DATA_ALLOC_NTT_CANT_OPEN,
                    new Long(getSegmentId()),
                    new Long(getContainerId()));
        }

    CompatibilitySpace cs = ntt.getCompatibilitySpace();
    // Latch this container, the commit will release the latch
    ntt.getLockFactory().lockObject(
                cs, ntt, this, null, C_LockFactory.WAIT_FOREVER);

    try
View Full Code Here

                    new Long(getSegmentId()),
                    new Long(getContainerId()));
        }

    // Latch this container, the commit will release the latch
    CompatibilitySpace cs = ntt.getCompatibilitySpace();
    ntt.getLockFactory().lockObject(
                cs, ntt, this, null, C_LockFactory.WAIT_FOREVER);

    BasePage newPage = null;
    try
View Full Code Here

    // This method can be called from outside of the database
    // engine, in which case tc will be null. In that case
    // we lock the class loader only for the duration of
    // the loadClass().
    CompatibilitySpace lockSpace = null;
   
    if (cfc != null) {
      lockSpace = cfc.getLockSpace();
    }
    if (lockSpace == null)
      lockSpace = compat;

    Object lockGroup = lockSpace.getOwner();

    lf.lockObject(lockSpace, lockGroup, classLoaderLock, qualifier,
            C_LockFactory.TIMED_WAIT);

    return (lockGroup == this);
View Full Code Here

    // This allows correct operation of the cache. The cache remains
    // valid for all transactions except the one that is modifying
    // it. Thus readers see the old uncommited values. When this
    // thread releases its exclusive lock the cached is cleared
    // and the next reader will re-populate the cache.
    CompatibilitySpace cs = tc.getLockSpace();
    Object csGroup = cs.getOwner();
    lf.lockObject(cs, csGroup, cachedLock, ShExQual.EX,
            C_LockFactory.TIMED_WAIT);
  }
View Full Code Here

    Return true if the caller holds the exclusive update lock on the
    property conglomerate.
    */
  private boolean iHoldTheUpdateLock(TransactionController tc) throws StandardException
  {
    CompatibilitySpace cs = tc.getLockSpace();
    Object csGroup = cs.getOwner();
    return lf.isLockHeld(cs, csGroup, cachedLock, ShExQual.EX);
  }
View Full Code Here

                            //
                            // See if we can get this lock granted without
                            // waiting (while holding the dataDictionary
                            // synchronization).

                            CompatibilitySpace space =
                                lcc.getTransactionExecute().getLockSpace();

                            lockGranted =
                                lockFactory.lockObject(
                                    space, space.getOwner(),
                                    cacheCoordinator,
                                    ShExQual.SH,
                                    C_LockFactory.NO_WAIT);
                        }
                        catch (StandardException e)
View Full Code Here

          ** back and lock released already, so don't try to unlock if statement context
          ** is cleared.
          */
          if ((lcc.getStatementContext() != null) && lcc.getStatementContext().inUse())
          {
            CompatibilitySpace space =
              lcc.getTransactionExecute().getLockSpace();
            int unlockCount =
              lockFactory.unlock(
                space, space.getOwner(),
                cacheCoordinator, ShExQual.SH);
            if (SanityManager.DEBUG)
            {
              if (unlockCount != 1)
              {
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.services.locks.CompatibilitySpace

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.