Class SplitEvent

java.lang.Object
com.mongodb.client.model.changestream.SplitEvent

public final class SplitEvent extends Object
The current fragment, out of the total number of fragments. When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent stage, events larger than 16MB will be split into multiple events.
Since:
4.11
MongoDB documentation
$changeStreamSplitLargeEvent
Since server release
6.0.9
  • Constructor Details

    • SplitEvent

      public SplitEvent(@BsonProperty("fragment") int fragment, @BsonProperty("of") int of)
      Parameters:
      fragment - the fragment number
      of - the total number of fragments
  • Method Details

    • getFragment

      public int getFragment()
      Which 1-based fragment this is, out of the total number of fragments.
      Returns:
      the fragment number
    • getOf

      public int getOf()
      The total number of fragments.
      Returns:
      the total number of fragments.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object