This does the actual work of updating channel metadata.  This is called
		by the update(), and runs this method in another thread.
966631
def _update_deferred(self, event):
		
		if isinstance(event, ChannelCreated):
			i = event.channel[u'id']
			event.channel[u'is_archived'] = event.channel[u'is_member'] = False

			self.channels[i] = event.channel
		elif isinstance(event, ChannelArchive):
			self.channels[event.channel][u'is_archived'] = True
		elif isinstance(event, GroupArchive):
			self.groups[event.channel][u'is_archived'] = True
		elif isinstance(event, ChannelDeleted):
			# FIXME: Handle delete events properly.
			# Channels don't really get deleted, they're more just archived.
			self.channels[event.channel][u'is_archived'] = True
			self.channels[event.channel][u'is_open'] = False
		elif isinstance(event, GroupClose):
			# When you close a group, it isn't open to you anymore, but it might
			# still exist. Treat it like ChannelDeleted
			self.groups[event.channel][u'is_archived'] = True
			self.groups[event.channel][u'is_open'] = False
		elif isinstance(event, ChannelJoined):
			cid = event.channel[u'id']
			self.channels[cid] = event.channel
		elif isinstance(event, GroupJoined):
			gid = event.channel[u'id']
			self.groups[gid] = event.channel
		elif isinstance(event, ChannelLeft):
			self.channels[event.channel][u'is_member'] = False
		elif isinstance(event, GroupLeft):
			self.groups[event.channel][u'is_member'] = False
		elif isinstance(event, ChannelMarked):
			# TODO: implement datetime handler properly
			self.channels[event.channel][u'last_read'] = event._b[u'ts']
		elif isinstance(event, GroupMarked):
			self.groups[event.channel][u'last_read'] = event._b[u'ts']
		elif isinstance(event, ChannelRename):
			self.channels[event.channel[u'id']][u'name'] = event.channel[u'name']
		elif isinstance(event, GroupRename):
			self.groups[event.channel[u'id']][u'name'] = event.channel[u'name']
		elif isinstance(event, ChannelUnarchive):
			self.channels[event.channel][u'is_archived'] = False
		elif isinstance(event, GroupUnarchive):
			self.groups[event.channel][u'is_archived'] = False
		elif isinstance(event, ImClose):
			self.ims[event.channel][u'is_open'] = False
		elif isinstance(event, ImCreated):
			i = event.channel[u'id']
			event.channel[u'user'] = event.user

			self.ims[i] = event.channel
		elif isinstance(event, ImMarked):
			# TODO: implement datetime handler properly
			self.ims[event.channel][u'last_read'] = event._b[u'ts']
		elif isinstance(event, ImOpen):
			self.ims[event.channel][u'is_open'] = True
		elif isinstance(event, PresenceChange):
			self.users[event.user][u'presence'] = event.presence
		elif isinstance(event, UserChange):
			# Everything but the status is provided
			# Copy this out of the existing object

			uid = event.user[u'id']

			if event.user.get(u'status') is None and u'presence' in self.users[uid]:
				event.user[u'status'] = self.users[uid][u'presence']

			self.users[uid] = event.user
		elif isinstance(event, TeamPrefChange):
			self.team[u'prefs'][event.name] = event.value
		elif isinstance(event, TeamJoin):
			uid = event.user[u'id']
			self.users[uid] = event.user
		elif isinstance(event, BotAdded) or isinstance(event, BotChanged):
			bid = event.bot[u'id']
			self.bots[bid] = event.bot
1137441
public static base_response update(nitro_service client, channel resource) throws Exception {
		channel updateresource = new channel();
		updateresource.id = resource.id;
		updateresource.state = resource.state;
		updateresource.mode = resource.mode;
		updateresource.conndistr = resource.conndistr;
		updateresource.macdistr = resource.macdistr;
		updateresource.lamac = resource.lamac;
		updateresource.speed = resource.speed;
		updateresource.flowctl = resource.flowctl;
		updateresource.hamonitor = resource.hamonitor;
		updateresource.tagall = resource.tagall;
		updateresource.trunk = resource.trunk;
		updateresource.ifalias = resource.ifalias;
		updateresource.throughput = resource.throughput;
		updateresource.lrminthroughput = resource.lrminthroughput;
		updateresource.bandwidthhigh = resource.bandwidthhigh;
		updateresource.bandwidthnormal = resource.bandwidthnormal;
		return updateresource.update_resource(client);
	}
