Add a record to be indexed to the queue. The record can be specified as either an indexable object or as
 as hash with :class and :id keys. The priority to be indexed can be passed in the options as +:priority+
 (defaults to 0).
355277
def index(record_or_hash, options = {})
      klass, id = class_and_id(record_or_hash)
      Entry.enqueue(self, klass, id, false, options[:priority] || self.class.default_priority)
    end
17496
def add(self, session):
        
        self._items[session.session_id] = session

        if session.expiry is not None:
            heappush(self._queue, session)
1100680
def _add_row(self, index):
        
        self._index.append(index)
        self._data.append(None)
513517
def add_record(record)
      return unless allow_indexing?(record)

      condensed_record = condense_record(record)
      atoms = add_occurences(condensed_record, record.id)

      @storage.add(atoms)
    end
201436
def add(self, item, safe=None):
		''' '''
		item._set_session(self)
		if safe is None:
			safe = self.safe
		self.queue.append(SaveOp(self.transaction_id, self, item, safe))
		# after the save op is recorded, the document has an _id and can be
		# cached
		self.cache_write(item)
		if self.autoflush:
			return self.flush()
465671
function queue (job, value, put) {
      var ts = timestamp()
      var key = toKey(job, ts)

      var id = hash(job+':'+value)
      if(pending[id]) return null //this job is already queued.
      pending[id] = Date.now()

      if(put === false) {
        //return the job to be queued, to include it in a batch insert.
          return {
          type: 'put', 
          key: Buffer.isBuffer(key) ? key : new Buffer(key), 
          value: Buffer.isBuffer(key) ? value : new Buffer(value)
        }
      } else {
        db.put(key, value)
      }
    }
429412
def push(self, item, priority=None):
        
        priority = item if priority is None else priority
        node = PriorityQueueNode(item, priority)
        for index, current in enumerate(self.priority_queue_list):
            if current.priority < node.priority:
                self.priority_queue_list.insert(index, node)
                return
        # when traversed complete queue
        self.priority_queue_list.append(node)
199137
def add(self, key, value):
        # type: (Hashable, Any) -> None
        
        dict.setdefault(self, key, []).append(value)
942475
def _add_to_index(index, obj):
    """"""
    id_set = index.value_map.setdefault(indexed_value(index, obj), set())
    if index.unique:
        if len(id_set) > 0:
            raise UniqueConstraintError()
    id_set.add(obj.id)
810298
def update_record(self, domain, record, data=None, priority=None, ttl=None,
            comment=None):
        
        return domain.update_record(record, data=data, priority=priority,
                ttl=ttl, comment=comment)
142662
def _update_record(self, identifier, rtype=None, name=None, content=None):
        """"""
        records = self._raw_records(identifier, rtype, name, content)
        self._update_records(records, {
            'type': rtype,
            'hostname': self._relative_name(name),
            'destination': content,
            'priority': self._get_lexicon_option('priority'),
        })
        LOGGER.debug('update_record: %s', True)
        return True
540049
def sort_records(records)
      sort_order = order.map { |direction| [ direction.target, direction.operator == :asc ] }

      records.sort_by do |record|
        sort_order.map do |(property, ascending)|
          Sort.new(record_value(record, property), ascending)
        end
      end
    end
437062
def priority=(new_val = @priority)
      return nil if new_val == @priority
      raise JSS::InvalidDataError, "priority must be an integer between #{POSSIBLE_PRIORITIES.first} and #{POSSIBLE_PRIORITIES.last} (inclusive)" unless POSSIBLE_PRIORITIES.include? new_val
      @priority = new_val
      @need_to_update = true
    end
1176283
def record_value(record, property)
      case record
        when Hash
          record.fetch(property, record[property.field])
        when Resource
          property.get!(record)
      end
    end
939008
def index(options = {}, &block)
      respond_with(collection, options,  &block) if stale?(collection, last_modified: collection.maximum(:updated_at))
    end
120981
def RegisterRecordType(cls, record_class):
        

        record_type = record_class.MatchType()
        if record_type not in UpdateRecord.KNOWN_CLASSES:
            UpdateRecord.KNOWN_CLASSES[record_type] = []

        UpdateRecord.KNOWN_CLASSES[record_type].append(record_class)
324412
def add(self, record):
        """"""
        self._field.validate_value(record)
        self._elements[record.id] = record
        self._sync_field()