@Override public boolean hasException() { return operation.hasException(); }
@Override public SuperColumn getSuperColumn(final ByteBuffer key, final ColumnPath columnPath) throws HectorException { Operation<SuperColumn> op = new Operation<SuperColumn>(OperationType.READ, failoverPolicy, keyspaceName, credentials) { @Override public SuperColumn execute(Cassandra.Client cassandra) throws HectorException { ColumnOrSuperColumn cosc; try { cosc = cassandra.get(key, columnPath, getThriftCl(OperationType.READ)); } catch (NotFoundException e) { setException(xtrans.translate(e)); return null; } catch (Exception e) { throw xtrans.translate(e); } return cosc == null ? null : cosc.getSuper_column(); } }; operateWithFailover(op); if (op.hasException()) { throw op.getException(); } return op.getResult(); }
@Override public CounterColumn getCounter(final ByteBuffer key, final ColumnPath columnPath) throws HectorException { Operation<CounterColumn> op = new Operation<CounterColumn>(OperationType.READ, failoverPolicy, keyspaceName, credentials) { @Override public CounterColumn execute(Cassandra.Client cassandra) throws HectorException { ColumnOrSuperColumn cosc; try { cosc = cassandra.get(key, columnPath, getThriftCl(OperationType.READ)); } catch (NotFoundException e) { setException(xtrans.translate(e)); return null; } catch (Exception e) { throw xtrans.translate(e); } return cosc.getCounter_column(); } }; operateWithFailover(op); if (op.hasException()) { throw op.getException(); } return op.getResult(); }
@Override public Column getColumn(final ByteBuffer key, final ColumnPath columnPath) throws HectorException { // valideColumnPath(columnPath); Operation<Column> op = new Operation<Column>(OperationType.READ, failoverPolicy, keyspaceName, credentials) { @Override public Column execute(Cassandra.Client cassandra) throws HectorException { ColumnOrSuperColumn cosc; try { cosc = cassandra.get(key, columnPath, getThriftCl(OperationType.READ)); } catch (NotFoundException e) { setException(xtrans.translate(e)); return null; } catch (Exception e) { throw xtrans.translate(e); } return cosc == null ? null : cosc.getColumn(); } }; operateWithFailover(op); if (op.hasException()) { throw op.getException(); } return op.getResult(); }
@Override public boolean hasException() { return operation.hasException(); }
@Override public boolean hasException() { return operation.hasException(); }
@Override public CounterColumn getCounter(final ByteBuffer key, final ColumnPath columnPath) throws HectorException { Operation<CounterColumn> op = new Operation<CounterColumn>(OperationType.READ, failoverPolicy, keyspaceName, credentials) { @Override public CounterColumn execute(Cassandra.Client cassandra) throws HectorException { ColumnOrSuperColumn cosc; try { cosc = cassandra.get(key, columnPath, getThriftCl(OperationType.READ)); } catch (NotFoundException e) { setException(xtrans.translate(e)); return null; } catch (Exception e) { throw xtrans.translate(e); } return cosc.getCounter_column(); } }; operateWithFailover(op); if (op.hasException()) { throw op.getException(); } return op.getResult(); }
@Override public Column getColumn(final ByteBuffer key, final ColumnPath columnPath) throws HectorException { // valideColumnPath(columnPath); Operation<Column> op = new Operation<Column>(OperationType.READ, failoverPolicy, keyspaceName, credentials) { @Override public Column execute(Cassandra.Client cassandra) throws HectorException { ColumnOrSuperColumn cosc; try { cosc = cassandra.get(key, columnPath, getThriftCl(OperationType.READ)); } catch (NotFoundException e) { setException(xtrans.translate(e)); return null; } catch (Exception e) { throw xtrans.translate(e); } return cosc == null ? null : cosc.getColumn(); } }; operateWithFailover(op); if (op.hasException()) { throw op.getException(); } return op.getResult(); }
@Override public SuperColumn getSuperColumn(final ByteBuffer key, final ColumnPath columnPath) throws HectorException { Operation<SuperColumn> op = new Operation<SuperColumn>(OperationType.READ, failoverPolicy, keyspaceName, credentials) { @Override public SuperColumn execute(Cassandra.Client cassandra) throws HectorException { ColumnOrSuperColumn cosc; try { cosc = cassandra.get(key, columnPath, getThriftCl(OperationType.READ)); } catch (NotFoundException e) { setException(xtrans.translate(e)); return null; } catch (Exception e) { throw xtrans.translate(e); } return cosc == null ? null : cosc.getSuper_column(); } }; operateWithFailover(op); if (op.hasException()) { throw op.getException(); } return op.getResult(); }
@Override public SuperColumn getSuperColumn(final ByteBuffer key, final ColumnPath columnPath) throws HectorException { Operation<SuperColumn> op = new Operation<SuperColumn>(OperationType.READ, failoverPolicy, keyspaceName, credentials) { @Override public SuperColumn execute(Cassandra.Client cassandra) throws HectorException { ColumnOrSuperColumn cosc; try { cosc = cassandra.get(key, columnPath, getThriftCl(OperationType.READ)); } catch (NotFoundException e) { setException(xtrans.translate(e)); return null; } catch (Exception e) { throw xtrans.translate(e); } return cosc == null ? null : cosc.getSuper_column(); } }; operateWithFailover(op); if (op.hasException()) { throw op.getException(); } return op.getResult(); }
@Override public CounterColumn getCounter(final ByteBuffer key, final ColumnPath columnPath) throws HectorException { Operation<CounterColumn> op = new Operation<CounterColumn>(OperationType.READ, failoverPolicy, keyspaceName, credentials) { @Override public CounterColumn execute(Cassandra.Client cassandra) throws HectorException { ColumnOrSuperColumn cosc; try { cosc = cassandra.get(key, columnPath, getThriftCl(OperationType.READ)); } catch (NotFoundException e) { setException(xtrans.translate(e)); return null; } catch (Exception e) { throw xtrans.translate(e); } return cosc.getCounter_column(); } }; operateWithFailover(op); if (op.hasException()) { throw op.getException(); } return op.getResult(); }
@Override public Column getColumn(final ByteBuffer key, final ColumnPath columnPath) throws HectorException { // valideColumnPath(columnPath); Operation<Column> op = new Operation<Column>(OperationType.READ, failoverPolicy, keyspaceName, credentials) { @Override public Column execute(Cassandra.Client cassandra) throws HectorException { ColumnOrSuperColumn cosc; try { cosc = cassandra.get(key, columnPath, getThriftCl(OperationType.READ)); } catch (NotFoundException e) { setException(xtrans.translate(e)); return null; } catch (Exception e) { throw xtrans.translate(e); } return cosc == null ? null : cosc.getColumn(); } }; operateWithFailover(op); if (op.hasException()) { throw op.getException(); } return op.getResult(); }