Package com.netflix.astyanax

Examples of com.netflix.astyanax.Keyspace


    } catch (ConnectionException e) {
      throw new RuntimeException(e);
    }
  }
  public void sendChangesImpl(List<Action> actions, MetaLookup ormSession) throws ConnectionException {
    Keyspace keyspace = columnFamilies.getKeyspace();
    MutationBatch m = keyspace.prepareMutationBatch();
    //MutationBatch m = m1.setConsistencyLevel(ConsistencyLevel.CL_QUORUM);
   
    for(Action action : actions) {
      if(action instanceof Persist) {
        persist((Persist)action, ormSession, m);
View Full Code Here


        //ALSO, we don't want this code to be the case if we are doing a CursorToMany which has to use an index
        //so check the column type
        if(!info.getEntityColFamily().isVirtualCf() && from == null && to == null
                && !(info.getColumnName() instanceof DboColumnToManyMeta)
                && !info.getEntityColFamily().isInheritance()) {
            Keyspace keyspace = columnFamilies.getKeyspace();
            Info cfInfo = columnFamilies.lookupOrCreate2(info.getEntityColFamily().getRealColumnFamily(), mgr);
            ScanCassandraCf scanner = new ScanCassandraCf(info, cfInfo, bListener, batchSize, keyspace);
            scanner.beforeFirst();
            return scanner;
        }
View Full Code Here

  }
 
  private RowQuery createBasicRowQuery(byte[] rowKey, Info info1, ByteBufferRange range) {
    ColumnFamily cf = info1.getColumnFamilyObj();
   
    Keyspace keyspace = columnFamilies.getKeyspace();
    ColumnFamilyQuery query = keyspace.prepareQuery(cf);
    //ColumnFamilyQuery query = query1.setConsistencyLevel(ConsistencyLevel.CL_QUORUM);
    RowQuery rowQuery = query.getKey(rowKey)
              .autoPaginate(true)
              .withColumnRange(range);
    return rowQuery;
View Full Code Here

    columnFamilies.lookupOrCreate2(colFamily, ormSession);
  }

  @Override
  public AbstractCursor<Row> allRows(DboTableMeta colFamily, MetaLookup mgr, int batchSize) {
    Keyspace keyspace = columnFamilies.getKeyspace();
    Info cfInfo = columnFamilies.lookupOrCreate2(colFamily.getColumnFamily(), mgr);
    ScanCassandraCfAllRows scanner = new ScanCassandraCfAllRows(cfInfo, batchSize, keyspace, rowProvider);
    scanner.beforeFirst();
    return scanner;
  }
View Full Code Here

    ColumnType type = info.getColumnType();
    if(type != ColumnType.ANY_EXCEPT_COMPOSITE) {
      throw new UnsupportedOperationException("Finding on composite type="+colFamily+" not allowed here, you should be using column slice as these rows are HUGE!!!!");
    }
   
    Keyspace keyspace = columnFamilies.getKeyspace();
    CursorKeysToRows2 cursor = new CursorKeysToRows2(rowKeys, batchSize, list, rowProvider);
    cursor.setupMore(keyspace, colFamily, info, cache);
    return cursor;
  }
View Full Code Here

    } catch (ConnectionException e) {
      throw new RuntimeException(e);
    }
  }
  public void sendChangesImpl(List<Action> actions, MetaLookup ormSession) throws ConnectionException {
    Keyspace keyspace = columnFamilies.getKeyspace();
    MutationBatch m = keyspace.prepareMutationBatch();
    //MutationBatch m = m1.setConsistencyLevel(ConsistencyLevel.CL_QUORUM);
   
    for(Action action : actions) {
      if(action instanceof Persist) {
        persist((Persist)action, ormSession, m);
View Full Code Here

  }
 
  private RowQuery createBasicRowQuery(byte[] rowKey, Info info1, ByteBufferRange range) {
    ColumnFamily cf = info1.getColumnFamilyObj();
   
    Keyspace keyspace = columnFamilies.getKeyspace();
    ColumnFamilyQuery query = keyspace.prepareQuery(cf);
    //ColumnFamilyQuery query = query1.setConsistencyLevel(ConsistencyLevel.CL_QUORUM);
    RowQuery rowQuery = query.getKey(rowKey)
              .autoPaginate(true)
              .withColumnRange(range);
    return rowQuery;
View Full Code Here

    ColumnType type = info.getColumnType();
    if(type != ColumnType.ANY_EXCEPT_COMPOSITE) {
      throw new UnsupportedOperationException("Finding on composite type="+colFamily+" not allowed here, you should be using column slice as these rows are HUGE!!!!");
    }
   
    Keyspace keyspace = columnFamilies.getKeyspace();
    CursorKeysToRows cursor = new CursorKeysToRows(rowKeys, batchSize, list, rowProvider);
    cursor.setupMore(keyspace, colFamily, info, cache);
    return cursor;
  }
View Full Code Here

    } catch (ConnectionException e) {
      throw new RuntimeException(e);
    }
  }
  public void sendChangesImpl(List<Action> actions, MetaLookup ormSession) throws ConnectionException {
    Keyspace keyspace = columnFamilies.getKeyspace();
    MutationBatch m = keyspace.prepareMutationBatch();
    //MutationBatch m = m1.setConsistencyLevel(ConsistencyLevel.CL_QUORUM);
   
    for(Action action : actions) {
      if(action instanceof Persist) {
        persist((Persist)action, ormSession, m);
View Full Code Here

  }
 
  private RowQuery createBasicRowQuery(byte[] rowKey, Info info1, ByteBufferRange range) {
    ColumnFamily cf = info1.getColumnFamilyObj();
   
    Keyspace keyspace = columnFamilies.getKeyspace();
    ColumnFamilyQuery query = keyspace.prepareQuery(cf);
    //ColumnFamilyQuery query = query1.setConsistencyLevel(ConsistencyLevel.CL_QUORUM);
    RowQuery rowQuery = query.getKey(rowKey)
              .autoPaginate(true)
              .withColumnRange(range);
    return rowQuery;
View Full Code Here

TOP

Related Classes of com.netflix.astyanax.Keyspace

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.