Package me.prettyprint.hector.api.beans

Examples of me.prettyprint.hector.api.beans.DynamicComposite.addComponent()


    }

    private DynamicComposite entryKey(K itemKey) {
        DynamicComposite entryKey = new DynamicComposite();
        entryKey.addComponent(itemKey, keySerializer);
        entryKey.addComponent(indexName, STRING_SERIALIZER);
        return entryKey;
    }

    private void insertIndexColumn(K itemKey, long timestamp, List<Object> indexValues, Mutator<String> indexMutator) {
        LOGGER.debug("Indexing key {} with values {}...", itemKey, indexValues);
View Full Code Here


    }

    private void insertIndexColumn(K itemKey, long timestamp, List<Object> indexValues, Mutator<String> indexMutator) {
        LOGGER.debug("Indexing key {} with values {}...", itemKey, indexValues);
        DynamicComposite indexColumnName = CassidyUtils.toComposite(context.serializerRegistry(), indexValues);
        indexColumnName.addComponent(itemKey, keySerializer);
        indexColumnName.addComponent(timestamp, LONG_SERIALIZER);
        LOGGER.debug("Creating '{}' index column with name {} and value {}...", indexName, indexColumnName, itemKey);
        final HColumn<DynamicComposite, K> indexColumn = HFactory.createColumn(indexColumnName, itemKey, DYNAMIC_COMPOSITE_SERIALIZER, keySerializer);
        indexMutator.addInsertion(indexName, indexColumnFamily, indexColumn);
    }
View Full Code Here

    private void insertIndexColumn(K itemKey, long timestamp, List<Object> indexValues, Mutator<String> indexMutator) {
        LOGGER.debug("Indexing key {} with values {}...", itemKey, indexValues);
        DynamicComposite indexColumnName = CassidyUtils.toComposite(context.serializerRegistry(), indexValues);
        indexColumnName.addComponent(itemKey, keySerializer);
        indexColumnName.addComponent(timestamp, LONG_SERIALIZER);
        LOGGER.debug("Creating '{}' index column with name {} and value {}...", indexName, indexColumnName, itemKey);
        final HColumn<DynamicComposite, K> indexColumn = HFactory.createColumn(indexColumnName, itemKey, DYNAMIC_COMPOSITE_SERIALIZER, keySerializer);
        indexMutator.addInsertion(indexName, indexColumnFamily, indexColumn);
    }
View Full Code Here

        for (HColumn<Long, DynamicComposite> entry : entries) {
            final Long entryTimestamp = entry.getName();

            DynamicComposite indexColumnName = new DynamicComposite();
            appendComponents(entry.getValue(), indexColumnName);
            indexColumnName.addComponent(key, keySerializer);
            indexColumnName.addComponent(entryTimestamp, LONG_SERIALIZER);

            indexMutator.addDeletion(indexName, indexColumnFamily, indexColumnName, DYNAMIC_COMPOSITE_SERIALIZER);
            entryMutator.addDeletion(entryKey, entryColumnFamily, entryTimestamp, LONG_SERIALIZER);
        }
View Full Code Here

            final Long entryTimestamp = entry.getName();

            DynamicComposite indexColumnName = new DynamicComposite();
            appendComponents(entry.getValue(), indexColumnName);
            indexColumnName.addComponent(key, keySerializer);
            indexColumnName.addComponent(entryTimestamp, LONG_SERIALIZER);

            indexMutator.addDeletion(indexName, indexColumnFamily, indexColumnName, DYNAMIC_COMPOSITE_SERIALIZER);
            entryMutator.addDeletion(entryKey, entryColumnFamily, entryTimestamp, LONG_SERIALIZER);
        }
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    public static DynamicComposite toComposite(SerializerRegistry registry, Iterable<?> values) {
        DynamicComposite composite = new DynamicComposite();
        for (Object value : values) {
            if (value == null) {
                composite.addComponent(NULL_VALUE, NULL_SERIALIZER);
            } else {
                composite.addComponent(value, (Serializer<Object>) registry.getSerializer(value.getClass()));
            }
        }
        return composite;
View Full Code Here

        DynamicComposite composite = new DynamicComposite();
        for (Object value : values) {
            if (value == null) {
                composite.addComponent(NULL_VALUE, NULL_SERIALIZER);
            } else {
                composite.addComponent(value, (Serializer<Object>) registry.getSerializer(value.getClass()));
            }
        }
        return composite;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.