Class SimpleKey

java.lang.Object
de.otto.synapse.message.SimpleKey
All Implemented Interfaces:
Key, java.io.Serializable

public final class SimpleKey
extends java.lang.Object
implements Key
See Also:
Serialized Form
  • Field Summary

    Fields inherited from interface de.otto.synapse.message.Key

    NO_KEY
  • Method Summary

    Modifier and Type Method Description
    java.lang.String compactionKey()
    Returns the part of the key that is used for message compaction, where a snapshot of a message log is taken by only keeping the latest message for every compaction-key.
    boolean equals​(java.lang.Object o)  
    int hashCode()  
    java.lang.String partitionKey()
    Returns the part of the key that is used to select one of possibly several shards or partitions of a message channel.
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • partitionKey

      public java.lang.String partitionKey()
      Description copied from interface: Key
      Returns the part of the key that is used to select one of possibly several shards or partitions of a message channel.

      All messages with the same partitionKey are guaranteed to keep their ordering.

      Specified by:
      partitionKey in interface Key
      Returns:
      partition key
    • compactionKey

      public java.lang.String compactionKey()
      Description copied from interface: Key
      Returns the part of the key that is used for message compaction, where a snapshot of a message log is taken by only keeping the latest message for every compaction-key.
      Specified by:
      compactionKey in interface Key
      Returns:
      compaction key
    • equals

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

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

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