/** * Constructs a new DescribeTableRequest object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param tableName * The name of the table to describe. */ public DescribeTableRequest(String tableName) { setTableName(tableName); }
/** * <p> * The name of the table to describe. * </p> * * @param tableName * The name of the table to describe. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTableRequest withTableName(String tableName) { setTableName(tableName); return this; }
/** * Constructs a new DescribeTableRequest object. Callers should use the * setter or fluent setter (with...) methods to initialize any additional * object members. * * @param tableName <p> * The name of the table to describe. * </p> */ public DescribeTableRequest(String tableName) { setTableName(tableName); }
throws AmazonServiceException, AmazonClientException { DescribeTableRequest describeTableRequest = new DescribeTableRequest(); describeTableRequest.setTableName(tableName); return describeTable(describeTableRequest);
/** * Constructs a new DescribeTableRequest object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param tableName * The name of the table to describe. */ public DescribeTableRequest(String tableName) { setTableName(tableName); }
/** * <p> * The name of the table to describe. * </p> * * @param tableName * The name of the table to describe. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTableRequest withTableName(String tableName) { setTableName(tableName); return this; }
private TableStatus tableStatus(String tableName) { DescribeTableRequest request = new DescribeTableRequest(); request.setTableName(tableName); try { DescribeTableResult result = amazonDynamoDB.describeTable(request); TableStatus tableStatus = TableStatus.fromValue(result.getTable().getTableStatus()); logger.debug("table status {} ", tableStatus); return tableStatus; } catch (ResourceNotFoundException e) { logger.debug("ResourceNotFound is TableName {}", tableName); return null; } catch (AmazonClientException e) { logger.error("Unknown error ", e); throw new IllegalStateException("Unknown Exception", e); } }
private TableStatus tableStatus() throws DependencyException { DescribeTableRequest request = new DescribeTableRequest(); request.setTableName(table); DescribeTableResult result; try { result = dynamoDBClient.describeTable(request); } catch (ResourceNotFoundException e) { if (LOG.isDebugEnabled()) { LOG.debug(String.format("Got ResourceNotFoundException for table %s in leaseTableExists, returning false.", table)); } return null; } catch (AmazonClientException e) { throw new DependencyException(e); } TableStatus tableStatus = TableStatus.fromValue(result.getTable().getTableStatus()); if (LOG.isDebugEnabled()) { LOG.debug("Lease table exists and is in status " + tableStatus); } return tableStatus; }