Package com.amazonaws.services.dynamodb.model

Examples of com.amazonaws.services.dynamodb.model.ProvisionedThroughputDescription


                    .withTableName(tableName)
                    .withTableStatus(TableStatus.ACTIVE)
                    .withCreationDateTime(new Date(NOW))
                    .withItemCount(100L)
                    .withKeySchema(new KeySchema(new KeySchemaElement().withAttributeName("name")))
                    .withProvisionedThroughput(new ProvisionedThroughputDescription()
                            .withReadCapacityUnits(20L)
                            .withWriteCapacityUnits(10L))
                    .withTableSizeBytes(1000L));
        }
        throw new ResourceNotFoundException(tableName + " is missing");
View Full Code Here


    @Override
    public DeleteTableResult deleteTable(DeleteTableRequest deleteTableRequest) {
        this.deleteTableRequest = deleteTableRequest;
        return new DeleteTableResult().withTableDescription(new TableDescription()
                .withProvisionedThroughput(new ProvisionedThroughputDescription())
                .withTableName(deleteTableRequest.getTableName())
                .withCreationDateTime(new Date(NOW))
                .withItemCount(10L)
                .withKeySchema(new KeySchema())
                .withTableSizeBytes(20L)
View Full Code Here

    @Test
    public void testExecute() {
        command.execute();
       
        assertEquals("DOMAIN1", ddbClient.deleteTableRequest.getTableName());
        assertEquals(new ProvisionedThroughputDescription(), exchange.getIn().getHeader(
                DdbConstants.PROVISIONED_THROUGHPUT));
        assertEquals(new Date(AmazonDDBClientMock.NOW), exchange.getIn().getHeader(DdbConstants.CREATION_DATE,
                Date.class));
        assertEquals(Long.valueOf(10L), exchange.getIn().getHeader(DdbConstants.ITEM_COUNT, Long.class));
        assertEquals(new KeySchema(), exchange.getIn().getHeader(DdbConstants.KEY_SCHEMA, KeySchema.class));
View Full Code Here

                );
            }
        }

        com.amazonaws.services.dynamodbv2.model.ProvisionedThroughputDescription v2ThruPut = null;
        ProvisionedThroughputDescription v1ThruPut = table.getProvisionedThroughput();
        if (v1ThruPut != null) {
            v2ThruPut =
                new com.amazonaws.services.dynamodbv2.model.ProvisionedThroughputDescription()
                    .withReadCapacityUnits(v1ThruPut.getReadCapacityUnits())
                    .withWriteCapacityUnits(v1ThruPut.getWriteCapacityUnits())
                    .withLastDecreaseDateTime(v1ThruPut.getLastDecreaseDateTime())
                    .withLastIncreaseDateTime(v1ThruPut.getLastIncreaseDateTime())
                    ;
        }

        com.amazonaws.services.dynamodbv2.model.TableDescription v2Table =
            new com.amazonaws.services.dynamodbv2.model.TableDescription()
