Reader small image

You're reading from  DynamoDB Applied Design Patterns

Product typeBook
Published inSep 2014
Publisher
ISBN-139781783551897
Edition1st Edition
Right arrow

Java SDK operations


There are eight user-defined private functions that are being invoked in the following code. We will see each and every function in detail:

public class AwsSdkDemo {

  static AmazonDynamoDBClient client;
  public static void main(String[] args) {
    try {

      initializeCredentials();
      String tableName = "Tbl_Book";

      if (Tables.doesTableExist(client, tableName)) {
        System.out.println("Table " + tableName + " already EXISTS");
      } 
      else {
        ArrayList<AttributeDefinition> attributeDefinitions = getTableAttributes();
        ArrayList<KeySchemaElement> keySchemaElements = getTableKeySchema();
        LocalSecondaryIndex localSecondaryIndex = getLocalSecondaryIndex();
        ArrayList<LocalSecondaryIndex> localSecondaryIndexes = newArrayList<LocalSecondaryIndex>();
        localSecondaryIndexes.add(localSecondaryIndex);
        GlobalSecondaryIndex globalSecondaryIndex = getGlobalSecondaryIndex();
        ProvisionedThroughput...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
DynamoDB Applied Design Patterns
Published in: Sep 2014Publisher: ISBN-13: 9781783551897