/** * The update condition which, if specified, determines whether the specified attributes will be updated or not. The * update condition must be satisfied in order for this request to be processed and the attributes to be updated. * * @param expected * The update condition which, if specified, determines whether the specified attributes will be updated or * not. The update condition must be satisfied in order for this request to be processed and the attributes * to be updated. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAttributesRequest withExpected(UpdateCondition expected) { setExpected(expected); return this; }
/** * Constructs a new PutAttributesRequest object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param domainName * The name of the domain in which to perform the operation. * @param itemName * The name of the item. * @param attributes * The list of attributes. * @param expected * The update condition which, if specified, determines whether the specified attributes will be updated or * not. The update condition must be satisfied in order for this request to be processed and the attributes * to be updated. */ public PutAttributesRequest(String domainName, String itemName, java.util.List<ReplaceableAttribute> attributes, UpdateCondition expected) { setDomainName(domainName); setItemName(itemName); setAttributes(attributes); setExpected(expected); }
/** * Register a new instance. Registration will fail if a prior entry exists * * @param instance Instance entry to be registered. * @throws AmazonServiceException If unable to write to Simple DB because of any error. */ public void registerInstance(PriamInstance instance) throws AmazonServiceException { AmazonSimpleDB simpleDBClient = getSimpleDBClient(); PutAttributesRequest putReq = new PutAttributesRequest( DOMAIN, getKey(instance), createAttributesToRegister(instance)); UpdateCondition expected = new UpdateCondition(); expected.setName(Attributes.INSTANCE_ID); expected.setExists(false); putReq.setExpected(expected); simpleDBClient.putAttributes(putReq); }
/** * Constructs a new PutAttributesRequest object. * Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param domainName The name of the domain in which to perform the * operation. * @param itemName The name of the item. * @param attributes The list of attributes. * @param expected The update condition which, if specified, determines * whether the specified attributes will be updated or not. The update * condition must be satisfied in order for this request to be processed * and the attributes to be updated. */ public PutAttributesRequest(String domainName, String itemName, java.util.List<ReplaceableAttribute> attributes, UpdateCondition expected) { setDomainName(domainName); setItemName(itemName); setAttributes(attributes); setExpected(expected); }
/** * The update condition which, if specified, determines whether the specified attributes will be updated or not. The * update condition must be satisfied in order for this request to be processed and the attributes to be updated. * * @param expected * The update condition which, if specified, determines whether the specified attributes will be updated or * not. The update condition must be satisfied in order for this request to be processed and the attributes * to be updated. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAttributesRequest withExpected(UpdateCondition expected) { setExpected(expected); return this; }
/** * Constructs a new PutAttributesRequest object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param domainName * The name of the domain in which to perform the operation. * @param itemName * The name of the item. * @param attributes * The list of attributes. * @param expected * The update condition which, if specified, determines whether the specified attributes will be updated or * not. The update condition must be satisfied in order for this request to be processed and the attributes * to be updated. */ public PutAttributesRequest(String domainName, String itemName, java.util.List<ReplaceableAttribute> attributes, UpdateCondition expected) { setDomainName(domainName); setItemName(itemName); setAttributes(attributes); setExpected(expected); }