// UpdateStateInbound updates the state of the TCB based on the supplied inbound
// segment.
549650
func (t *TCB) UpdateStateInbound(tcp header.TCP) Result {
	st := t.handlerInbound(t, tcp)
	if st != ResultDrop {
		t.state = st
	}
	return st
}
143872
func (c *Conn) UpdateSetting(args map[string]interface{}, filter_indices ...string) (ClusterStateResponse, error) {
	var url string
	var retval ClusterStateResponse

	url = "/_cluster/state"

	body, err := c.DoCommand("GET", url, args, nil)
	if err != nil {
		return retval, err
	}
	if err == nil {
		// marshall into json
		jsonErr := json.Unmarshal(body, &retval)
		if jsonErr != nil {
			return retval, jsonErr
		}
	}
	return retval, err
}
1038809
func (s *ShapeIndex) updateBound(edge *clippedEdge, uEnd int, u float64, vEnd int, v float64) *clippedEdge {
	c := &clippedEdge{faceEdge: edge.faceEdge}
	if uEnd == 0 {
		c.bound.X.Lo = u
		c.bound.X.Hi = edge.bound.X.Hi
	} else {
		c.bound.X.Lo = edge.bound.X.Lo
		c.bound.X.Hi = u
	}

	if vEnd == 0 {
		c.bound.Y.Lo = v
		c.bound.Y.Hi = edge.bound.Y.Hi
	} else {
		c.bound.Y.Lo = edge.bound.Y.Lo
		c.bound.Y.Hi = v
	}

	return c
}
848659
func (c *FakeStatefulSets) UpdateStatus(statefulSet *v1beta2.StatefulSet) (*v1beta2.StatefulSet, error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &v1beta2.StatefulSet{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta2.StatefulSet), err
}
529611
func (c *EventCorrelator) UpdateState(event *v1.Event) {
	c.logger.updateState(event)
}
237987
func (c *FakeIngresses) UpdateStatus(ingress *v1beta1.Ingress) (*v1beta1.Ingress, error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateSubresourceAction(ingressesResource, "status", c.ns, ingress), &v1beta1.Ingress{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.Ingress), err
}
727996
func (n *NullClusterDomainManager) UpdateDomainState(name string, state types.ClusterDomainState) error {
	return ErrNoClusterDomainProvided
}
103313
func (s *storeImpl) updateCurrentState(serviceID string, currentState string, updatedAt time.Time) error {
	// Validate desired state
	if err := ServiceCurrentState(currentState).Validate(); err != nil {
		plog.WithFields(log.Fields{
			"serviceID":    serviceID,
			"currentState": currentState,
		}).Debug("Invalid Current State")
		return err
	}

	plog.WithFields(log.Fields{
		"serviceID":    serviceID,
		"currentState": currentState,
		"updatedAt":    updatedAt,
	}).Debug("Saving current state in cache")

	s.serviceCacheLock.Lock()
	defer s.serviceCacheLock.Unlock()
	var cacheEntry volatileService

	cacheEntry, ok := s.serviceCache[serviceID]
	if !ok {
		cacheEntry = volatileService{
			ID:           serviceID,
			CurrentState: currentState,
			UpdatedAt:    updatedAt,
		}
	} else {
		cacheEntry.CurrentState = currentState
		cacheEntry.UpdatedAt = updatedAt
	}

	s.serviceCache[serviceID] = cacheEntry

	return nil
}
373273
func (e *eventLogger) updateState(event *v1.Event) {
	key := getEventKey(event)
	e.Lock()
	defer e.Unlock()
	// record our new observation
	e.cache.Add(
		key,
		eventLog{
			count:           uint(event.Count),
			firstTimestamp:  event.FirstTimestamp,
			name:            event.Name,
			resourceVersion: event.ResourceVersion,
		},
	)
}
1196609
func (ac *addrConn) updateConnectivityState(s connectivity.State) {
	if ac.state == s {
		return
	}

	updateMsg := fmt.Sprintf("Subchannel Connectivity change to %v", s)
	ac.state = s
	if channelz.IsOn() {
		channelz.AddTraceEvent(ac.channelzID, &channelz.TraceEventDesc{
			Desc:     updateMsg,
			Severity: channelz.CtINFO,
		})
	}
	ac.cc.handleSubConnStateChange(ac.acbw, s)
}
417648
func (csm *connectivityStateManager) updateState(state connectivity.State) {
	csm.mu.Lock()
	defer csm.mu.Unlock()
	if csm.state == connectivity.Shutdown {
		return
	}
	if csm.state == state {
		return
	}
	csm.state = state
	if channelz.IsOn() {
		channelz.AddTraceEvent(csm.channelzID, &channelz.TraceEventDesc{
			Desc:     fmt.Sprintf("Channel Connectivity change to %v", state),
			Severity: channelz.CtINFO,
		})
	}
	if csm.notifyChan != nil {
		// There are other goroutines waiting on this channel.
		close(csm.notifyChan)
		csm.notifyChan = nil
	}
}
716603
func (d *PendingDeployment) UpdateStatus(status string) {
	d.mutex.Lock()
	defer d.mutex.Unlock()
	d.status.Set(status)
}
54859
func (c *statefulSets) Update(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
	result = &v1beta1.StatefulSet{}
	err = c.client.Put().
		Namespace(c.ns).
		Resource("statefulsets").
		Name(statefulSet.Name).
		Body(statefulSet).
		Do().
		Into(result)
	return
}
890681
func persistInbound(s Store, m packets.ControlPacket) {
	switch m.Details().Qos {
	case 0:
		switch m.(type) {
		case *packets.PubackPacket, *packets.SubackPacket, *packets.UnsubackPacket, *packets.PubcompPacket:
			// Received a puback. delete matching publish
			// from obound
			s.Del(outboundKeyFromMID(m.Details().MessageID))
		case *packets.PublishPacket, *packets.PubrecPacket, *packets.PingrespPacket, *packets.ConnackPacket:
		default:
			ERROR.Println(STR, "Asked to persist an invalid messages type")
		}
	case 1:
		switch m.(type) {
		case *packets.PublishPacket, *packets.PubrelPacket:
			// Received a publish. store it in ibound
			// until puback sent
			s.Put(inboundKeyFromMID(m.Details().MessageID), m)
		default:
			ERROR.Println(STR, "Asked to persist an invalid messages type")
		}
	case 2:
		switch m.(type) {
		case *packets.PublishPacket:
			// Received a publish. store it in ibound
			// until pubrel received
			s.Put(inboundKeyFromMID(m.Details().MessageID), m)
		default:
			ERROR.Println(STR, "Asked to persist an invalid messages type")
		}
	}
}
395757
func updateStateFile(state *State, t *tail.Tail, file string, stateFh *os.File) {
	logStat := unix.Stat_t{}
	unix.Stat(file, &logStat)
	currentPos, err := t.Tell()
	if err != nil {
		return
	}
	state.INode = uint64(logStat.Ino)
	state.Offset = currentPos
	out, err := json.Marshal(state)
	if err != nil {
		return
	}
	stateFh.Truncate(0)
	out = append(out, '\n')
	stateFh.WriteAt(out, 0)
	stateFh.Sync()
}
1224397
func updateServiceOpState(ds models.DeviceService, os models.OperatingState, w http.ResponseWriter) error {
	ds.OperatingState = os
	if err := dbClient.UpdateDeviceService(ds); err != nil {
		http.Error(w, err.Error(), http.StatusServiceUnavailable)
		return err
	}

	return nil
}
1302615
func (s *MetricAlarm) SetStateUpdatedTimestamp(v time.Time) *MetricAlarm {
	s.StateUpdatedTimestamp = &v
	return s
}