Interface StreamOperation.SequenceId

  • All Superinterfaces:
    java.lang.Comparable<StreamOperation.SequenceId>
    Enclosing interface:
    StreamOperation

    public static interface StreamOperation.SequenceId
    extends java.lang.Comparable<StreamOperation.SequenceId>
    A SequenceId uniquely identifies a stream operation associated with a Publisher.

    It can also be used to sequence operations on the same key. Note that subscription API provides no guarantees about the order of operations beyond the single key. That is, only for any single key, the subscription API guarantees the order of events on that particular key received by subscriber is the same order these operations applied in NoSQL DB. Therefore it is the application's responsibility to ensure that the comparison is only used in the context of the same key, since the key is not part of its state.

    If compareTo is called to compare the sequenceId of two instances of different implementing classes, ClassCastException will be thrown because the sequenceIds from different classes are not directly comparable.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      byte[] getBytes()
      Returns a byte representation suitable for saving in some other data source.
      • Methods inherited from interface java.lang.Comparable

        compareTo
    • Method Detail

      • getBytes

        byte[] getBytes()
        Returns a byte representation suitable for saving in some other data source. The byte array representation can also be used as a for comparisons.