private static ByteBuffer execute(Function fun, List<Term> parameters) throws InvalidRequestException { List<ByteBuffer> buffers = new ArrayList<ByteBuffer>(parameters.size()); for (Term t : parameters) { assert t instanceof Term.Terminal; buffers.add(((Term.Terminal)t).get(QueryOptions.DEFAULT)); } return executeInternal(fun, buffers); }
/** * Similar to bounds(), but returns one ByteBuffer per-component in the bound instead of a single * ByteBuffer to represent the entire bound. */ public List<ByteBuffer> componentBounds(Bound b, QueryOptions options) throws InvalidRequestException { Terminal terminal = bounds[b.idx].bind(options); if (terminal instanceof Tuples.Value) return ((Tuples.Value) terminal).getElements(); return Collections.singletonList(terminal.get(options)); } }
public ByteBuffer bindAndGet(QueryOptions options) throws InvalidRequestException { Terminal t = bind(options); return t == null ? null : t.get(options.getProtocolVersion()); } }
public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException { assert column.type.isMultiCell() : "Attempted to delete a single key in a frozen map"; Term.Terminal key = t.bind(params.options); if (key == null) throw new InvalidRequestException("Invalid null map key"); if (key == Constants.UNSET_VALUE) throw new InvalidRequestException("Invalid unset map key"); params.addTombstone(column, CellPath.create(key.get(params.options.getProtocolVersion()))); } }
public ByteBuffer bindAndGet(QueryOptions options) throws InvalidRequestException { Terminal t = bind(options); return t == null ? null : t.get(options); } }
public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException { assert column.type.isMultiCell() : "Attempted to delete a single key in a frozen map"; Term.Terminal key = t.bind(params.options); if (key == null) throw new InvalidRequestException("Invalid null map key"); if (key == Constants.UNSET_VALUE) throw new InvalidRequestException("Invalid unset map key"); params.addTombstone(column, CellPath.create(key.get(params.options.getProtocolVersion()))); } }
public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException { assert column.type.isMultiCell() : "Attempted to delete a single element in a frozen set"; Term.Terminal elt = t.bind(params.options); if (elt == null) throw new InvalidRequestException("Invalid null set element"); params.addTombstone(column, CellPath.create(elt.get(params.options.getProtocolVersion()))); } }
public void execute(ByteBuffer rowKey, ColumnFamily cf, Composite prefix, UpdateParameters params) throws InvalidRequestException { assert column.type.isMultiCell() : "Attempted to delete a single element in a frozen set"; Term.Terminal elt = t.bind(params.options); if (elt == null) throw new InvalidRequestException("Invalid null set element"); CellName cellName = cf.getComparator().create(prefix, column, elt.get(params.options)); cf.addColumn(params.makeTombstone(cellName)); } }
public ByteBuffer bindAndGet(QueryOptions options) throws InvalidRequestException { Terminal t = bind(options); return t == null ? null : t.get(options.getProtocolVersion()); } }
public ByteBuffer bindAndGet(QueryOptions options) throws InvalidRequestException { return get(options.getProtocolVersion()); } }
public ByteBuffer bindAndGet(QueryOptions options) throws InvalidRequestException { return get(options.getProtocolVersion()); } }
public ByteBuffer bindAndGet(QueryOptions options) throws InvalidRequestException { return get(options.getProtocolVersion()); } }
public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException { assert column.type.isMultiCell() : "Attempted to delete a single element in a frozen set"; Term.Terminal elt = t.bind(params.options); if (elt == null) throw new InvalidRequestException("Invalid null set element"); params.addTombstone(column, CellPath.create(elt.get(params.options.getProtocolVersion()))); } }
public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException { assert column.type.isMultiCell() : "Attempted to delete a single element in a frozen set"; Term.Terminal elt = t.bind(params.options); if (elt == null) throw new InvalidRequestException("Invalid null set element"); params.addTombstone(column, CellPath.create(elt.get(params.options.getProtocolVersion()))); } }
public ByteBuffer bindAndGet(QueryOptions options) throws InvalidRequestException { return get(options); } }
public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException { assert column.type.isMultiCell() : "Attempted to delete a single element in a frozen set"; Term.Terminal elt = t.bind(params.options); if (elt == null) throw new InvalidRequestException("Invalid null set element"); params.addTombstone(column, CellPath.create(elt.get(params.options.getProtocolVersion()))); } }
public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException { assert column.type.isMultiCell() : "Attempted to delete a single key in a frozen map"; Term.Terminal key = t.bind(params.options); if (key == null) throw new InvalidRequestException("Invalid null map key"); if (key == Constants.UNSET_VALUE) throw new InvalidRequestException("Invalid unset map key"); params.addTombstone(column, CellPath.create(key.get(params.options.getProtocolVersion()))); } }
public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException { assert column.type.isMultiCell() : "Attempted to delete a single key in a frozen map"; Term.Terminal key = t.bind(params.options); if (key == null) throw new InvalidRequestException("Invalid null map key"); if (key == Constants.UNSET_VALUE) throw new InvalidRequestException("Invalid unset map key"); params.addTombstone(column, CellPath.create(key.get(params.options.getProtocolVersion()))); } }
public ByteBuffer bindAndGet(QueryOptions options) throws InvalidRequestException { Terminal t = bind(options); return t == null ? null : t.get(options.getProtocolVersion()); } }
public ByteBuffer bindAndGet(QueryOptions options) throws InvalidRequestException { Terminal t = bind(options); return t == null ? null : t.get(options.getProtocolVersion()); } }