Add a list of records to be removed to the queue. The priority to be indexed can be passed in the
 options as +:priority+ (defaults to 0).
482263
def remove_all(klass, ids, options = {})
      Entry.enqueue(self, klass, ids, true, options[:priority] || self.class.default_priority)
    end
741283
private void store(PriorityQueue<Entry> queue)
    {
        nextIndex = 0;
        for (Entry entry : queue) {
            if (entry.isValid()) {
                values[nextIndex] = entry.getValue();
                weights[nextIndex] = entry.getWeight();
                nextIndex++;
            }
        }
        sort(values, weights, nextIndex);
    }
146776
def add_priority(self, name, **attrs):
        
        return Priorities(self.requester).create(self.id, name, **attrs)
191577
def addRecords(self, records):
        
        label_mapper    = self.labelMapper()
        icon_mapper     = self.iconMapper()
        
        # create the items to display
        tree = None
        if self.showTreePopup():
            tree = self.treePopupWidget()
            tree.blockSignals(True)
            tree.setUpdatesEnabled(False)
        
        # add the items to the list
        start = self.count()
        self.addItems(map(label_mapper, records))
        
        # update the item information
        for i, record in enumerate(records):
            index = start + i
            
            self.setItemData(index, wrapVariant(record), Qt.UserRole)
            
            if icon_mapper:
                self.setItemIcon(index, icon_mapper(record))
            
            if tree:
                XOrbRecordItem(tree, record)
        
        if tree:
            tree.blockSignals(False)
            tree.setUpdatesEnabled(True)
946900
def add_add_del_on_list(key, to_add, to_remove)
      if (@is_commit)
        raise RuntimeError.new('No further request supported after a commit!')
      end
      @requests << {'add_del_on_list' => {'key' => key, 'add' => to_add, 'del'=> to_remove}}
      self
    end
1258686
def clear_priority(self):
        
        # Implemented from template for osid.logging.LogEntryForm.clear_priority_template
        if (self.get_priority_metadata().is_read_only() or
                self.get_priority_metadata().is_required()):
            raise errors.NoAccess()
        self._my_map['priority'] = self._priority_default
757708
def add(self, submission, archive, _):
        
        self.queue.put((submission, submission["result"], submission["grade"], submission["problems"], submission["tests"], submission["custom"], archive))
714676
def add_item(self, item, priority):
        
        conn = self._conn()
        self._run_expiration(conn)
        script = conn.register_script("""
        if (redis.call("hexists", KEYS[2], ARGV[1]) ~= 0) and
           not(redis.call("zscore", KEYS[1], ARGV[1]))
        then
            return -1
        end
        redis.call("zadd", KEYS[1], ARGV[2], ARGV[1])
        redis.call("hset", KEYS[2], ARGV[1], ARGV[2])
        return 0
        """)
        result = script(keys=[self._key_available(), self._key_priorities()],
                        args=[item, priority])
        if result == -1:
            raise ItemInUseError(item)
        return
929536
def delete_queue(queues):
    """"""
    current_queues.delete(queues=queues)
    click.secho(
        'Queues {} have been deleted.'.format(
            queues or current_queues.queues.keys()),
        fg='green'
    )
88965
def add_record(self, record):
        """"""
        rec = self.get_record(record._record_type, record.host)
        if rec:
            rec = record
            for i,r in enumerate(self._entries):
                if r._record_type == record._record_type \
                        and r.host == record.host:
                            self._entries[i] = record
        else:
            self._entries.append(record)
        self.sort()
        return True
918187
def update_record(self, zeroconf, now, record):
        """"""
        if record is not None and not record.is_expired(now):
            if record.type == _TYPE_A:
                if record.name == self.name:
                    if not record.address in self.address:
                        self.address.append(record.address)
            elif record.type == _TYPE_SRV:
                if record.name == self.name:
                    self.server = record.server
                    self.port = record.port
                    self.weight = record.weight
                    self.priority = record.priority
                    self.address = []
                    self.update_record(zeroconf, now,
                            zeroconf.cache.get_by_details(self.server,
                                _TYPE_A, _CLASS_IN))
            elif record.type == _TYPE_TXT:
                if record.name == self.name:
                    self.set_text(record.text)
783404
def setCheckedRecords( self, records ):
        
        QApplication.sendPostedEvents(self, -1)
        indexes = []
        
        for i in range(self.count()):
            record = self.recordAt(i)
            if record is not None and record in records:
                indexes.append(i)
        
        self.setCheckedIndexes(indexes)
1041515
def _insert(self, key, records, count):
        
        if key not in self.records:
            assert key not in self.counts
            self.records[key] = records
            self.counts[key] = count
        else:
            self.records[key] = np.vstack((self.records[key], records))
            assert key in self.counts
            self.counts[key] += count
1288121
def _create_record(self, rtype, name, content):
        """"""
        if not self._list_records(rtype, name, content):
            self._update_records([{}], {
                'type': rtype,
                'hostname': self._relative_name(name),
                'destination': content,
                'priority': self._get_lexicon_option('priority'),
            })
        LOGGER.debug('create_record: %s', True)
        return True
17496
def add(self, session):
        
        self._items[session.session_id] = session

        if session.expiry is not None:
            heappush(self._queue, session)
268884
def pop
      m = nil
      @lock.synchronize do
        [:PRIORITY, :NEW, :NORMAL, :WHOCARES].each do |k|
          unless(@queues[k].empty?)
            q = @queues[k].shift
            unless(q.empty?)
              m = q.shift
              add_queue(k, q) unless(q.empty?)
              break
            end
          end
        end
      end
      unless(m)
        if(@raise)
          raise EmptyQueue.new('Queue is currently empty')
        else
          @lock.wait_while{ empty? }
          m = pop
        end
      end
      m
    end
129389
def list_records(self, limit=None, offset=None):
        
        return self.manager.list_records(self, limit=limit, offset=offset)