Update nodes data size.
322411
protected void accumulatePersistedNodesChanges(Map<String, Long> calculatedChangedNodesSize)
      throws QuotaManagerException
   {
      for (Entry<String, Long> entry : calculatedChangedNodesSize.entrySet())
      {
         String nodePath = entry.getKey();
         long delta = entry.getValue();

         try
         {
            long dataSize = delta + quotaPersister.getNodeDataSize(rName, wsName, nodePath);
            quotaPersister.setNodeDataSizeIfQuotaExists(rName, wsName, nodePath, dataSize);
         }
         catch (UnknownDataSizeException e)
         {
            calculateNodeDataSizeTool.getAndSetNodeDataSize(nodePath);
         }
      }
   }
761574
def update(self, data):
        """"""
        if data is None:
            for device in self.devices:
                device.clear_info()
        else:
            for device, device_info in zip(self.devices, data):
                device.device_info = device_info
                self.connection.log("Device information updated -> [{}]".format(device))
271428
def update_node_count(self, node, add_to_count):
        
        current_score = 0
        count_string = self.parser.getAttribute(node, 'gravityNodes')
        if count_string:
            current_score = int(count_string)

        new_score = current_score + add_to_count
        self.parser.setAttribute(node, "gravityNodes", str(new_score))
1112035
def _update_capacity(self, data):
        
        if 'ConsumedCapacity' in data:
            # This is all for backwards compatibility
            consumed = data['ConsumedCapacity']
            if not isinstance(consumed, list):
                consumed = [consumed]
            for cap in consumed:
                self.capacity += cap.get('CapacityUnits', 0)
                self.table_capacity += cap.get('Table',
                                               {}).get('CapacityUnits', 0)
                local_indexes = cap.get('LocalSecondaryIndexes', {})
                for k, v in six.iteritems(local_indexes):
                    self.indexes.setdefault(k, 0)
                    self.indexes[k] += v['CapacityUnits']
                global_indexes = cap.get('GlobalSecondaryIndexes', {})
                for k, v in six.iteritems(global_indexes):
                    self.global_indexes.setdefault(k, 0)
                    self.global_indexes[k] += v['CapacityUnits']
1184235
def _update_length(self):
        
        payload = type(self).oxm_value.pack(self.oxm_value)
        self.oxm_length = len(payload)
182734
protected function updateSize()
    {
        $sizeY = abs($this->startY);
        $sizeX = 0;
        foreach ($this->elements as $idx => $element) {
            $sizeY += $element->getHeight() + $this->margin;

            if (abs($element->getX()) + $element->getWidth() > $sizeX) {
                $sizeX = abs($element->getX()) + $element->getWidth();
            }
        }

        $this->setSize($sizeX, $sizeY);
    }
314597
def update_metadata_for_node(self, node, metadata):
        
        return self.manager.update_metadata(self, metadata, node=node)
573106
def _update_data_out(self, data, dtype):
        """"""
        try:
            self.data_out.update({dtype: data})
        except AttributeError:
            self.data_out = {dtype: data}
109892
def update_data(self, update_data_finished_cb):
        """"""
        if not self._update_data_finished_cb and self.nr_of_anchors > 0:
            self._update_data_finished_cb = update_data_finished_cb
            self.anchor_data = {}

            self.data_valid = False
            self._nr_of_anchors_to_fetch = self.nr_of_anchors

            logger.debug('Updating anchor data of memory {}'.format(self.id))

            # Start reading the first anchor
            self._currently_fetching_index = 0
            self._request_page(self.anchor_ids[self._currently_fetching_index])
666938
@SuppressWarnings("WeakerAccess")
    public void update(int node, double centroid, int count, List<Double> data, boolean forceInPlace) {
        if (centroid == centroids[node]||forceInPlace) {
            // we prefer to update in place so repeated values don't shuffle around and for merging
            centroids[node] = centroid;
            counts[node] = count;
            if (datas != null) {
                datas[node] = data;
            }
        } else {
            // have to do full scale update
            this.centroid = centroid;
            this.count = count;
            this.data = data;
            tree.update(node);
        }
    }
1244489
def _update_header_size(self):
        """"""
        column_count = self.table_header.model().columnCount()
        for index in range(0, column_count):
            if index < column_count:
                column_width = self.dataTable.columnWidth(index)
                self.table_header.setColumnWidth(index, column_width)
            else:
                break
34421
def resize(self):
        """"""
        yext = self.system.dae.m - len(self.unamey)
        xext = self.system.dae.n - len(self.unamex)
        if yext > 0:
            self.unamey.extend([''] * yext)
            self.fnamey.extend([''] * yext)
        if xext > 0:
            self.unamex.extend([''] * xext)
            self.fnamex.extend([''] * xext)
365364
def update(self, update_finished_cb):
        """"""
        if not self._update_finished_cb:
            self._update_finished_cb = update_finished_cb
            self.anchor_data = []
            self.nr_of_anchors = 0
            self.valid = False
            logger.debug('Updating content of memory {}'.format(self.id))

            # Start reading the header
            self.mem_handler.read(self, LocoMemory.MEM_LOCO_INFO,
                                  LocoMemory.MEM_LOCO_INFO_LEN)
610512
def update(self, size):
        
        if not isinstance(size, int):
            raise ValueError('{} type can not be displayed. '
                             'Please change it to Int.'.format(type(size)))

        self.current_size += size
        self.display_queue.put((self.current_size, self.total_length))
900186
def add_nodes(self, lb, nodes):
        """"""
        if not isinstance(nodes, (list, tuple)):
            nodes = [nodes]
        node_dicts = [nd.to_dict() for nd in nodes]
        resp, body = self.api.method_post("/loadbalancers/%s/nodes" % lb.id,
                body={"nodes": node_dicts})
        return resp, body
1230678
private void repairDataSize()
   {
      try
      {
         long dataSize = quotaPersister.getWorkspaceDataSize(rName, wsName);

         ChangesItem changesItem = new ChangesItem();
         changesItem.updateWorkspaceChangedSize(dataSize);

         quotaPersister.setWorkspaceDataSize(rName, wsName, 0); // workaround

         Runnable task = new ApplyPersistedChangesTask(wqm.getContext(), changesItem);
         task.run();
      }
      catch (UnknownDataSizeException e)
      {
         if (LOG.isTraceEnabled())
         {
            LOG.trace(e.getMessage(), e);
         }
      }
   }
768138
def update_all_nodes(self):
        
        item_model_controller = self.item_model_controller
        if item_model_controller:
            if self.__node_counts_dirty:
                for item in self.__mapping.values():
                    if "tree_node" in item.data:  # don't update the root node
                        tree_node = item.data["tree_node"]
                        item.data["display"] = self.__display_for_tree_node(tree_node)
                        item_model_controller.data_changed(item.row, item.parent.row, item.parent.id)
                self.__node_counts_dirty = False