// LastUpdated returns the last time a transaction was added to or removed from
// the main pool.  It does not include the orphan pool.
//
// This function is safe for concurrent access.
163821
func (mp *TxPool) LastUpdated() time.Time {
	return time.Unix(atomic.LoadInt64(&mp.lastUpdated), 0)
}
981763
func (c *Client) AllocStateUpdated(alloc *structs.Allocation) {
	if alloc.Terminated() {
		// Terminated, mark for GC if we're still tracking this alloc
		// runner. If it's not being tracked that means the server has
		// already GC'd it (see removeAlloc).
		ar, err := c.getAllocRunner(alloc.ID)

		if err == nil {
			c.garbageCollector.MarkForCollection(alloc.ID, ar)

			// Trigger a GC in case we're over thresholds and just
			// waiting for eligible allocs.
			c.garbageCollector.Trigger()
		}
	}

	// Strip all the information that can be reconstructed at the server.  Only
	// send the fields that are updatable by the client.
	stripped := new(structs.Allocation)
	stripped.ID = alloc.ID
	stripped.NodeID = c.NodeID()
	stripped.TaskStates = alloc.TaskStates
	stripped.ClientStatus = alloc.ClientStatus
	stripped.ClientDescription = alloc.ClientDescription
	stripped.DeploymentStatus = alloc.DeploymentStatus

	select {
	case c.allocUpdates <- stripped:
	case <-c.shutdownCh:
	}
}
346508
func (a *MobileAppState) NextUpdate(lastState *keybase1.MobileAppState) chan keybase1.MobileAppState {
	a.Lock()
	defer a.Unlock()
	ch := make(chan keybase1.MobileAppState, 1)
	if lastState != nil && *lastState != a.state {
		ch <- a.state
	} else {
		a.updateChs = append(a.updateChs, ch)
	}
	return ch
}
871322
func (q Query) GetLastModified() time.Time {
	return q.UpdatedAt.Truncate(time.Second)
}
458802
func (tq TrackerQuery) GetLastModified() time.Time {
	return tq.UpdatedAt.Truncate(time.Second)
}
47333
func (u *User) GetUpdatedAt() Timestamp {
	if u == nil || u.UpdatedAt == nil {
		return Timestamp{}
	}
	return *u.UpdatedAt
}
342799
func NoUpdate(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "noupdate", Listener: listener}
}
856304
func (u *updateLog) removeUpdate(i uint64) {
	entry := u.updateIndex[i]
	u.Remove(entry)
	delete(u.updateIndex, i)
}
135010
func (c *Controller) pvAddedUpdated(obj interface{}) {
	pv, ok := obj.(*v1.PersistentVolume)
	if !ok {
		utilruntime.HandleError(fmt.Errorf("PV informer returned non-PV object: %#v", obj))
		return
	}
	klog.V(4).Infof("Got event on PV %s", pv.Name)

	if protectionutil.NeedToAddFinalizer(pv, volumeutil.PVProtectionFinalizer) || protectionutil.IsDeletionCandidate(pv, volumeutil.PVProtectionFinalizer) {
		c.queue.Add(pv.Name)
	}
}
1001251
func (s *Item) SetLastModified(v time.Time) *Item {
	s.LastModified = &v
	return s
}
1224260
func (s *Part) SetLastModified(v time.Time) *Part {
	s.LastModified = &v
	return s
}
690214
func (_class PoolPatchClass) GetPoolUpdate(sessionID SessionRef, self PoolPatchRef) (_retval PoolUpdateRef, _err error) {
	_method := "pool_patch.get_pool_update"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertPoolPatchRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg)
	if _err != nil {
		return
	}
	_retval, _err = convertPoolUpdateRefToGo(_method + " -> ", _result.Value)
	return
}
1113738
func (dbMan *dbManager) updateLastSequence(lastSequence string) error {

	log.Debugf("updateLastSequence: %s", lastSequence)

	tx, err := dbMan.getDB().Begin()
	if err != nil {
		log.Errorf("getApidInstanceInfo: Unable to get DB tx Err: {%v}", err)
		return err
	}
	defer tx.Rollback()
	_, err = tx.Exec("UPDATE EDGEX_APID_CLUSTER SET last_sequence=?;", lastSequence)
	if err != nil {
		log.Errorf("UPDATE EDGEX_APID_CLUSTER Failed: %v", err)
		return err
	}
	log.Debugf("UPDATE EDGEX_APID_CLUSTER Success: %s", lastSequence)
	if err = tx.Commit(); err != nil {
		log.Errorf("Commit error in updateLastSequence: %v", err)
	}
	return err
}
735257
func (q *sessionQueue) restoreCommittedUpdates() {
	committedUpdates := q.cfg.ClientSession.CommittedUpdates

	// Construct and unordered slice of all committed updates with their
	// assigned sequence numbers.
	sortedUpdates := make([]updateWithSeqNum, 0, len(committedUpdates))
	for seqNum, update := range committedUpdates {
		sortedUpdates = append(sortedUpdates, updateWithSeqNum{
			seqNum: seqNum,
			update: update,
		})
	}

	// Sort the resulting slice by increasing sequence number.
	sort.Slice(sortedUpdates, func(i, j int) bool {
		return sortedUpdates[i].seqNum < sortedUpdates[j].seqNum
	})

	// Finally, add the sorted, committed updates to he commitQueue. These
	// updates will be prioritized before any new tasks are assigned to the
	// sessionQueue. The queue will begin uploading any tasks in the
	// commitQueue as soon as it is started, e.g. during client
	// initialization when detecting that this session has unacked updates.
	for _, update := range sortedUpdates {
		q.commitQueue.PushBack(update)
	}
}
187293
func (c *Cursor) Last() (key []byte, value []byte) {
	_assert(c.bucket.tx.db != nil, "tx closed")
	c.stack = c.stack[:0]
	p, n := c.bucket.pageNode(c.bucket.root)
	ref := elemRef{page: p, node: n}
	ref.index = ref.count() - 1
	c.stack = append(c.stack, ref)
	c.last()
	k, v, flags := c.keyValue()
	if (flags & uint32(bucketLeafFlag)) != 0 {
		return k, nil
	}
	return k, v
}
1362348
func (r FilteringResourceEventHandler) OnUpdate(oldObj, newObj interface{}) {
	newer := r.FilterFunc(newObj)
	older := r.FilterFunc(oldObj)
	switch {
	case newer && older:
		r.Handler.OnUpdate(oldObj, newObj)
	case newer && !older:
		r.Handler.OnAdd(newObj)
	case !newer && older:
		r.Handler.OnDelete(oldObj)
	default:
		// do nothing
	}
}
1336116
func (s *Preset) SetLastUpdated(v time.Time) *Preset {
	s.LastUpdated = &v
	return s
}