private Index doCreateGSI( CreateGlobalSecondaryIndexAction create, AttributeDefinition ... keyDefinitions) { UpdateTableSpec spec = new UpdateTableSpec() .withAttributeDefinitions(keyDefinitions) .withGlobalSecondaryIndexUpdates( new GlobalSecondaryIndexUpdate().withCreate(create)) ; updateTable(spec); return this.getIndex(create.getIndexName()); }
public UpdateTableSpec withGlobalSecondaryIndexUpdates( Collection<GlobalSecondaryIndexUpdate> globalSecondaryIndexUpdates) { getRequest().withGlobalSecondaryIndexUpdates( globalSecondaryIndexUpdates); return this; } }
return updateTable(new UpdateTableSpec() .withProvisionedThroughput(provisionedThroughput));
/** * Deletes this global secondary index (GSI) from the DynamoDB table. * Involves network calls. * <p> * This index must be a global secondary index and in the * <code>ACTIVE</code> state for this operation to succeed. Deleting a GSI * is an asynchronous operation; while executing the operation, the index is * in the <code>DELETING</code> state. * * @return the updated table description returned from DynamoDB. */ public TableDescription deleteGSI() { return table.updateTable(new UpdateTableSpec() .withGlobalSecondaryIndexUpdates( new GlobalSecondaryIndexUpdate().withDelete( new DeleteGlobalSecondaryIndexAction() .withIndexName(indexName)))); }
return table.updateTable(new UpdateTableSpec() .withGlobalSecondaryIndexUpdates( new GlobalSecondaryIndexUpdate().withUpdate( new UpdateGlobalSecondaryIndexAction()
private Index doCreateGSI( CreateGlobalSecondaryIndexAction create, AttributeDefinition ... keyDefinitions) { UpdateTableSpec spec = new UpdateTableSpec() .withAttributeDefinitions(keyDefinitions) .withGlobalSecondaryIndexUpdates( new GlobalSecondaryIndexUpdate().withCreate(create)) ; updateTable(spec); return this.getIndex(create.getIndexName()); }
public UpdateTableSpec withProvisionedThroughput( ProvisionedThroughput provisionedThroughput) { getRequest().setProvisionedThroughput(provisionedThroughput); return this; }
/** * Deletes this global secondary index (GSI) from the DynamoDB table. * Involves network calls. * <p> * This index must be a global secondary index and in the * <code>ACTIVE</code> state for this operation to succeed. Deleting a GSI * is an asynchronous operation; while executing the operation, the index is * in the <code>DELETING</code> state. * * @return the updated table description returned from DynamoDB. */ public TableDescription deleteGSI() { return table.updateTable(new UpdateTableSpec() .withGlobalSecondaryIndexUpdates( new GlobalSecondaryIndexUpdate().withDelete( new DeleteGlobalSecondaryIndexAction() .withIndexName(indexName)))); }
return updateTable(new UpdateTableSpec() .withProvisionedThroughput(provisionedThroughput));
public UpdateTableSpec withAttributeDefinitions( Collection<AttributeDefinition> attributeDefinitions) { getRequest().withAttributeDefinitions(attributeDefinitions); return this; }
return table.updateTable(new UpdateTableSpec() .withGlobalSecondaryIndexUpdates( new GlobalSecondaryIndexUpdate().withUpdate( new UpdateGlobalSecondaryIndexAction()
public UpdateTableSpec withAttributeDefinitions( AttributeDefinition... attributeDefinitions) { getRequest().withAttributeDefinitions(attributeDefinitions); return this; }
public UpdateTableSpec withGlobalSecondaryIndexUpdates( GlobalSecondaryIndexUpdate... globalSecondaryIndexUpdates) { getRequest().withGlobalSecondaryIndexUpdates( globalSecondaryIndexUpdates); return this; }
public List<AttributeDefinition> getAttributeDefinitions() { return getRequest().getAttributeDefinitions(); }
public ProvisionedThroughput getProvisionedThroughput() { return getRequest().getProvisionedThroughput(); }
UpdateTableRequest req = spec.getRequest(); req.setTableName(getTableName()); UpdateTableResult result = client.updateTable(req);
public UpdateTableSpec withAttributeDefinitions( Collection<AttributeDefinition> attributeDefinitions) { getRequest().withAttributeDefinitions(attributeDefinitions); return this; }
public UpdateTableSpec withAttributeDefinitions( AttributeDefinition... attributeDefinitions) { getRequest().withAttributeDefinitions(attributeDefinitions); return this; }
public UpdateTableSpec withProvisionedThroughput( ProvisionedThroughput provisionedThroughput) { getRequest().setProvisionedThroughput(provisionedThroughput); return this; }
public List<AttributeDefinition> getAttributeDefinitions() { return getRequest().getAttributeDefinitions(); }