Updates the table settings (read and write capacities).
@param appid name of the {@link com.erudika.para.core.App}
@param readCapacity read capacity
@param writeCapacity write capacity
@return true if updated
779689
public static boolean updateTable(String appid, long readCapacity, long writeCapacity) {
		if (StringUtils.isBlank(appid) || StringUtils.containsWhitespace(appid)) {
			return false;
		}
		String table = getTableNameForAppid(appid);
		try {
			// AWS throws an exception if the new read/write capacity values are the same as the current ones
			getClient().updateTable(new UpdateTableRequest().withTableName(table).
					withProvisionedThroughput(new ProvisionedThroughput(readCapacity, writeCapacity)));
			return true;
		} catch (Exception e) {
			logger.error("Could not update table '{}' - table is not active or no change to capacity: {}",
					table, e.getMessage());
		}
		return false;
	}
169225
private String createRow(String key, String appid, Map<String, AttributeValue> row) {
		if (StringUtils.isBlank(key) || StringUtils.isBlank(appid) || row == null || row.isEmpty()) {
			return null;
		}
		try {
			key = getKeyForAppid(key, appid);
			setRowKey(key, row);
			PutItemRequest putItemRequest = new PutItemRequest(getTableNameForAppid(appid), row);
			client().putItem(putItemRequest);
		} catch (Exception e) {
			logger.error("Could not write row to DB - appid={}, key={}", appid, key, e);
			throwIfNecessary(e);
		}
		return key;
	}
775969
protected void updateApp(String uuid) {

        try {
            CmsGroup group = m_cms.readGroup(new CmsUUID(uuid));
            m_app.update(group.getOuFqn(), m_type, group.getId(), "");
        } catch (CmsException e) {
            LOG.error("unable to read group.", e);
        }
    }
801006
public function setAppId($appId = null)
    {
        return $this->set($this->appIdColumn, $appId ?: wei()->app->getId());
    }
904180
func (s *StopAppReplicationInput) SetAppId(v string) *StopAppReplicationInput {
	s.AppId = &v
	return s
}
1176192
public static boolean existsTable(String appid) {
		if (StringUtils.isBlank(appid)) {
			return false;
		}
		try {
			DescribeTableResult res = getClient().describeTable(getTableNameForAppid(appid));
			return res != null;
		} catch (Exception e) {
			return false;
		}
	}
156241
public static base_response update(nitro_service client, appfwsettings resource) throws Exception {
		appfwsettings updateresource = new appfwsettings();
		updateresource.defaultprofile = resource.defaultprofile;
		updateresource.undefaction = resource.undefaction;
		updateresource.sessiontimeout = resource.sessiontimeout;
		updateresource.learnratelimit = resource.learnratelimit;
		updateresource.sessionlifetime = resource.sessionlifetime;
		updateresource.sessioncookiename = resource.sessioncookiename;
		updateresource.clientiploggingheader = resource.clientiploggingheader;
		updateresource.importsizelimit = resource.importsizelimit;
		updateresource.signatureautoupdate = resource.signatureautoupdate;
		updateresource.signatureurl = resource.signatureurl;
		updateresource.cookiepostencryptprefix = resource.cookiepostencryptprefix;
		updateresource.logmalformedreq = resource.logmalformedreq;
		updateresource.ceflogging = resource.ceflogging;
		updateresource.entitydecoding = resource.entitydecoding;
		updateresource.useconfigurablesecretkey = resource.useconfigurablesecretkey;
		return updateresource.update_resource(client);
	}
1067834
@Override
    public void updateContentProperties(String spaceID,
                                        String contentID,
                                        String contentMimeType,
                                        Map<String, String> userProperties,
                                        String storeID)
        throws ResourceException {

        validateProperties(userProperties, "update properties for content", spaceID, contentID);

        try {

            StorageProvider storage =
                storageProviderFactory.getStorageProvider(storeID);

            // Update content properties
            if (userProperties != null) {
                storage.setContentProperties(spaceID, contentID, userProperties);
            }
        } catch (NotFoundException e) {
            throw new ResourceNotFoundException("update properties for content",
                                                spaceID,
                                                contentID,
                                                e);
        } catch (StorageStateException e) {
            throw new ResourceStateException("update properties for content",
                                             spaceID,
                                             contentID,
                                             e);
        } catch (Exception e) {
            storageProviderFactory.expireStorageProvider(storeID);
            throw new ResourceException("update properties for content",
                                        spaceID,
                                        contentID,
                                        e);
        }
    }
