Package org.apache.cassandra.thrift

Examples of org.apache.cassandra.thrift.ColumnParent$ColumnParentStandardScheme


                                                                  CassandraTemplate template,
                                                                  final String startKey,
                                                                  final int rowLimit) {
        return template.read(keyspaceName, new KeyspaceCallback<Map<ByteBuffer, List<Column>>>() {
            public Map<ByteBuffer, List<Column>> execute(KeyspaceService keyspace) {
                ColumnParent columnParent = new ColumnParent(columnFamilyName);
                SlicePredicate predicate = ALL_COLUMNS;
                KeyRange keyRange = new KeyRange(rowLimit);
                keyRange.setStart_key(bytes(startKey));
                keyRange.setEnd_key(bytes(""));
                return keyspace.getRangeSlices(columnParent, predicate, keyRange);
View Full Code Here


                                        final SlicePredicate slicePredicate,
                                        CassandraTemplate template,
                                        String keyspaceName) {
        return template.read(keyspaceName, new KeyspaceCallback<List<Column>>() {
            public List<Column> execute(KeyspaceService keyspace) {
                ColumnParent columnParent = new ColumnParent(columnFamilyName);
                if (superColumnName != null) {
                    columnParent.setSuper_column(bytes(superColumnName));
                }
                return keyspace.getSlice(rowKey, columnParent, slicePredicate);
            }
        });
    }
View Full Code Here

                                                  final String columnFamilyName,
                                                  CassandraTemplate template,
                                                  String keyspaceName) {
        return template.read(keyspaceName, new KeyspaceCallback<List<SuperColumn>>() {
            public List<SuperColumn> execute(KeyspaceService keyspace) {
                ColumnParent columnParent = new ColumnParent(columnFamilyName);
                return keyspace.getSuperSlice(rowKey, columnParent, ALL_COLUMNS);
            }
        });
    }
View Full Code Here

                                                  final SlicePredicate slicePredicate,
                                                  CassandraTemplate template,
                                                  String keyspaceName) {
        return template.read(keyspaceName, new KeyspaceCallback<List<SuperColumn>>() {
            public List<SuperColumn> execute(KeyspaceService keyspace) {
                ColumnParent columnParent = new ColumnParent(columnFamilyName);
                return keyspace.getSuperSlice(rowKey, columnParent, slicePredicate);
            }
        });
    }
View Full Code Here

                                     final int ttlInMinutes) {
        template.write(keyspaceName, new KeyspaceCallback<Void>() {
            public Void execute(KeyspaceService keyspace) {
              int ttlInSeconds = (int) TimeUnit.SECONDS.convert(ttlInMinutes, TimeUnit.MINUTES);
                ColumnPath columnPath = createColumnPath(columnFamilyName, superColumnName, propertyName);
                ColumnParent columnParent = new ColumnParent(columnPath.getColumn_family());
                if (columnPath.isSetSuper_column()) {
                  columnParent.setSuper_column(columnPath.getSuper_column());
                }
               
                Column column = new Column(ByteBuffer.wrap(columnPath.getColumn()));
                column.setTtl(ttlInSeconds);
                ByteBuffer key = StringSerializer.get().toByteBuffer(rowKey);
View Full Code Here

                                                                    final String superColumnName,
                                                                    CassandraTemplate template,
                                                                    String keyspaceName) {
        return template.read(keyspaceName, new KeyspaceCallback<Map<String, Object>>() {
            public Map<String, Object> execute(KeyspaceService keyspace) {
                ColumnParent columnParent = new ColumnParent(columnFamilyName);
                if (superColumnName != null) {
                    columnParent.setSuper_column(bytes(superColumnName));
                }

                List<Column> list = keyspace.getSlice(rowKey, columnParent, ALL_COLUMNS);
                Map<String, Object> props = new HashMap<String, Object>(list.size());
                for (Column c : list) {
View Full Code Here

                                                            String keyspaceName) {

        Map<ByteBuffer, List<Column>> multiGetResult = template
                .read(keyspaceName, new KeyspaceCallback<Map<ByteBuffer, List<Column>>>() {
                    public Map<ByteBuffer, List<Column>> execute(KeyspaceService keyspace) {
                        ColumnParent columnParent = new ColumnParent(columnFamilyName);
                        if (superColumnName != null) {
                            columnParent.setSuper_column(superColumnName);
                        }
                        SlicePredicate slicePredicate = new SlicePredicate();
                        slicePredicate.setColumn_names(Collections.singletonList(columnName));
                        return keyspace.multigetSlice(keys, columnParent, slicePredicate);
                    }
View Full Code Here

                                                                        final SlicePredicate slicePredicate,
                                                                        CassandraTemplate template,
                                                                        String keySpaceName) {
        return template.read(keySpaceName, new KeyspaceCallback<Map<ByteBuffer, List<SuperColumn>>>() {
            public Map<ByteBuffer, List<SuperColumn>> execute(KeyspaceService keyspace) {
                ColumnParent columnParent = new ColumnParent(columnFamilyName);
                return keyspace.multigetSuperSlice(keys, columnParent, slicePredicate);
            }
        });
    }
View Full Code Here

                                                                            CassandraTemplate template,
                                                                            final String startKey,
                                                                            final int rowLimit) {
        return template.read(keyspaceName, new KeyspaceCallback<Map<ByteBuffer, List<SuperColumn>>>() {
            public Map<ByteBuffer, List<SuperColumn>> execute(KeyspaceService keyspace) {
                ColumnParent columnParent = new ColumnParent(columnFamilyName);
                SlicePredicate predicate = ALL_COLUMNS;
                KeyRange keyRange = new KeyRange(rowLimit);
                keyRange.setStart_key(bytes(startKey));
                keyRange.setEnd_key(bytes(""));
                return keyspace.getSuperRangeSlices(columnParent, predicate, keyRange);
View Full Code Here

                                                                  CassandraTemplate template,
                                                                  final String startKey,
                                                                  final int rowLimit) {
        return template.read(keyspaceName, new KeyspaceCallback<Map<ByteBuffer, List<Column>>>() {
            public Map<ByteBuffer, List<Column>> execute(KeyspaceService keyspace) {
                ColumnParent columnParent = new ColumnParent(columnFamilyName);
                SlicePredicate predicate = ALL_COLUMNS;
                KeyRange keyRange = new KeyRange(rowLimit);
                keyRange.setStart_key(bytes(startKey));
                keyRange.setEnd_key(bytes(""));
                return keyspace.getRangeSlices(columnParent, predicate, keyRange);
View Full Code Here

TOP

Related Classes of org.apache.cassandra.thrift.ColumnParent$ColumnParentStandardScheme

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.