// Set sets the value of a particular instance of PCPCounterVector.
6210
func (c *PCPCounterVector) Set(val int64, instance string) error {
	c.mutex.Lock()
	defer c.mutex.Unlock()

	v, err := c.valInstance(instance)
	if err != nil {
		return err
	}

	if val < v.(int64) {
		return errors.Errorf("cannot set instance %s to a lesser value %v", instance, val)
	}

	return c.setInstance(val, instance)
}
63769
func (z *ZkPlus) Set(path string, data []byte, version int32) (*zk.Stat, error) {
	z.forPath(path).Log(logkey.ZkMethod, "Set")
	return z.blockOnConn().Set(z.realPath(path), data, version)
}
1174533
func (fds *FDSet) Set(fd uintptr) {
	fds.Bits[fd/NFDBITS] |= (1 << (fd % NFDBITS))
}
677093
func (a *accounter) Set(n int64) *accounter {
	atomic.StoreInt64(&a.current, n)
	return a
}
722330
func (c *PIDController) Set(setpoint float64) *PIDController {
	c.setpoint = setpoint
	return c
}
1049295
func (d *ManyToOne) Set(data GenericDataType) {
	for {
		writeIndex := atomic.AddUint64(&d.writeIndex, 1)
		idx := writeIndex % uint64(len(d.buffer))
		old := atomic.LoadPointer(&d.buffer[idx])

		if old != nil &&
			(*bucket)(old) != nil &&
			(*bucket)(old).seq > writeIndex-uint64(len(d.buffer)) {
			log.Println("Diode set collision: consider using a larger diode")
			continue
		}

		newBucket := &bucket{
			data: data,
			seq:  writeIndex,
		}

		if !atomic.CompareAndSwapPointer(&d.buffer[idx], old, unsafe.Pointer(newBucket)) {
			log.Println("Diode set collision: consider using a larger diode")
			continue
		}

		return
	}
}
681993
func (t *StreamType) Set(v string) error {
	return StreamTypeFlagEnum.FlagSet(t, v)
}
1041781
func (c *Counter) Set(i int) {
	c.Lock()
	c.count = i
	c.Unlock()
}
594794
func (s *RPCServer) Set(arg SetIn, out *SetOut) error {
	return s.debugger.SetVariableInScope(arg.Scope, arg.Symbol, arg.Value)
}
373095
func (k *KinesisConsumer) Set(streamName, shardID, sequenceNumber string) error {
	if sequenceNumber == "" {
		return fmt.Errorf("sequence number should not be empty")
	}

	k.checkpointTex.Lock()
	k.checkpoints[sequenceNumber] = checkpoint{streamName: streamName, shardID: shardID}
	k.checkpointTex.Unlock()

	return nil
}
274429
func (p *Pubring) Set(pk *PublicKey) error {
	p.Lock()
	defer p.Unlock()

	p.insert(pubKRToPB(pk))
	return nil
}
128322
func (f *StreamNameFlag) Set(v string) error {
	if err := types.StreamName(v).Validate(); err != nil {
		return err
	}
	*f = StreamNameFlag(v)
	return nil
}
1191133
func (ref *Reference) Set(value interface{}) error {
	buf := bytes.NewBuffer([]byte{})
	err := json.NewEncoder(buf).Encode(value)
	if err != nil {
		return err
	}
	_, err = ref.invokeRequest(http.MethodPut, buf)
	if err != nil {
		return err
	}
	return nil
}
1148529
func (fds *FDSet) Set(fd uintptr) {
	var i uint
	for i = 0; i < fds.fd_count; i++ {
		if fds.fd_array[i] == fd {
			break
		}
	}
	if i == fds.fd_count {
		if fds.fd_count < FD_SETSIZE {
			fds.fd_array[i] = fd
			fds.fd_count++
		}
	}
}
222965
func (p Pointers) Set(i int) {
	p[uint(i)>>ptrShift] |= 1 << (uint(i) & ptrModMask)
}
926729
func (c *Checkpoint) Set(streamName, shardID, sequenceNumber string) error {
	c.mu.Lock()
	defer c.mu.Unlock()

	if sequenceNumber == "" {
		return fmt.Errorf("sequence number should not be empty")
	}

	key := key{
		streamName: streamName,
		shardID:    shardID,
	}

	c.checkpoints[key] = sequenceNumber

	return nil
}
912247
func Set(key string, value interface{}, args ...interface{}) error {
	return std.Set(key, value, args...)
}