public class RetentionPolicy
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
RetentionPolicy.RetentionPolicyBuilder |
static class |
RetentionPolicy.RetentionType |
Modifier and Type | Method and Description |
---|---|
static RetentionPolicy.RetentionPolicyBuilder |
builder() |
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.
|
protected boolean |
canEqual(java.lang.Object other) |
boolean |
equals(java.lang.Object o) |
long |
getRetentionParam() |
RetentionPolicy.RetentionType |
getRetentionType() |
int |
hashCode() |
java.lang.String |
toString() |
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.public static RetentionPolicy.RetentionPolicyBuilder builder()
public RetentionPolicy.RetentionType getRetentionType()
public long getRetentionParam()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
protected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object