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

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


    {
        Hashtable attributes = new Hashtable(17);
        Object lock_type = currentLock.getQualifier();

        // want containerId, segmentId, pageNum, recId from locktable
        Lockable lockable = currentLock.getLockable();

        // See if the lockable object wants to participate
        if( !lockable.lockAttributes(ALL, attributes) )
        {
            currentRow = null;
            return;
        }
View Full Code Here


  {
    HashMap clone = new HashMap();

    for (Iterator it = locks.keySet().iterator(); it.hasNext(); )
    {
      Lockable lockable = (Lockable) it.next();
      Control control = getControl(lockable);

      clone.put(lockable, control.shallowClone());
    }
View Full Code Here

  {
    HashMap clone = new HashMap();

    for (Iterator it = locks.keySet().iterator(); it.hasNext(); )
    {
      Lockable lockable = (Lockable) it.next();
      Control control = getControl(lockable);

      clone.put(lockable, control.shallowClone());
    }
View Full Code Here


    // 4 things we are interested in from the lockable:
    // containerId, segmentId, pageNum, recId

    Lockable lockable = lock.getLockable();

    // see if this lockable object wants to participate
    if (!lockable.lockAttributes(flag, attributes))
      return null;       

    // if it does, the lockable object must have filled in the following
    // fields
    if (SanityManager.DEBUG)
View Full Code Here

  {
    HashMap clone = new HashMap();

    for (Iterator it = locks.keySet().iterator(); it.hasNext(); )
    {
      Lockable lockable = (Lockable) it.next();
      Control control = getControl(lockable);

      clone.put(lockable, control.shallowClone());
    }
View Full Code Here

  {
    HashMap clone = new HashMap();

    for (Iterator it = locks.keySet().iterator(); it.hasNext(); )
    {
      Lockable lockable = (Lockable) it.next();
      Control control = getControl(lockable);

      clone.put(lockable, control.shallowClone());
    }
View Full Code Here

    if (isUnlocked())
      return true;

        boolean grantLock    = false;

    Lockable lref = ref;
    List lgranted = granted;

        {
            // Check to see if the only locks on the granted queue that
            // we are incompatible with are locks we own.
            boolean selfCompatible = lref.lockerAlwaysCompatible();

      int index = 0;
      int endIndex = firstGrant == null ? lgranted.size() : 0;
      do {

        Lock gl = firstGrant == null ? (Lock) lgranted.get(index) : firstGrant;

                boolean sameSpace =
                    (gl.getCompatabilitySpace() == compatibilitySpace);

                if (sameSpace && selfCompatible)
                {
                    // if it's one of our locks and we are always compatible
                    // with our own locks then yes, we can be granted.
                   
                    grantLock = true;
                    continue;
                }
                else if (!lref.requestCompatible(qualifier, gl.getQualifier()))
                {
                    // If we are not compatible with some already granted lock
                    // then we can't be granted, give up right away.
                   
                    grantLock = false;
View Full Code Here


    // 4 things we are interested in from the lockable:
    // containerId, segmentId, pageNum, recId

    Lockable lockable = lock.getLockable();

    // see if this lockable object wants to participate
    if (!lockable.lockAttributes(flag, attributes))
      return null;       

    // if it does, the lockable object must have filled in the following
    // fields
    if (SanityManager.DEBUG)
View Full Code Here

    {
        Hashtable attributes = new Hashtable(17);
        Object lock_type = currentLock.getQualifier();

        // want containerId, segmentId, pageNum, recId from locktable
        Lockable lockable = currentLock.getLockable();

        // See if the lockable object wants to participate
        if( !lockable.lockAttributes(ALL, attributes) )
        {
            currentRow = null;
            return;
        }
View Full Code Here

  {
    LockSet clone = new LockSet(factory);

    for (Enumeration e = keys(); e.hasMoreElements(); )
    {
      Lockable lockable = (Lockable)e.nextElement();
      Control control = getControl(lockable);

      clone.put(lockable, control.shallowClone());
    }
View Full Code Here

TOP

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

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.