180632
private boolean writeLockAvailable(int type) {
        if (mReadLocks == 0 && mWriteLockHeld == null) {
            return (type == UPGRADABLE) ? true : mUpgradableLockHeld == null;
        }
        return false;
    }
921728
func (s *GetAppLaunchConfigurationInput) SetAppId(v string) *GetAppLaunchConfigurationInput {
	s.AppId = &v
	return s
}
1259742
public int writeAndRefresh()
    {
        try   {
            if (m_recordToUpdate != null)
                if (m_recordToUpdate.isModified(true))
            {
                if (m_bRefreshAfterUpdate)
                    m_recordToUpdate.writeAndRefresh();
                else
                {
                    if (m_recordToUpdate.getEditMode() == Constants.EDIT_IN_PROGRESS)
                        m_recordToUpdate.set();
                    else if (m_recordToUpdate.getEditMode() == Constants.EDIT_ADD)
                        m_recordToUpdate.add();
                }
            }
            if (fieldToUpdate != null)
            {
                fieldToUpdate.setModified(true);
                //?result = fieldToUpdate.getRecord().handleRecordChange(m_fldTarget, DBConstants.FIELD_CHANGED_TYPE, bDisplayOption);    // Tell table that I'm getting changed (if not locked)
            }
        } catch(DBException ex)   {
            ex.printStackTrace();
        }
        return DBConstants.NORMAL_RETURN;   // For now
    }
1002869
@Override
    public boolean afterUpdate(Object key, Object value, Object currentVersion, Object previousVersion, SoftLock lock) throws CacheException {
        log.debug("region access strategy nonstrict-read-write entity afterUpdate() {} {}", getInternalRegion().getCacheNamespace(), key);
        getInternalRegion().evict(key);
        return false;
    }
1240534
public void setCapacityReservationIds(java.util.Collection<String> capacityReservationIds) {
        if (capacityReservationIds == null) {
            this.capacityReservationIds = null;
            return;
        }

        this.capacityReservationIds = new com.amazonaws.internal.SdkInternalList<String>(capacityReservationIds);
    }
735219
public Observable<PublishSettings> getPublishSettingsAsync(UUID appId) {
        return getPublishSettingsWithServiceResponseAsync(appId).map(new Func1<ServiceResponse<PublishSettings>, PublishSettings>() {
            @Override
            public PublishSettings call(ServiceResponse<PublishSettings> response) {
                return response.body();
            }
        });
    }
566747
func (s *DeleteJobInput) SetAppId(v string) *DeleteJobInput {
	s.AppId = &v
	return s
}
556237
@SuppressWarnings("unchecked")
  private void resize(int cap) {
    int newCapacity = computeCapacity(cap);
    if (newCapacity == this.capacity) {
      return;
    }
    this.capacity = newCapacity;
    this.expandThreshold = (int) (capacity * maxLoadFactor);
    this.shrinkThreshold = (int) (capacity * minLoadFactor);
    this.hash_mask = capacity - 1;
    LinkedElement<T>[] temp = entries;
    entries = new LinkedElement[capacity];
    for (int i = 0; i < temp.length; i++) {
      LinkedElement<T> curr = temp[i];
      while (curr != null) {
        LinkedElement<T> next = curr.next;
        int index = getIndex(curr.hashCode);
        curr.next = entries[index];
        entries[index] = curr;
        curr = next;
      }
    }
  }
424113
public void updateCapacityBytes(Map<String, Long> capacityBytesOnTiers) {
    mCapacityBytes = 0;
    mTotalBytesOnTiers = capacityBytesOnTiers;
    for (long t : mTotalBytesOnTiers.values()) {
      mCapacityBytes += t;
    }
  }