View Full Code Here

  public ProvisionedThroughputDescription getProvisionedThroughputDescription() {
    return throughputDescription;
  }

  public void setProvisionedThroughput(ProvisionedThroughput throughput) {
    ProvisionedThroughputDescription desc = new ProvisionedThroughputDescription();
    desc.setReadCapacityUnits(throughput.getReadCapacityUnits());
    desc.setWriteCapacityUnits(throughput.getWriteCapacityUnits());
    ProvisionedThroughputDescription oldThroughput = getProvisionedThroughputDescription();
    if (oldThroughput != null) {
      if (throughput.getReadCapacityUnits() > oldThroughput.getReadCapacityUnits() || throughput.getWriteCapacityUnits() > oldThroughput.getWriteCapacityUnits()) {
        lastIncreaseDateTime = new Date();
      }
      if (throughput.getReadCapacityUnits() > oldThroughput.getReadCapacityUnits() || throughput.getWriteCapacityUnits() > oldThroughput.getWriteCapacityUnits()) {
        lastDecreaseDateTime = new Date();
      }
    }
    desc.setLastIncreaseDateTime(lastIncreaseDateTime);
    desc.setLastDecreaseDateTime(lastDecreaseDateTime);
View Full Code Here

            jsonWriter.endObject();
          }
          jsonWriter.endObject();
        }

        ProvisionedThroughputDescription provisionedThroughput = table.getProvisionedThroughput();
        if (provisionedThroughput != null) {
          jsonWriter.key("ProvisionedThroughput").object();
          if (provisionedThroughput.getReadCapacityUnits() != null) {
            jsonWriter.key("ReadCapacityUnits").value(provisionedThroughput.getReadCapacityUnits());
          }
          if (provisionedThroughput.getWriteCapacityUnits() != null) {
            jsonWriter.key("WriteCapacityUnits").value(provisionedThroughput.getWriteCapacityUnits());
          }
          if (provisionedThroughput.getLastDecreaseDateTime() != null) {
            jsonWriter.key("LastDecreaseDateTime").value(provisionedThroughput.getLastDecreaseDateTime());
          }
          if (provisionedThroughput.getLastIncreaseDateTime() != null) {
            jsonWriter.key("LastIncreaseDateTime").value(provisionedThroughput.getLastIncreaseDateTime());
          }
          jsonWriter.endObject();
        }

        jsonWriter.endObject();
View Full Code Here

            jsonWriter.endObject();
          }
          jsonWriter.endObject();
        }

        ProvisionedThroughputDescription provisionedThroughput = table.getProvisionedThroughput();
        if (provisionedThroughput != null) {
          jsonWriter.key("ProvisionedThroughput").object();
          if (provisionedThroughput.getReadCapacityUnits() != null) {
            jsonWriter.key("ReadCapacityUnits").value(provisionedThroughput.getReadCapacityUnits());
          }
          if (provisionedThroughput.getWriteCapacityUnits() != null) {
            jsonWriter.key("WriteCapacityUnits").value(provisionedThroughput.getWriteCapacityUnits());
          }
          if (provisionedThroughput.getLastDecreaseDateTime() != null) {
            jsonWriter.key("LastDecreaseDateTime").value(provisionedThroughput.getLastDecreaseDateTime());
          }
          if (provisionedThroughput.getLastIncreaseDateTime() != null) {
            jsonWriter.key("LastIncreaseDateTime").value(provisionedThroughput.getLastIncreaseDateTime());
          }
          jsonWriter.endObject();
        }

        jsonWriter.endObject();
View Full Code Here

            jsonWriter.endObject();
          }
          jsonWriter.endObject();
        }

        ProvisionedThroughputDescription provisionedThroughput = table.getProvisionedThroughput();
        if (provisionedThroughput != null) {
          jsonWriter.key("ProvisionedThroughput").object();
          if (provisionedThroughput.getReadCapacityUnits() != null) {
            jsonWriter.key("ReadCapacityUnits").value(provisionedThroughput.getReadCapacityUnits());
          }
          if (provisionedThroughput.getWriteCapacityUnits() != null) {
            jsonWriter.key("WriteCapacityUnits").value(provisionedThroughput.getWriteCapacityUnits());
          }
          jsonWriter.endObject();
        }

        jsonWriter.endObject();
View Full Code Here

            }
            jsonWriter.endObject();
          }
          jsonWriter.endObject();
        }
        ProvisionedThroughputDescription provisionedThroughput = desc.getProvisionedThroughput();
        if (provisionedThroughput != null) {
          jsonWriter.key("ProvisionedThroughput").object();
          if (provisionedThroughput.getReadCapacityUnits() != null) {
            jsonWriter.key("ReadCapacityUnits").value(provisionedThroughput.getReadCapacityUnits());
          }
          if (provisionedThroughput.getWriteCapacityUnits() != null) {
            jsonWriter.key("WriteCapacityUnits").value(provisionedThroughput.getWriteCapacityUnits());
          }
          jsonWriter.endObject();
        }

        jsonWriter.endObject();
View Full Code Here

TOP

Related Classes of com.amazonaws.services.dynamodb.model.ProvisionedThroughputDescription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.