Class EagerBufferConfigImpl

    • Constructor Detail

      • EagerBufferConfigImpl

        public EagerBufferConfigImpl​(long maxRecords,
                                     long maxBytes)
    • Method Detail

      • withMaxRecords

        public Suppressed.BufferConfig withMaxRecords​(long recordLimit)
        Description copied from interface: Suppressed.BufferConfig
        Set a size constraint on the buffer in terms of the maximum number of keys it will store.
      • maxRecords

        public long maxRecords()
      • maxBytes

        public long maxBytes()
      • 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
      • withNoBound

        public Suppressed.StrictBufferConfig withNoBound()
        Description copied from interface: Suppressed.BufferConfig
        Set the buffer to be unconstrained by size (either keys or bytes). As a result, the buffer will consume as much memory as it needs, dictated by the time bound. If there isn't enough heap available to meet the demand, the application will encounter an OutOfMemoryError and shut down (not guaranteed to be a graceful exit). Also, note that JVM processes under extreme memory pressure may exhibit poor GC behavior. This is a convenient option if you doubt that your buffer will be that large, but also don't wish to pick particular constraints, such as in testing. This buffer is "strict" in the sense that it will enforce the time bound or crash. It will never emit early.
        Specified by:
        withNoBound in interface Suppressed.BufferConfig<BC extends Suppressed.BufferConfig<BC>>