Tabnine Logo
PartitionKey.value
Code IndexAdd Tabnine to your IDE (free)

How to use
value
method
in
com.bazaarvoice.ostrich.partition.PartitionKey

Best Java code snippets using com.bazaarvoice.ostrich.partition.PartitionKey.value (Showing top 2 results out of 315)

origin: com.bazaarvoice.ostrich/ostrich-core

/**
 * Returns an array indexed by argument index with the value of the @PartitionKey annotation for each argument,
 * or null if no arguments are annotated with @PartitionKey.
 */
private String[] collectPartitionKeyAnnotations(Method method) {
  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;
  }
  return keyMappingFound ? keyMappings : null;
}
origin: bazaarvoice/ostrich

/**
 * Returns an array indexed by argument index with the value of the @PartitionKey annotation for each argument,
 * or null if no arguments are annotated with @PartitionKey.
 */
private String[] collectPartitionKeyAnnotations(Method method) {
  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;
  }
  return keyMappingFound ? keyMappings : null;
}
com.bazaarvoice.ostrich.partitionPartitionKeyvalue

Popular methods of PartitionKey

  • <init>

Popular in Java

  • Start an intent from android
  • addToBackStack (FragmentTransaction)
  • setRequestProperty (URLConnection)
  • runOnUiThread (Activity)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now