// SetCapacity sets the capacity of the Buffer.
544830
func (b *Buffer) SetCapacity(capacity int) {
	newArray := make([]float64, capacity)
	if b.size > 0 {
		if b.head < b.tail {
			arrayCopy(b.array, b.head, newArray, 0, b.size)
		} else {
			arrayCopy(b.array, b.head, newArray, 0, len(b.array)-b.head)
			arrayCopy(b.array, 0, newArray, len(b.array)-b.head, b.tail)
		}
	}
	b.array = newArray
	b.head = 0
	if b.size == capacity {
		b.tail = 0
	} else {
		b.tail = b.size
	}
}
1282412
func (cp *ConnectionPool) SetCapacity(capacity int) (err error) {
	cp.mu.Lock()
	defer cp.mu.Unlock()
	if cp.connections != nil {
		err = cp.connections.SetCapacity(capacity)
		if err != nil {
			return err
		}
	}
	cp.capacity = capacity
	return nil
}
142440
func (s *CreateStackInput) SetCapabilities(v []*string) *CreateStackInput {
	s.Capabilities = v
	return s
}
1051644
func (me *Cache) SetCapacity(capacity int64) {
	me.mu.Lock()
	defer me.mu.Unlock()
	me.capacity = capacity
}
565938
func (h *ManagerStub) GetCapacity() (v1.ResourceList, v1.ResourceList, []string) {
	return nil, nil, []string{}
}
1257382
func (s *StackSet) SetCapabilities(v []*string) *StackSet {
	s.Capabilities = v
	return s
}
401569
func (s *ScalingConfiguration) SetMinCapacity(v int64) *ScalingConfiguration {
	s.MinCapacity = &v
	return s
}
229274
func (us *UpgradeStrategy) SetMinimumHealthCapacity(cap float64) *UpgradeStrategy {
	us.MinimumHealthCapacity = &cap
	return us
}
386960
func (s *JobRun) SetAllocatedCapacity(v int64) *JobRun {
	s.AllocatedCapacity = &v
	return s
}
601596
func (s *ScalingConfigurationInfo) SetMinCapacity(v int64) *ScalingConfigurationInfo {
	s.MinCapacity = &v
	return s
}
1228854
func (s *DescribeFleetCapacityOutput) SetFleetCapacity(v []*FleetCapacity) *DescribeFleetCapacityOutput {
	s.FleetCapacity = v
	return s
}
907627
func (b *BlockCacheStandard) SetCleanBytesCapacity(capacity uint64) {
	atomic.StoreUint64(&b.cleanBytesCapacity, capacity)
}
13568
func (s *FileSystem) SetStorageCapacity(v int64) *FileSystem {
	s.StorageCapacity = &v
	return s
}
395714
func (s *RootStorage) SetCapacity(v string) *RootStorage {
	s.Capacity = &v
	return s
}
565420
func (g *Generator) SetSolarisCappedMemoryPhysical(physical string) {
	g.initConfigSolarisCappedMemory()
	g.Config.Solaris.CappedMemory.Physical = physical
}
1081201
func (rr *RoundRobin) SetCapacity(capacity int) error {
	rr.mu.Lock()
	defer rr.available.Broadcast()
	defer rr.mu.Unlock()

	nr := make(chan fifoWrapper, capacity)
	// This loop transfers resources from the old channel
	// to the new one, until it fills up or runs out.
	// It discards extras, if any.
	for {
		select {
		case fw := <-rr.resources:
			if len(nr) < cap(nr) {
				nr <- fw
			} else {
				go fw.resource.Close()
				rr.size--
			}
			continue
		default:
		}
		break
	}
	rr.resources = nr
	return nil
}
497917
func (tsv *TabletServer) SetPoolSize(val int) {
	tsv.qe.conns.SetCapacity(val)
}