90319
public static void updateMetadata(CacheEntry entry, Metadata providedMetadata) {
      if (entry != null && providedMetadata != null) {
         Metadata mergedMetadata;
         if (entry.getMetadata() == null) {
            mergedMetadata = providedMetadata;
         } else {
            mergedMetadata = applyVersion(entry.getMetadata(), providedMetadata);
         }
         entry.setMetadata(mergedMetadata);
      }
   }
765027
def update(self, dt):
        

        method = "update"

        A = None
        metadata = {method: dt}

        send_array(self.socket, A, metadata)
        A, metadata = recv_array(
            self.socket, poll=self.poll, poll_timeout=self.poll_timeout,
            flags=self.zmq_flags)
499427
def update(self, other):
        
        if other.model._meta.abstract:
            self.local_fields.update(other.local_fields)
        self.fields.update(other.fields)
782734
def do_file_update_metadata(client, args):
    """"""
    client.update_file_metadata(args.uri, filename=args.filename,
                                description=args.description, mtime=args.mtime,
                                privacy=args.privacy)
    return True
1157170
def _update_metadata(self, kwargs=None):
        '''
        '''

        # If not given metadata, use instance.list to get it for container
        if kwargs == None and hasattr(self, 'name'):
            kwargs = self._list(self.name, quiet=True, return_json=True)

        # Add acceptable arguments
        for arg in ['pid', 'name']:

           # Skip over non-iterables:
           if arg in kwargs:
               setattr(self, arg, kwargs[arg])
       
        if "image" in kwargs:
            self._image = kwargs['image']
        elif "container_image" in kwargs:
            self._image = kwargs['container_image']
506272
def UpdateSNMPObjsAsync():
	

	# UpdateSNMPObjs() will be executed in a separate thread so that the main
	# thread can continue looping and processing SNMP requests while the data
	# update is still in progress. However we'll make sure only one update
	# thread is run at any time, even if the data update interval has been set
	# too low.
	if threading.active_count() == 1:
		LogMsg("Creating thread for UpdateSNMPObjs().")
		t = threading.Thread(target=UpdateSNMPObjs, name="UpdateSNMPObjsThread")
		t.daemon = True
		t.start()
	else:
		LogMsg("Data update still active, data update interval too low?")
923200
protected void updateBytesRead() {
        if (log.isTraceEnabled()) {
            log.trace("updateBytesRead");
        }
        long bytesRead = getReadBytes();
        if (bytesRead >= nextBytesRead) {
            BytesRead sbr = new BytesRead((int) (bytesRead % Integer.MAX_VALUE));
            getChannel(2).write(sbr);
            nextBytesRead += bytesReadInterval;
        }
    }
772915
def update(self, data_and_metadata: DataAndMetadata.DataAndMetadata, state: str, sub_area, view_id) -> None:
        """"""
        self.__state = state
        self.__sub_area = sub_area

        hardware_source_id = self.__hardware_source.hardware_source_id
        channel_index = self.index
        channel_id = self.channel_id
        channel_name = self.name
        metadata = copy.deepcopy(data_and_metadata.metadata)
        hardware_source_metadata = dict()
        hardware_source_metadata["hardware_source_id"] = hardware_source_id
        hardware_source_metadata["channel_index"] = channel_index
        if channel_id is not None:
            hardware_source_metadata["reference_key"] = "_".join([hardware_source_id, channel_id])
            hardware_source_metadata["channel_id"] = channel_id
        else:
            hardware_source_metadata["reference_key"] = hardware_source_id
        if channel_name is not None:
            hardware_source_metadata["channel_name"] = channel_name
        if view_id:
            hardware_source_metadata["view_id"] = view_id
        metadata.setdefault("hardware_source", dict()).update(hardware_source_metadata)

        data = data_and_metadata.data
        master_data = self.__data_and_metadata.data if self.__data_and_metadata else None
        data_matches = master_data is not None and data.shape == master_data.shape and data.dtype == master_data.dtype
        if data_matches and sub_area is not None:
            top = sub_area[0][0]
            bottom = sub_area[0][0] + sub_area[1][0]
            left = sub_area[0][1]
            right = sub_area[0][1] + sub_area[1][1]
            if top > 0 or left > 0 or bottom < data.shape[0] or right < data.shape[1]:
                master_data = numpy.copy(master_data)
                master_data[top:bottom, left:right] = data[top:bottom, left:right]
            else:
                master_data = numpy.copy(data)
        else:
            master_data = data  # numpy.copy(data). assume data does not need a copy.

        data_descriptor = data_and_metadata.data_descriptor
        intensity_calibration = data_and_metadata.intensity_calibration if data_and_metadata else None
        dimensional_calibrations = data_and_metadata.dimensional_calibrations if data_and_metadata else None
        timestamp = data_and_metadata.timestamp
        new_extended_data = DataAndMetadata.new_data_and_metadata(master_data, intensity_calibration=intensity_calibration, dimensional_calibrations=dimensional_calibrations, metadata=metadata, timestamp=timestamp, data_descriptor=data_descriptor)

        self.__data_and_metadata = new_extended_data

        self.data_channel_updated_event.fire(new_extended_data)
        self.is_dirty = True
