Class GenerateATRIds


  • @Internal
    public class GenerateATRIds
    extends java.lang.Object
    A tool for internal use that generates the fixed ATR ids. Note the results are randomly generated and hence not idempotent. Regenerating these numbers will result in a transaction client that is not aware of, and hence cannot cleanup, ATRs from previous clients. E.g. it's No-No City.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Optional<java.lang.String> forceKeyToPartition​(java.lang.String key, int desiredPartition, int numPartitions, java.util.Set<java.lang.String> existing)
      Borrowed from David Nault's work on Elasticsearch Returns the given key with some characters appended so the new key hashes to the desired partition.
      static void main​(java.lang.String[] args)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
      • forceKeyToPartition

        public static java.util.Optional<java.lang.String> forceKeyToPartition​(java.lang.String key,
                                                                               int desiredPartition,
                                                                               int numPartitions,
                                                                               java.util.Set<java.lang.String> existing)
        Borrowed from David Nault's work on Elasticsearch Returns the given key with some characters appended so the new key hashes to the desired partition.