Skip to content

Commit

Permalink
Merge pull request #630 from hector-client/thrykol
Browse files Browse the repository at this point in the history
Added peek to iterator.  Allow setting ttl on composite updaters
  • Loading branch information
thrykol committed May 19, 2014
2 parents 0c760d9 + 5a17465 commit da4187c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ public void remove() {
iterator.remove();
}

public HColumn<N, V> peek() {
if(hasNext()){
return iterator.peek();
}

return null;
}

private void refresh() {
query.setRange(start, finish.function(), reversed, count);
columns = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,17 @@ public <V> void setComposite(N columnName, Composite composite) {
addInsertion(columnName, composite, CompositeSerializer.get(), globalTtl);
}

public <V> void setComposite(N columnName, Composite composite, int ttl) {
addInsertion(columnName, composite, CompositeSerializer.get(), ttl);
}

public <V> void setDynamicComposite(N columnName, DynamicComposite composite) {
addInsertion(columnName, composite, DynamicCompositeSerializer.get(), globalTtl);
}

public <V> void setDynamicComposite(N columnName, DynamicComposite composite, int ttl) {
addInsertion(columnName, composite, DynamicCompositeSerializer.get(), ttl);
}

public <V> void setValue(N columnName, V value, Serializer<V> serializer) {
addInsertion(columnName, value, serializer, globalTtl);
Expand Down

0 comments on commit da4187c

Please sign in to comment.