Package de.otto.synapse.message
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
-
Method Summary
Modifier and Type Method Description java.lang.StringcompactionKey()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.booleanequals(java.lang.Object o)inthashCode()booleanisCompoundKey()java.lang.StringpartitionKey()Returns the part of the key that is used to select one of possibly several shards or partitions of a message channel.java.lang.StringtoString()
-
Method Details
-
partitionKey
public java.lang.String partitionKey()Description copied from interface:KeyReturns 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
partitionKeyare guaranteed to keep their ordering.- Specified by:
partitionKeyin interfaceKey- Returns:
- partition key
-
compactionKey
public java.lang.String compactionKey()Description copied from interface:KeyReturns 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:
compactionKeyin interfaceKey- Returns:
- compaction key
-
isCompoundKey
public boolean isCompoundKey()- Specified by:
isCompoundKeyin interfaceKey
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-