public TimeToLiveSpecification unmarshall(JsonUnmarshallerContext context) throws Exception { TimeToLiveSpecification timeToLiveSpecification = new TimeToLiveSpecification();
public TimeToLiveSpecification unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } TimeToLiveSpecification timeToLiveSpecification = new TimeToLiveSpecification(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Enabled")) { timeToLiveSpecification.setEnabled(BooleanJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("AttributeName")) { timeToLiveSpecification.setAttributeName(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return timeToLiveSpecification; }
private void updateTimeToLiveIfAny() { if (this.timeToLive != null) { UpdateTimeToLiveRequest updateTimeToLiveRequest = new UpdateTimeToLiveRequest() .withTableName(this.table.getTableName()) .withTimeToLiveSpecification( new TimeToLiveSpecification() .withAttributeName(TTL) .withEnabled(this.timeToLive > 0)); try { this.dynamoDB.updateTimeToLive(updateTimeToLiveRequest); } catch (AmazonDynamoDBException e) { if (logger.isWarnEnabled()) { logger.warn("The error during 'updateTimeToLive' request", e); } } } }
private void updateTimeToLiveIfAny() { if (this.timeToLive != null) { UpdateTimeToLiveRequest updateTimeToLiveRequest = new UpdateTimeToLiveRequest() .withTableName(this.table.getTableName()) .withTimeToLiveSpecification( new TimeToLiveSpecification() .withAttributeName(TTL) .withEnabled(this.timeToLive > 0)); try { this.dynamoDB.updateTimeToLive(updateTimeToLiveRequest); } catch (AmazonDynamoDBException e) { if (logger.isWarnEnabled()) { logger.warn("The error during 'updateTimeToLive' request", e); } } } }
public TimeToLiveSpecification unmarshall(JsonUnmarshallerContext context) throws Exception { TimeToLiveSpecification timeToLiveSpecification = new TimeToLiveSpecification();