Returns the priority for data transmissions in this iterator
181648
protected int getPriority()
   {
      if (tc.isEntryEnabled()) SibTr.entry(this, tc, "getPriority");
      if (tc.isEntryEnabled()) SibTr.exit(this, tc, "getPriority", ""+priority);
      return priority;
   }
1108084
def sorted(self):
        
        if self.start < self.end:
            return self.start, self.end
        else:
            return self.end, self.start
465583
public JobPriority getJobPriority() {
    String prio = get("mapred.job.priority");
    if(prio == null) {
      return JobPriority.NORMAL;
    }

    return JobPriority.valueOf(prio);
  }
1004127
public boolean hasCapacity(int priority)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "hasCapacity", ""+priority);

      boolean result;
      synchronized(queueMonitor)
      {
         result = priority >= lowestPriorityWithCapacity;
      }

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "hasCapacity", ""+result);
      return result;
   }
551441
public double getPriority(Object key) {
    for (int i = 0; i < elements.size(); i++) {
      if (elements.get(i).equals(key)) {
        return priorities[i];
      }
    }
    throw new NoSuchElementException();
  }
1174213
private Priority getPriority(Integer gpPriority)
   {
      int result;
      if (gpPriority == null)
      {
         result = Priority.MEDIUM;
      }
      else
      {
         int index = gpPriority.intValue();
         if (index < 0 || index >= PRIORITY.length)
         {
            result = Priority.MEDIUM;
         }
         else
         {
            result = PRIORITY[index];
         }
      }
      return Priority.getInstance(result);
   }
652621
public int getThreadsPriority()
    {
        int priority=Thread.NORM_PRIORITY;
        Object o=_pool.getAttribute(__PRIORITY);
        if(o!=null)
        {
            priority=((Integer)o).intValue();
        }
        return priority;
    }
1219312
@Override
    public Iterator<T> iterator() {
        List<T> bufferAsList = new ArrayList<T>();
        synchronized (this) {
            synchronized (lock) {
                //First add the items in the expedited buffer
                //Check if we wrap around the end of the array before iterating
                if (expeditedPutIndex > expeditedTakeIndex) {
                    for (int i = expeditedTakeIndex; i <= expeditedPutIndex; i++) {
                        bufferAsList.add(expeditedBuffer[i]);
                    }
                } else {
                    //We wrap around the array. Loop through in two passes(upper and lower)
                    for (int i = expeditedTakeIndex; i < expeditedBuffer.length; i++) {
                        bufferAsList.add(expeditedBuffer[i]);
                    }
                    for (int i = 0; i < expeditedPutIndex; i++) {
                        bufferAsList.add(expeditedBuffer[i]);
                    }
                }
                //Next add the items in the main buffer
                //Check if we wrap around the end of the array before iterating
                if (putIndex > takeIndex) {
                    for (int i = takeIndex; i <= putIndex; i++) {
                        bufferAsList.add(buffer[i]);
                    }
                } else {
                    //We wrap around the array. Loop through in two passes(upper and lower)
                    for (int i = takeIndex; i < buffer.length; i++) {
                        bufferAsList.add(buffer[i]);
                    }
                    for (int i = 0; i < putIndex; i++) {
                        bufferAsList.add(buffer[i]);
                    }
                }
            }
        }
        return bufferAsList.iterator();
    }
438882
function emitData() {
      for(var i=0;i<streamQueue.length;i++) {
        var dataQueue = streamQueue[i].dataQueue;

        if(streamQueue[i].pending) {
          return;
        }

        for(var j=0;j<dataQueue.length;j++) {
          var data = dataQueue[j];
          if(!!data) {
            _this.emit('data', data);
            dataQueue[j] = null;

            return emitData();
          }
        }
      }

      if(currentStream === streamQueue.length) {
        _this.emit('end');
      }
    }
278568
@Override
    public int getDefaultPriority()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "getDefaultPriority");

        int pri = _definition.getDefaultPriority();

        // Admin have said -1 will signal return priority from target.  At
        // some point they should provide a constant with which this magic number
        // can be replaced.
        if (pri == DestinationAliasDefinition.DEFAULT_DEFAULTPRIORITY)
        {
            pri = getTarget().getDefaultPriority();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "getDefaultPriority", Integer.valueOf(pri));

        return pri;
    }
955494
def sort_by_priority(iterable, reverse=False, default_priority=10):
    
    return sorted(iterable, reverse=reverse, key=lambda o: getattr(o, 'priority', default_priority))
676808
public static String toStringPriority(int priority) {
	if (priority == Thread.NORM_PRIORITY) return "NORMAL";
	if (priority == Thread.MAX_PRIORITY) return "HIGH";
	if (priority == Thread.MIN_PRIORITY) return "LOW";
	return null;
    }
843301
def priority_level_get
      hash = {}
      hash[:priority] = default_priority
      hash[:lower] = default_priority_forward_thresh_lower
      hash[:upper] = default_priority_forward_thresh_upper
      arr = config_get('interface_hsrp_group', 'priority_level', @get_args)
      if arr
        hash[:priority] = arr[0].to_i
        hash[:lower] = arr[1].to_i if arr[1]
        hash[:upper] = arr[2].to_i if arr[2]
      end
      hash
    end
1324306
def get_parallel_raw_data(self, other):
        
        start, end = other.byte_bounds_offset()
        r = self.rawdata[start:end]
        if other.rawdata.is_indexed:
            r = r.get_indexed[other.order]
        return r
933004
def transmissions(self, status="all"):
        
        if status not in ["all", "pending", "received"]:
            raise(ValueError("You cannot get {} transmissions."
                             .format(status) +
                             "Status can only be pending, received or all"))

        if status == "all":
            return Transmission\
                .query\
                .filter_by(vector_id=self.id,
                           failed=False)\
                .all()
        else:
            return Transmission\
                .query\
                .filter_by(vector_id=self.id,
                           status=status,
                           failed=False)\
                .all()
1290052
int getDevicePriority(IoDevice device)
    {
        for (PriorityIoDeviceTuple tuple : mCompatibleDevices)
        {
            if (tuple.getIoDevice().equals(device))
            {
                return tuple.getPriority();
            }
        }
        return -1;
    }
1059925
def priority(self,priority):
        
        with self.__lock:
            old_priorities = {}
            try:
                for thread in self.__threads:
                    old_priorities[thread] = thread.priority
                    thread.priority = priority
            except Exception:
                for (thread,old_priority) in old_priorities.iteritems():
                    try:
                        thread.priority = old_priority
                    except Exception:
                        pass
                raise
            else:
                self.__priority = priority