public class ChangeFeedProcessorOptions extends Object
ChangeFeedProcessor
.Constructor and Description |
---|
ChangeFeedProcessorOptions() |
Modifier and Type | Method and Description |
---|---|
boolean |
getDiscardExistingLeases()
Gets a value indicating whether on start of the host all existing leases should be deleted and the host
should start from scratch.
|
Duration |
getFeedPollDelay()
Gets the delay in between polling a partition for new changes on the feed, after all current changes are drained.
|
Duration |
getLeaseAcquireInterval()
Gets the interval to kick off a task to compute if partitions are distributed evenly among known host instances.
|
Duration |
getLeaseExpirationInterval()
Gets the interval for which the lease is taken on a lease representing a partition.
|
String |
getLeasePrefix()
Gets a prefix to be used as part of the lease ID.
|
Duration |
getLeaseRenewInterval()
Gets the renew interval for all leases for partitions currently held by
ChangeFeedProcessor instance. |
int |
getMaxItemCount()
Gets the maximum number of items to be returned in the enumeration operation in the Azure Cosmos DB service.
|
int |
getMaxScaleCount()
Gets the maximum number of partitions the host can serve.
|
int |
getMinScaleCount()
Gets the minimum partition count for the host.
|
String |
getStartContinuation()
Gets the start request continuation token to start looking for changes after.
|
boolean |
getStartFromBeginning()
Gets a value indicating whether change feed in the Azure Cosmos DB service should start from beginning (true)
or from current (false).
|
OffsetDateTime |
getStartTime()
Gets the time (exclusive) to start looking for changes after.
|
ChangeFeedProcessorOptions |
setDiscardExistingLeases(boolean discardExistingLeases)
Sets a value indicating whether on start of the host all existing leases should be deleted and the host
should start from scratch.
|
ChangeFeedProcessorOptions |
setFeedPollDelay(Duration feedPollDelay)
Sets the delay in between polling a partition for new changes on the feed, after all current changes are drained.
|
ChangeFeedProcessorOptions |
setLeaseAcquireInterval(Duration leaseAcquireInterval)
Sets he interval to kick off a task to compute if partitions are distributed evenly among known host instances.
|
ChangeFeedProcessorOptions |
setLeaseExpirationInterval(Duration leaseExpirationInterval)
Sets the interval for which the lease is taken on a lease representing a partition.
|
ChangeFeedProcessorOptions |
setLeasePrefix(String leasePrefix)
Sets a prefix to be used as part of the lease ID.
|
ChangeFeedProcessorOptions |
setLeaseRenewInterval(Duration leaseRenewInterval)
Sets the renew interval for all leases for partitions currently held by
ChangeFeedProcessor instance. |
ChangeFeedProcessorOptions |
setMaxItemCount(int maxItemCount)
Sets the maximum number of items to be returned in the enumeration operation.
|
ChangeFeedProcessorOptions |
setMaxScaleCount(int maxScaleCount)
Sets the maximum number of partitions the host can serve.
|
ChangeFeedProcessorOptions |
setMinScaleCount(int minScaleCount)
Sets the minimum partition count for the host.
|
ChangeFeedProcessorOptions |
setStartContinuation(String startContinuation)
Sets the start request continuation token to start looking for changes after.
|
ChangeFeedProcessorOptions |
setStartFromBeginning(boolean startFromBeginning)
Sets a value indicating whether change feed in the Azure Cosmos DB service should start from beginning.
|
ChangeFeedProcessorOptions |
setStartTime(OffsetDateTime startTime)
Sets the time (exclusive) to start looking for changes after (UTC time).
|
public Duration getLeaseRenewInterval()
ChangeFeedProcessor
instance.public ChangeFeedProcessorOptions setLeaseRenewInterval(Duration leaseRenewInterval)
ChangeFeedProcessor
instance.leaseRenewInterval
- the renew interval for all leases for partitions currently held by
ChangeFeedProcessor
instance.public Duration getLeaseAcquireInterval()
public ChangeFeedProcessorOptions setLeaseAcquireInterval(Duration leaseAcquireInterval)
leaseAcquireInterval
- he interval to kick off a task to compute if partitions are distributed evenly
among known host instances.public Duration getLeaseExpirationInterval()
If the lease is not renewed within this interval, it will cause it to expire and ownership of the partition will
move to another ChangeFeedProcessor
instance.
public ChangeFeedProcessorOptions setLeaseExpirationInterval(Duration leaseExpirationInterval)
If the lease is not renewed within this interval, it will cause it to expire and ownership of the partition will
move to another ChangeFeedProcessor
instance.
leaseExpirationInterval
- the interval for which the lease is taken on a lease representing a partition.public Duration getFeedPollDelay()
public ChangeFeedProcessorOptions setFeedPollDelay(Duration feedPollDelay)
feedPollDelay
- the delay in between polling a partition for new changes on the feed, after all current
changes are drained.public String getLeasePrefix()
This can be used to support multiple instances of ChangeFeedProcessor
instances pointing at the same
feed while using the same auxiliary collection.
public ChangeFeedProcessorOptions setLeasePrefix(String leasePrefix)
leasePrefix
- a prefix to be used as part of the lease ID.public int getMaxItemCount()
public ChangeFeedProcessorOptions setMaxItemCount(int maxItemCount)
maxItemCount
- the maximum number of items to be returned in the enumeration operation.public String getStartContinuation()
This is only used when lease store is not initialized and is ignored if a lease for partition exists and has continuation token. If this is specified, both StartTime and StartFromBeginning are ignored.
public ChangeFeedProcessorOptions setStartContinuation(String startContinuation)
This is only used when lease store is not initialized and is ignored if a lease for partition exists and has continuation token. If this is specified, both StartTime and StartFromBeginning are ignored.
startContinuation
- the start request continuation token to start looking for changes after.public OffsetDateTime getStartTime()
This is only used when: (1) Lease store is not initialized and is ignored if a lease for partition exists and has continuation token. (2) StartContinuation is not specified. If this is specified, StartFromBeginning is ignored.
public ChangeFeedProcessorOptions setStartTime(OffsetDateTime startTime)
This is only used when: (1) Lease store is not initialized and is ignored if a lease for partition exists and has continuation token. (2) StartContinuation is not specified. If this is specified, StartFromBeginning is ignored.
startTime
- the time (exclusive) to start looking for changes after.public boolean getStartFromBeginning()
This is only used when: (1) Lease store is not initialized and is ignored if a lease for partition exists and has continuation token. (2) StartContinuation is not specified. (3) StartTime is not specified.
public ChangeFeedProcessorOptions setStartFromBeginning(boolean startFromBeginning)
This is only used when: (1) Lease store is not initialized and is ignored if a lease for partition exists and has continuation token. (2) StartContinuation is not specified. (3) StartTime is not specified.
startFromBeginning
- Indicates to start from beginning if truepublic int getMinScaleCount()
This can be used to increase the number of partitions for the host and thus override equal distribution (which is the default) of leases between hosts.
public ChangeFeedProcessorOptions setMinScaleCount(int minScaleCount)
This can be used to increase the number of partitions for the host and thus override equal distribution (which is the default) of leases between hosts.
minScaleCount
- the minimum partition count for the host.public int getMaxScaleCount()
This can be used property to limit the number of partitions for the host and thus override equal distribution (which is the default) of leases between hosts. DEFAULT is 0 (unlimited).
public ChangeFeedProcessorOptions setMaxScaleCount(int maxScaleCount)
maxScaleCount
- the maximum number of partitions the host can serve.public boolean getDiscardExistingLeases()
public ChangeFeedProcessorOptions setDiscardExistingLeases(boolean discardExistingLeases)
discardExistingLeases
- Indicates whether to discard all existing leases if trueCopyright © 2020 Microsoft Corporation. All rights reserved.