通过


你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

RetentionDescription Class

  • java.lang.Object
    • com.azure.resourcemanager.eventhubs.models.RetentionDescription

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 RetentionDescription class.

Method Summary

Modifier and Type Method and Description
CleanupPolicyRetentionDescription cleanupPolicy()

Get the cleanupPolicy property: Enumerates the possible values for cleanup policy.

static RetentionDescription fromJson(JsonReader jsonReader)

Reads an instance of RetentionDescription from the JsonReader.

Long minCompactionLagInMins()

Get the minCompactionLagInMins property: The minimum time a message will remain ineligible for compaction in the log.

Long retentionTimeInHours()

Get the retentionTimeInHours property: Number of hours to retain the events for this Event Hub.

JsonWriter toJson(JsonWriter jsonWriter)
Integer tombstoneRetentionTimeInHours()

Get the tombstoneRetentionTimeInHours property: Number of hours to retain the tombstone markers of a compacted Event Hub.

void validate()

Validates the instance.

RetentionDescription withCleanupPolicy(CleanupPolicyRetentionDescription cleanupPolicy)

Set the cleanupPolicy property: Enumerates the possible values for cleanup policy.

RetentionDescription withMinCompactionLagInMins(Long minCompactionLagInMins)

Set the minCompactionLagInMins property: The minimum time a message will remain ineligible for compaction in the log.

RetentionDescription withRetentionTimeInHours(Long retentionTimeInHours)

Set the retentionTimeInHours property: Number of hours to retain the events for this Event Hub.

RetentionDescription withTombstoneRetentionTimeInHours(Integer tombstoneRetentionTimeInHours)

Set the tombstoneRetentionTimeInHours property: Number of hours to retain the tombstone markers of a compacted Event Hub.

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:

the cleanupPolicy value.

fromJson

public static RetentionDescription fromJson(JsonReader jsonReader)

Reads an instance of RetentionDescription from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of RetentionDescription if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the RetentionDescription.

minCompactionLagInMins

public Long minCompactionLagInMins()

Get the minCompactionLagInMins property: The minimum time a message will remain ineligible for compaction in the log. This value is used when cleanupPolicy is Compact or DeleteOrCompact.

Returns:

the minCompactionLagInMins value.

retentionTimeInHours

public Long retentionTimeInHours()

Get the retentionTimeInHours property: Number of hours to retain the events for this Event Hub. This should be positive value upto namespace SKU max. -1 is a special case where retention time is infinite, but the size of an entity is restricted and its size depends on namespace SKU type.

Returns:

the retentionTimeInHours value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

tombstoneRetentionTimeInHours

public Integer tombstoneRetentionTimeInHours()

Get the tombstoneRetentionTimeInHours property: Number of hours to retain the tombstone markers of a compacted Event Hub. This value is used when cleanupPolicy is Compact or DeleteOrCompact. 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:

the tombstoneRetentionTimeInHours value.

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:

cleanupPolicy - the cleanupPolicy value to set.

Returns:

the RetentionDescription object itself.

withMinCompactionLagInMins

public RetentionDescription withMinCompactionLagInMins(Long minCompactionLagInMins)

Set the minCompactionLagInMins property: The minimum time a message will remain ineligible for compaction in the log. This value is used when cleanupPolicy is Compact or DeleteOrCompact.

Parameters:

minCompactionLagInMins - the minCompactionLagInMins value to set.

Returns:

the RetentionDescription object itself.

withRetentionTimeInHours

public RetentionDescription withRetentionTimeInHours(Long retentionTimeInHours)

Set the retentionTimeInHours property: Number of hours to retain the events for this Event Hub. This should be positive value upto namespace SKU max. -1 is a special case where retention time is infinite, but the size of an entity is restricted and its size depends on namespace SKU type.

Parameters:

retentionTimeInHours - the retentionTimeInHours value to set.

Returns:

the RetentionDescription object itself.

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 used when cleanupPolicy is Compact or DeleteOrCompact. 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:

tombstoneRetentionTimeInHours - the tombstoneRetentionTimeInHours value to set.

Returns:

the RetentionDescription object itself.

Applies to