// DeactivateAll deactivates all states connected to this engine
554750
func (se *StateEngine) DeactivateAll() {
	se.eachState(func(so States, tag string, _ func()) {
		so.Deactivate()
	})
}
732142
func (d *Daemon) RevNATDeleteAll() error {
	if option.Config.EnableIPv4 {
		if err := lbmap.RevNat4Map.DeleteAll(); err != nil {
			return err
		}
	}

	if option.Config.EnableIPv6 {
		if err := lbmap.RevNat6Map.DeleteAll(); err != nil {
			return err
		}
	}

	// TODO should we delete even if err is != nil?
	d.loadBalancer.RevNATMap = map[loadbalancer.ServiceID]loadbalancer.L3n4Addr{}
	return nil
}
1171344
func (svc *DynamoAccessor) DeleteAll(ctx context.Context) error {
	var deleteErr error
	input := &dynamodb.ScanInput{
		TableName: aws.String(svc.dynamoTableName()),
	}

	scanHandler := func(output *dynamodb.ScanOutput, lastPage bool) bool {
		writeDeleteRequests := make([]*dynamodb.WriteRequest, len(output.Items))
		for index, eachItem := range output.Items {
			keyID := ""
			stringVal, stringValOk := eachItem[attrID]
			if stringValOk && stringVal.S != nil {
				keyID = *(stringVal.S)
			}
			writeDeleteRequests[index] = &dynamodb.WriteRequest{
				DeleteRequest: &dynamodb.DeleteRequest{
					Key: dynamoKeyValueAttrMap(keyID),
				},
			}
		}
		input := &dynamodb.BatchWriteItemInput{
			RequestItems: map[string][]*dynamodb.WriteRequest{
				svc.dynamoTableName(): writeDeleteRequests,
			},
		}
		_, deleteErr = svc.dynamoSvc(ctx).BatchWriteItem(input)
		return deleteErr == nil
	}

	scanErr := svc.dynamoSvc(ctx).ScanPagesWithContext(ctx, input, scanHandler)
	if scanErr != nil {
		return scanErr
	}
	return deleteErr
}
949788
func (sa *StorageAuthority) DeactivateAuthorization(_ context.Context, _ string) error {
	return nil
}
989378
func (k *Store) RemoveAll() {
	k.mu.Lock()
	defer k.mu.Unlock()

	// Log all changes
	for key, _ := range k.db {
		k.logChange(removeOperation, key, nil)
	}
	k.db = make(map[string]interface{})
}
76956
func (s *set) removeAll() int {
	ret := len(s.m)
	s.m = make(map[setElement]struct{})
	return ret
}
1000709
func (t *T) DrainAll() error {
	for i := range t.shards {
		t.shards[i].closeConns(true, true)
	}
	for i := range t.shards {
		t.shards[i].wait()
	}
	return nil
}
828273
func (d *DeviceMapperDriver) DeactivateDevice(deviceHash string) error {
	glog.V(2).Infof("DeactivateDevice START(%s)", deviceHash)
	defer glog.V(2).Infof("DeactivateDevice END(%s)", deviceHash)

	var err error

	deviceName := d.deviceName(deviceHash)
	for i := 0; i < 200; i++ {
		err = devicemapper.RemoveDevice(deviceName)
		if err == nil {
			break
		}
		if err != devicemapper.ErrBusy {
			return err
		}

		// If we see EBUSY it may be a transient error,
		// sleep a bit a retry a few times.
		d.DeviceSet.Unlock()
		time.Sleep(100 * time.Millisecond)
		d.DeviceSet.Lock()
	}

	return err
}
1293217
func (m *BaseMechanism) Disable() {
	atomic.StoreInt64(&m.activated, 0)
	atomic.StoreInt64(&m.enabled, 0)
}
433020
func (s *DeleteCustomMetadataInput) SetDeleteAll(v bool) *DeleteCustomMetadataInput {
	s.DeleteAll = &v
	return s
}
867183
func (c *Client) DeleteAll() error {
	return c.withKeyRw("", func(rw *bufio.ReadWriter) error {
		return writeExpectf(rw, resultDeleted, "flush_all\r\n")
	})
}
456849
func (m *mapReact) DisableAll() {
	m.ro.Lock()
	for ms := range m.ma {
		m.ma[ms] = false
	}
	m.ro.Unlock()
}
254263
func (c *Client) RemoveAll(path string) error {
	rs, err := c.req("DELETE", path, nil, nil)
	if err != nil {
		return newPathError("Remove", path, 400)
	}
	err = rs.Body.Close()
	if err != nil {
		return err
	}

	if rs.StatusCode == 200 || rs.StatusCode == 204 || rs.StatusCode == 404 {
		return nil
	}

	return newPathError("Remove", path, rs.StatusCode)
}
1238539
func (r *keyring) RemoveAll() error {
	r.mu.Lock()
	defer r.mu.Unlock()
	if r.locked {
		return errLocked
	}

	r.keys = nil
	return nil
}
583823
func DeleteInactivateUsers() (err error) {
	users := make([]*User, 0, 10)
	if err = x.Where("is_active = ?", false).Find(&users); err != nil {
		return fmt.Errorf("get all inactive users: %v", err)
	}
	// FIXME: should only update authorized_keys file once after all deletions.
	for _, u := range users {
		if err = DeleteUser(u); err != nil {
			// Ignore users that were set inactive by admin.
			if IsErrUserOwnRepos(err) || IsErrUserHasOrgs(err) {
				continue
			}
			return err
		}
	}

	_, err = x.Where("is_activated = ?", false).Delete(new(EmailAddress))
	return err
}
352709
func (w *mlWriter) deactivatePlugin() {
	w.stack = w.stack[:len(w.stack)-1]
}
743142
func (s *ProvisioningService) DeleteAllTokens() error {
	startKey := backend.Key(tokensPrefix)
	return s.DeleteRange(context.TODO(), startKey, backend.RangeEnd(startKey))
}