Class OrderPreservingPartitioner.StringToken

    • Constructor Detail

      • StringToken

        public StringToken​(java.lang.String token)
    • Method Detail

      • getHeapSize

        public long getHeapSize()
        Specified by:
        getHeapSize in class Token
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • compareTo

        public int compareTo​(Token o)
      • size

        public double size​(Token next)
        Description copied from class: Token
        Returns a measure for the token space covered between this token and next. Used by the token allocation algorithm (see CASSANDRA-7032).
        Specified by:
        size in class Token
      • increaseSlightly

        public Token increaseSlightly()
        Description copied from class: Token
        Returns a token that is slightly greater than this. Used to avoid clashes between nodes in separate datacentres trying to use the same token via the token allocation algorithm.
        Specified by:
        increaseSlightly in class Token