// Delete removes an item. It doesn't add it to the queue, because
// this implementation assumes the consumer only cares about the objects,
// not the order in which they were created/added.
2199
func (f *FIFO) Delete(obj interface{}) error {
	id, err := f.keyFunc(obj)
	if err != nil {
		return KeyError{obj, err}
	}
	f.lock.Lock()
	defer f.lock.Unlock()
	f.populated = true
	delete(f.items, id)
	return err
}
1320541
func (c *Cache) Delete(key string) (err error) {
	return c.caches(c.Name, "items", key).Req("DELETE", nil, nil)
}
923473
func (s *DBStore) Delete(key string) (err error) {
	return s.db.Delete([]byte(key), nil)
}
491008
func (c *Cache) Delete(key string) bool {
	item := c.bucket(key).delete(key)
	if item != nil {
		c.deletables <- item
		return true
	}
	return false
}
437803
func (m *Memory) Delete(ctx context.Context, key []byte) error {
	if len(key) == 0 {
		return trace.BadParameter("missing parameter key")
	}
	m.Lock()
	defer m.Unlock()
	m.removeExpired()
	if m.tree.Get(&btreeItem{Item: backend.Item{Key: key}}) == nil {
		return trace.NotFound("key %q is not found", string(key))
	}
	event := backend.Event{
		Type: backend.OpDelete,
		Item: backend.Item{
			Key: key,
		},
	}
	m.processEvent(event)
	if !m.EventsOff {
		m.buf.Push(event)
	}
	return nil
}
1250171
func (b *Bucket) Delete(key []byte) error {
	_ = b.btree.Delete(&item{key: key})
	return nil
}
2226
func (r *Registry) Remove(item types.ManagedObjectReference) {
	r.applyHandlers(func(o RegisterObject) {
		o.RemoveObject(item)
	})

	r.m.Lock()
	delete(r.objects, item)
	delete(r.handlers, item)
	delete(r.locks, item)
	r.m.Unlock()
}
587745
func (c *Client) Delete(key string) error {
	return c.deleteRecurse(key, false)
}
670789
func (l *ShardedNoTS) Delete(tenantID, key string) error {
	_, ok := l.cache[tenantID]
	if !ok {
		return nil
	}

	l.itemCount[tenantID]--

	if l.itemCount[tenantID] == 0 {
		return l.DeleteShard(tenantID)
	}

	return l.cache[tenantID].Delete(key)
}
1021320
func (c *Collection) Delete(i gtreap.Item) {
	c.assertNotReadOnly()

	c.rootLock.Lock()
	c.root = c.root.Delete(i)
	c.rootLock.Unlock()
}
910501
func (svc *DynamoAccessor) Delete(ctx context.Context, keyPath string) error {
	deleteItemInput := &dynamodb.DeleteItemInput{
		TableName: aws.String(svc.dynamoTableName()),
		Key:       dynamoKeyValueAttrMap(keyPath),
	}
	_, deleteResultErr := svc.
		dynamoSvc(ctx).
		DeleteItemWithContext(ctx, deleteItemInput)
	return deleteResultErr
}
1209591
func (vs *ValueMap) Delete(k Value) {
	if vs == nil {
		return
	}
	vs.hashMap.Delete(k)
}
648141
func (db *DB) Delete(key []byte, wo *opt.WriteOptions) error {
	return db.putRec(keyTypeDel, key, nil, wo)
}
410865
func (c *MemoryCacher) Delete(key string) error {
	c.lock.Lock()
	defer c.lock.Unlock()

	delete(c.items, key)
	return nil
}
614738
func (this *MemoryStore) Delete(id string) error {
	this.l.Lock()
	defer this.l.Unlock()
	delete(this.m, id)
	return nil
}
496844
func (h *Heap) Delete(obj interface{}) error {
	key, err := h.data.keyFunc(obj)
	if err != nil {
		return cache.KeyError{Obj: obj, Err: err}
	}
	if item, ok := h.data.items[key]; ok {
		heap.Remove(h.data, item.index)
		if h.metricRecorder != nil {
			h.metricRecorder.Dec()
		}
		return nil
	}
	return fmt.Errorf("object not found")
}
860382
func (table *RegommendTable) Delete(key interface{}) (*RegommendItem, error) {
	table.RLock()
	r, ok := table.items[key]
	if !ok {
		table.RUnlock()
		return nil, errors.New("Key not found in engine")
	}

	// engine value so we don't keep blocking the mutex.
	aboutToDeleteItem := table.aboutToDeleteItem
	table.RUnlock()

	// Trigger callbacks before deleting an item from engine.
	if aboutToDeleteItem != nil {
		aboutToDeleteItem(r)
	}

	r.RLock()
	defer r.RUnlock()

	table.Lock()
	defer table.Unlock()
	delete(table.items, key)

	return r, nil
}