1312052
def update_channel(data)
      channel = Channel.new(data, self)
      old_channel = @channels[channel.id]
      return unless old_channel

      old_channel.update_from(channel)
    end
508725
private void updateRequestMetadata() {
        // Take event level metadata, merge with top level metadata
        // event level metadata takes precedence
        try {
            JSONObject metadata = new JSONObject();
            Iterator<String> i = prefHelper_.getRequestMetadata().keys();
            while (i.hasNext()) {
                String k = i.next();
                metadata.put(k, prefHelper_.getRequestMetadata().get(k));
            }
            JSONObject originalMetadata = params_.optJSONObject(Defines.Jsonkey.Metadata.getKey());
            if (originalMetadata != null) {
                Iterator<String> postIter = originalMetadata.keys();
                while (postIter.hasNext()) {
                    String key = postIter.next();
                    // override keys from above
                    metadata.put(key, originalMetadata.get(key));
                }
            }
            // Install metadata need to be send only with Install request
            if ((this instanceof ServerRequestRegisterInstall) && prefHelper_.getInstallMetadata().length() > 0) {
                params_.putOpt(Defines.Jsonkey.InstallMetadata.getKey(), prefHelper_.getInstallMetadata());
            }
            params_.put(Defines.Jsonkey.Metadata.getKey(), metadata);
        } catch (JSONException e) {
           PrefHelper.Debug("Could not merge metadata, ignoring user metadata.");
        }
    }
1091973
def update(self, archive_name, version_metadata):
        '''
        
        '''
        version_metadata['updated'] = self.create_timestamp()
        version_metadata['version'] = str(
            version_metadata.get('version', None))

        if version_metadata.get('message') is not None:
            version_metadata['message'] = str(version_metadata['message'])

        self._update(archive_name, version_metadata)
1303442
def _update(self, data: TransDict, *args, **kwargs):
        

        for l in self.listeners:
            l(data, *args, **kwargs)
1258227
public void updateMetadata(String tableName, String metadata){
		try {
			updateStatement.setString(1, metadata);
			updateStatement.setLong(2, tableName.hashCode());
			updateStatement.executeUpdate();
		} catch (SQLException e) {
			throw new BackendException("Could not update metadata for table '" + tableName + "'", e);
		}
	}
256757
private synchronized void updateBytesWrittenMeter() {
    if (this.bytesWrittenMeter.isPresent()) {
      try {
        this.bytesWrittenMeter.get().mark(bytesWritten() - this.bytesWrittenMeter.get().getCount());
      } catch (IOException e) {
        log.error("Cannot get bytesWritten for DataWriter, will not update " + this.bytesWrittenMeter.get().toString(),
            e);
      }
    }
  }
597322
def update_pipe_channel(self, uid, channel_name, label): # pylint: disable=unused-argument
        '''
        
        '''
        pipe_group_name = _form_pipe_channel_name(channel_name)

        if self.channel_layer:
            current = self.channel_maps.get(uid, None)
            if current != pipe_group_name:
                if current:
                    async_to_sync(self.channel_layer.group_discard)(current, self.channel_name)

                self.channel_maps[uid] = pipe_group_name
                async_to_sync(self.channel_layer.group_add)(pipe_group_name, self.channel_name)