Examples of Lockable


Examples of cz.cuni.mff.abacs.burglar.logics.objects.positions.Lockable

        this._selectedObjects = this._parent._map.getObjectsOnPosition(mapX, mapY);
        for(BaseObject object : this._selectedObjects){
          switch(object.getType()){
          case CONTAINER:
          case DOOR:
            Lockable lockable = (Lockable)object;
            if(lockable.isClosed()){
              // it can be opened, locked, or unlocked:
              if(lockable.isLocked()){
                // it can be only unlocked:
                this._lockButton.setText(STR_UNLOCK + " (" + Player.PENALTY_OBJECT_LOCKED + ")");
                this._buttons.add(this._lockButton);
              }else{
                // it can be locked, or opened:
View Full Code Here

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

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

  {
    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

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

  {
    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

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


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

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

  {
    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

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

  {
    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

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

    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

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


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

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
TOP
Copyright © 2018 www.massapi.com. 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.