Package com.bazaarvoice.ostrich.partition

Examples of com.bazaarvoice.ostrich.partition.PartitionKey


        Annotation[][] annotations = method.getParameterAnnotations();
        String[] keyMappings = new String[annotations.length];
        boolean keyMappingFound = false;
        Map<String, Integer> unique = Maps.newHashMap();
        for (int i = 0; i < annotations.length; i++) {
            PartitionKey annotation = findPartitionKeyAnnotation(annotations[i]);
            if (annotation == null) {
                continue;
            }
            String key = checkNotNull(annotation.value());
            Integer prev = unique.put(key, i);
            checkState(prev == null, "Method '%s' has multiple arguments annotated with the same @PartitionKey " +
                    "value '%s': arguments %s and %s", method, key, prev, i);
            keyMappings[i] = key;
            keyMappingFound = true;
View Full Code Here


        Annotation[][] annotations = method.getParameterAnnotations();
        String[] keyMappings = new String[annotations.length];
        boolean keyMappingFound = false;
        Map<String, Integer> unique = Maps.newHashMap();
        for (int i = 0; i < annotations.length; i++) {
            PartitionKey annotation = findPartitionKeyAnnotation(annotations[i]);
            if (annotation == null) {
                continue;
            }
            String key = checkNotNull(annotation.value());
            Integer prev = unique.put(key, i);
            checkState(prev == null, "Method '%s' has multiple arguments annotated with the same @PartitionKey " +
                    "value '%s': arguments %s and %s", method, key, prev, i);
            keyMappings[i] = key;
            keyMappingFound = true;
View Full Code Here

TOP

Related Classes of com.bazaarvoice.ostrich.partition.PartitionKey

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.