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

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


                            //
                            // 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

                            //
                            // 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

                            //
                            // 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

                            //
                            // 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

    // 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

                    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

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.