public class EagerBufferConfigImpl
extends java.lang.Object
Constructor and Description |
---|
EagerBufferConfigImpl(long maxRecords,
long maxBytes) |
Modifier and Type | Method and Description |
---|---|
BufferFullStrategy |
bufferFullStrategy() |
Suppressed.BufferConfig |
emitEarlyWhenFull()
Set the buffer to just emit the oldest records when any of its constraints are violated.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
long |
maxBytes() |
long |
maxRecords() |
Suppressed.StrictBufferConfig |
shutDownWhenFull()
Set the buffer to gracefully shut down the application when any of its constraints are violated
This buffer is "strict" in the sense that it will enforce the time bound or shut down.
|
java.lang.String |
toString() |
Suppressed.BufferConfig |
withMaxBytes(long byteLimit)
Set a size constraint on the buffer, the maximum number of bytes it will use.
|
Suppressed.BufferConfig |
withMaxRecords(long recordLimit)
Set a size constraint on the buffer in terms of the maximum number of keys it will store.
|
Suppressed.StrictBufferConfig |
withNoBound()
Set the buffer to be unconstrained by size (either keys or bytes).
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
maxBytes, maxRecords, unbounded
public EagerBufferConfigImpl(long maxRecords, long maxBytes)
public Suppressed.BufferConfig withMaxRecords(long recordLimit)
Suppressed.BufferConfig
public Suppressed.BufferConfig withMaxBytes(long byteLimit)
Suppressed.BufferConfig
public long maxRecords()
public long maxBytes()
public BufferFullStrategy bufferFullStrategy()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public Suppressed.StrictBufferConfig withNoBound()
Suppressed.BufferConfig
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.withNoBound
in interface Suppressed.BufferConfig<BC extends Suppressed.BufferConfig<BC>>
public Suppressed.StrictBufferConfig shutDownWhenFull()
Suppressed.BufferConfig
shutDownWhenFull
in interface Suppressed.BufferConfig<BC extends Suppressed.BufferConfig<BC>>
public Suppressed.BufferConfig emitEarlyWhenFull()
Suppressed.BufferConfig
emitEarlyWhenFull
in interface Suppressed.BufferConfig<BC extends Suppressed.BufferConfig<BC>>