// RemoveGroupedCallback removes a collector from a specific group.
769899
func (s *Scheduler) RemoveGroupedCallback(group string, db Collector) {
	s.callbackMutex.Lock()
	defer s.callbackMutex.Unlock()
	if g, exists := s.callbackMap[group]; exists {
		delete(g.callbacks, db)
		if len(g.callbacks) == 0 {
			delete(s.callbackMap, group)
		}
	}
}
964526
func (client *Client) DeleteScalingGroup(args *DeleteScalingGroupArgs) (resp *DeleteScalingGroupResponse, err error) {
	response := DeleteScalingGroupResponse{}
	err = client.InvokeByFlattenMethod("DeleteScalingGroup", args, &response)

	if err != nil {
		return nil, err
	}
	return &response, nil
}
405736
func (c *VSphereCloud) DeleteGroup(g *cloudinstances.CloudInstanceGroup) error {
	glog.V(8).Infof("vSphere cloud provider DeleteGroup not implemented yet")
	return fmt.Errorf("vSphere cloud provider does not support deleting cloud groups at this time.")
}
285569
func (cp *CallbackProcessor) Remove(callbackName string) {
	log.Printf("[info] removing callback `%v` from %v\n", callbackName, fileWithLineNum())
	cp.name = callbackName
	cp.remove = true
	cp.parent.processors = append(cp.parent.processors, cp)
	cp.parent.reorder()
}
1198262
func (tc *TransCache) RemoveGroup(chID, grpID string, commit bool, transID string) {
	if commit {
		if transID == "" { // Lock locally
			tc.cacheMux.Lock()
			defer tc.cacheMux.Unlock()
		}
		tc.cacheInstance(chID).RemoveGroup(grpID)
	} else {
		tc.transBufMux.Lock()
		tc.transactionBuffer[transID] = append(tc.transactionBuffer[transID],
			&transactionItem{cacheID: chID, verb: RemoveGroup, groupIDs: []string{grpID}})
		tc.transBufMux.Unlock()
	}
}
1211315
func (m *Monitor) removeListener(ml listener.MonitorListener) {
	m.Lock()
	defer m.Unlock()

	delete(m.listeners, ml)
	log.WithFields(logrus.Fields{
		"count.listener": len(m.listeners),
		"version":        ml.Version(),
	}).Debug("Removed listener")

	// If this was the final listener, shutdown the perf reader and unmap our
	// ring buffer readers. This tells the kernel to not emit this data.
	// Note: it is critical to hold the lock and check the number of listeners.
	// This guards against an older generation listener calling the
	// current generation perfReaderCancel
	if len(m.listeners) == 0 {
		m.perfReaderCancel()
	}
}
991987
func GroupRemoveAll(ctx context.Context, groupName string) error {
	return groupServiceInstance.GroupRemoveAll(ctx, groupName)
}
683057
func (b *Broker) DeleteGroups(request *DeleteGroupsRequest) (*DeleteGroupsResponse, error) {
	response := new(DeleteGroupsResponse)

	if err := b.sendAndReceive(request, response); err != nil {
		return nil, err
	}

	return response, nil
}
261153
func GroupDelete(ctx context.Context, groupName string) error {
	return groupServiceInstance.GroupDelete(ctx, groupName)
}
342861
func (s *Sublist) RemoveBatch(subs []*subscription) error {
	s.Lock()
	defer s.Unlock()

	for _, sub := range subs {
		if err := s.remove(sub, false); err != nil {
			return err
		}
	}
	return nil
}
879964
func (c *legacyNovaFirewaller) DeleteGroups(ctx context.ProviderCallContext, names ...string) error {
	return deleteSecurityGroupsOneOfNames(ctx, c.deleteSecurityGroups, names...)
}
932250
func (c *Client) removeAlloc(allocID string) {
	c.allocLock.Lock()
	defer c.allocLock.Unlock()

	ar, ok := c.allocs[allocID]
	if !ok {
		if _, ok := c.invalidAllocs[allocID]; ok {
			// Removing from invalid allocs map if present
			delete(c.invalidAllocs, allocID)
		} else {
			// Alloc is unknown, log a warning.
			c.logger.Warn("cannot remove nonexistent alloc", "alloc_id", allocID, "error", "alloc not found")
		}
		return
	}

	// Stop tracking alloc runner as it's been GC'd by the server
	delete(c.allocs, allocID)

	// Ensure the GC has a reference and then collect. Collecting through the GC
	// applies rate limiting
	c.garbageCollector.MarkForCollection(allocID, ar)

	// GC immediately since the server has GC'd it
	go c.garbageCollector.Collect(allocID)
}
339987
func (c *Client) DeleteAffinityGroup(p *DeleteAffinityGroupParameter) (*Result, error) {
	obj, err := c.Request("deleteAffinityGroup", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Result), err
}
104804
func (c *Callbacks) OnCNETMsg_SpawnGroup_Unload(fn func(*dota.CNETMsg_SpawnGroup_Unload) error) {
	c.onCNETMsg_SpawnGroup_Unload = append(c.onCNETMsg_SpawnGroup_Unload, fn)
}
1257695
func (c *MemoryGroupService) GroupRemoveAll(ctx context.Context, groupName string) error {
	memoryGroupsMu.Lock()
	defer memoryGroupsMu.Unlock()

	mg, ok := memoryGroups[groupName]
	if !ok {
		return constants.ErrGroupNotFound
	}

	mg.Uids = []string{}
	return nil
}
303953
func (m *MockCgroupnetcls) DeleteCgroup(cgroupname string) error {
	ret := m.ctrl.Call(m, "DeleteCgroup", cgroupname)
	ret0, _ := ret[0].(error)
	return ret0
}
826550
func DeleteEndpointGroup(key string) error {
	collections.endpointGroupMutex.Lock()
	obj := collections.endpointGroups[key]
	collections.endpointGroupMutex.Unlock()
	if obj == nil {
		log.Errorf("endpointGroup %s not found", key)
		return errors.New("endpointGroup not found")
	}

	// Check if we handle this object
	if objCallbackHandler.EndpointGroupCb == nil {
		log.Errorf("No callback registered for endpointGroup object")
		return errors.New("Invalid object type")
	}

	// Perform callback
	err := objCallbackHandler.EndpointGroupCb.EndpointGroupDelete(obj)
	if err != nil {
		log.Errorf("EndpointGroupDelete retruned error for: %+v. Err: %v", obj, err)
		return err
	}

	// delete it from modeldb
	collections.endpointGroupMutex.Lock()
	err = obj.Delete()
	collections.endpointGroupMutex.Unlock()
	if err != nil {
		log.Errorf("Error deleting endpointGroup %s. Err: %v", obj.Key, err)
	}

	// delete it from cache
	collections.endpointGroupMutex.Lock()
	delete(collections.endpointGroups, key)
	collections.endpointGroupMutex.Unlock()

	return nil
}