Class TopologyChangeNotificationBuffer

java.lang.Object
com.couchbase.client.core.config.TopologyChangeNotificationBuffer

@NullMarked @Internal public class TopologyChangeNotificationBuffer extends Object
"Squashes" notifications, retaining only the highest revision for each bucket (plus global).
  • Constructor Details

    • TopologyChangeNotificationBuffer

      public TopologyChangeNotificationBuffer()
  • Method Details

    • putIfNewer

      public boolean putIfNewer(@Nullable String bucketName, TopologyRevision revision)
      Returns true if the given revision was added to the buffer, or false if it was not newer than the existing entry.
      Parameters:
      bucketName - null means global
    • remove

      public @Nullable TopologyRevision remove(@Nullable String bucketName)
      Parameters:
      bucketName - null means global
    • toString

      public String toString()
      Overrides:
      toString in class Object