RetentionDescription Class
- java.
lang. Object - com.
azure. resourcemanager. eventhubs. models. RetentionDescription
- com.
Implements
public final class RetentionDescription
implements JsonSerializable<RetentionDescription>
Properties to configure retention settings for the eventhub.
Constructor Summary
Constructor | Description |
---|---|
RetentionDescription() |
Creates an instance of Retention |
Method Summary
Modifier and Type | Method and Description |
---|---|
Cleanup |
cleanupPolicy()
Get the cleanup |
static
Retention |
fromJson(JsonReader jsonReader)
Reads an instance of Retention |
Long |
retentionTimeInHours()
Get the retention |
Json |
toJson(JsonWriter jsonWriter) |
Integer |
tombstoneRetentionTimeInHours()
Get the tombstone |
void |
validate()
Validates the instance. |
Retention |
withCleanupPolicy(CleanupPolicyRetentionDescription cleanupPolicy)
Set the cleanup |
Retention |
withRetentionTimeInHours(Long retentionTimeInHours)
Set the retention |
Retention |
withTombstoneRetentionTimeInHours(Integer tombstoneRetentionTimeInHours)
Set the tombstone |
Methods inherited from java.lang.Object
Constructor Details
RetentionDescription
public RetentionDescription()
Creates an instance of RetentionDescription class.
Method Details
cleanupPolicy
public CleanupPolicyRetentionDescription cleanupPolicy()
Get the cleanupPolicy property: Enumerates the possible values for cleanup policy.
Returns:
fromJson
public static RetentionDescription fromJson(JsonReader jsonReader)
Reads an instance of RetentionDescription from the JsonReader.
Parameters:
Returns:
Throws:
retentionTimeInHours
public Long retentionTimeInHours()
Get the retentionTimeInHours property: Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue.
Returns:
toJson
tombstoneRetentionTimeInHours
public Integer tombstoneRetentionTimeInHours()
Get the tombstoneRetentionTimeInHours property: Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub.
Returns:
validate
public void validate()
Validates the instance.
withCleanupPolicy
public RetentionDescription withCleanupPolicy(CleanupPolicyRetentionDescription cleanupPolicy)
Set the cleanupPolicy property: Enumerates the possible values for cleanup policy.
Parameters:
Returns:
withRetentionTimeInHours
public RetentionDescription withRetentionTimeInHours(Long retentionTimeInHours)
Set the retentionTimeInHours property: Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue.
Parameters:
Returns:
withTombstoneRetentionTimeInHours
public RetentionDescription withTombstoneRetentionTimeInHours(Integer tombstoneRetentionTimeInHours)
Set the tombstoneRetentionTimeInHours property: Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub.
Parameters:
Returns:
Applies to
Azure SDK for Java