/** * With this attribute. * @param name Attribute name * @param value The value * @return AttributeUpdates */ public AttributeUpdates with(final String name, final AttributeValueUpdate value) { return new AttributeUpdates( this.attrs.with(String.format(Locale.ENGLISH, name), value) ); }
/** * With this attribute. * @param name Attribute name * @param value The value * @return AttributeUpdates */ public AttributeUpdates with(final String name, final AttributeValueUpdate value) { return new AttributeUpdates( this.attrs.with(String.format(Locale.ENGLISH, name), value) ); }
/** * With these AttributeUpdates. * @param map AttributeUpdates to add * @return AttributeUpdates */ public AttributeUpdates with(final Map<String, AttributeValueUpdate> map) { final ConcurrentMap<String, AttributeValueUpdate> attribs = new ConcurrentHashMap<String, AttributeValueUpdate>(map.size()); for (final Map.Entry<String, AttributeValueUpdate> entry : map.entrySet()) { attribs.put( String.format(Locale.ENGLISH, entry.getKey()), entry.getValue() ); } return new AttributeUpdates(this.attrs.with(attribs)); }
/** * With these AttributeUpdates. * @param map AttributeUpdates to add * @return AttributeUpdates */ public AttributeUpdates with(final Map<String, AttributeValueUpdate> map) { final ConcurrentMap<String, AttributeValueUpdate> attribs = new ConcurrentHashMap<String, AttributeValueUpdate>(map.size()); for (final Map.Entry<String, AttributeValueUpdate> entry : map.entrySet()) { attribs.put( String.format(Locale.ENGLISH, entry.getKey()), entry.getValue() ); } return new AttributeUpdates(this.attrs.with(attribs)); }
@Override public Map<String, AttributeValue> put(final String attr, final AttributeValueUpdate value) throws IOException { return this.put(new AttributeUpdates().with(attr, value)); }
@Override public Map<String, AttributeValue> put(final String attr, final AttributeValueUpdate value) throws IOException { return this.put(new AttributeUpdates().with(attr, value)); }
@Override public Map<String, AttributeValue> put( final Map<String, AttributeValueUpdate> attrs) throws IOException { final Map<String, AttributeValue> keys = new HashMap<String, AttributeValue>(0); for (final String attr : this.data.keys(this.table)) { keys.put(attr, this.attributes.get(attr)); } try { this.data.update( this.table, new Attributes(keys), new AttributeUpdates(attrs) ); } catch (final IOException ex) { throw new IllegalStateException(ex); } return Maps.transformValues( attrs, new Function<AttributeValueUpdate, AttributeValue>() { @Override public AttributeValue apply(final AttributeValueUpdate update) { return update.getValue(); } } ); }
@Override public Map<String, AttributeValue> put( final Map<String, AttributeValueUpdate> attrs) throws IOException { final Map<String, AttributeValue> keys = new HashMap<String, AttributeValue>(0); for (final String attr : this.data.keys(this.table)) { keys.put(attr, this.attributes.get(attr)); } try { this.data.update( this.table, new Attributes(keys), new AttributeUpdates(attrs) ); } catch (final IOException ex) { throw new IllegalStateException(ex); } return Maps.transformValues( attrs, new Function<AttributeValueUpdate, AttributeValue>() { @Override public AttributeValue apply(final AttributeValueUpdate update) { return update.getValue(); } } ); }
|| mean > mbefore && !reverse) { item.put( new AttributeUpdates() .with("artifact", metric.xpath("/index/@artifact").get(0)) .with(
new AttributeUpdates() .with( "pos", } else { before.put( new AttributeUpdates() .with( "neg", .next(); after.put( new AttributeUpdates() .with( "navg", final double neg = (double) Long.parseLong(fin.get("neg").getN()); fin.put( new AttributeUpdates().with( "avg", new DyNum(
if (!item.has(DefaultDynamo.SYSLOG)) { item.put( new AttributeUpdates().with( DefaultDynamo.SYSLOG, new AttributeValueUpdate() new AttributeUpdates().with( DefaultDynamo.BUCKET, new AttributeValueUpdate()