public class RetentionPolicy
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
RetentionPolicy.RetentionType |
Constructor and Description |
---|
RetentionPolicy() |
Modifier and Type | Method and Description |
---|---|
static RetentionPolicy |
bySizeBytes(long size)
Create a retention policy to configure a stream to truncate a stream
according to the amount of data currently stored.
|
static RetentionPolicy |
byTime(java.time.Duration duration)
Create a retention policy to configure a stream to periodically truncated
according to the specified duration.
|
public static RetentionPolicy byTime(java.time.Duration duration)
duration
- Period to retain data in a stream.public static RetentionPolicy bySizeBytes(long size)
size
- Amount of data to retain in a stream.