public class ChangeFeedProcessorOptions extends Object
ChangeFeedProcessor
.Constructor and Description |
---|
ChangeFeedProcessorOptions() |
Modifier and Type | Method and Description |
---|---|
boolean |
discardExistingLeases()
Gets a value indicating whether on start of the host all existing leases should be deleted and the host
should start from scratch.
|
ChangeFeedProcessorOptions |
discardExistingLeases(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.
|
Duration |
feedPollDelay()
Gets the delay in between polling a partition for new changes on the feed, after all current changes are drained.
|
ChangeFeedProcessorOptions |
feedPollDelay(Duration feedPollDelay)
Sets the delay in between polling a partition for new changes on the feed, after all current changes are drained.
|
Duration |
leaseAcquireInterval()
Gets the interval to kick off a task to compute if partitions are distributed evenly among known host instances.
|
ChangeFeedProcessorOptions |
leaseAcquireInterval(Duration leaseAcquireInterval)
Sets he interval to kick off a task to compute if partitions are distributed evenly among known host instances.
|
Duration |
leaseExpirationInterval()
Gets the interval for which the lease is taken on a lease representing a partition.
|
ChangeFeedProcessorOptions |
leaseExpirationInterval(Duration leaseExpirationInterval)
Sets the interval for which the lease is taken on a lease representing a partition.
|
String |
leasePrefix()
Gets a prefix to be used as part of the lease ID.
|
ChangeFeedProcessorOptions |
leasePrefix(String leasePrefix)
Sets a prefix to be used as part of the lease ID.
|
Duration |
leaseRenewInterval()
Gets the renew interval for all leases for partitions currently held by
ChangeFeedProcessor instance. |
ChangeFeedProcessorOptions |
leaseRenewInterval(Duration leaseRenewInterval)
Sets the renew interval for all leases for partitions currently held by
ChangeFeedProcessor instance. |
int |
maxItemCount()
Gets the maximum number of items to be returned in the enumeration operation in the Azure Cosmos DB service.
|
ChangeFeedProcessorOptions |
maxItemCount(int maxItemCount)
Sets the maximum number of items to be returned in the enumeration operation.
|
int |
maxScaleCount()
Gets the maximum number of partitions the host can serve.
|
ChangeFeedProcessorOptions |
maxScaleCount(int maxScaleCount)
Sets the maximum number of partitions the host can serve.
|
int |
minScaleCount()
Gets the minimum partition count for the host.
|
ChangeFeedProcessorOptions |
minScaleCount(int minScaleCount)
Sets the minimum partition count for the host.
|
String |
startContinuation()
Gets the start request continuation token to start looking for changes after.
|
ChangeFeedProcessorOptions |
startContinuation(String startContinuation)
Sets the start request continuation token to start looking for changes after.
|
boolean |
startFromBeginning()
Gets a value indicating whether change feed in the Azure Cosmos DB service should start from beginning (true)
or from current (false).
|
ChangeFeedProcessorOptions |
startFromBeginning(boolean startFromBeginning)
Sets a value indicating whether change feed in the Azure Cosmos DB service should start from beginning.
|
OffsetDateTime |
startTime()
Gets the time (exclusive) to start looking for changes after.
|
ChangeFeedProcessorOptions |
startTime(OffsetDateTime startTime)
Sets the time (exclusive) to start looking for changes after (UTC time).
|
public Duration leaseRenewInterval()
ChangeFeedProcessor
instance.public ChangeFeedProcessorOptions leaseRenewInterval(Duration leaseRenewInterval)
ChangeFeedProcessor
instance.leaseRenewInterval
- the renew interval for all leases for partitions currently held by ChangeFeedProcessor
instance.public Duration leaseAcquireInterval()
public ChangeFeedProcessorOptions leaseAcquireInterval(Duration leaseAcquireInterval)
leaseAcquireInterval
- he interval to kick off a task to compute if partitions are distributed evenly among known host instances.public 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.
public ChangeFeedProcessorOptions leaseExpirationInterval(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 feedPollDelay()
public ChangeFeedProcessorOptions feedPollDelay(Duration feedPollDelay)
feedPollDelay
- the delay in between polling a partition for new changes on the feed, after all current changes are drained.public String leasePrefix()
This can be used to support multiple instances of ChangeFeedProcessor
instances pointing at the same
feed while using the same auxiliary collection.
public ChangeFeedProcessorOptions leasePrefix(String leasePrefix)
leasePrefix
- a prefix to be used as part of the lease ID.public int maxItemCount()
public ChangeFeedProcessorOptions maxItemCount(int maxItemCount)
maxItemCount
- the maximum number of items to be returned in the enumeration operation.public 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.
public ChangeFeedProcessorOptions startContinuation(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 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.
public ChangeFeedProcessorOptions startTime(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 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.
public ChangeFeedProcessorOptions startFromBeginning(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 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.
public ChangeFeedProcessorOptions minScaleCount(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 maxScaleCount()
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 maxScaleCount(int maxScaleCount)
maxScaleCount
- the maximum number of partitions the host can serve.public boolean discardExistingLeases()
public ChangeFeedProcessorOptions discardExistingLeases(boolean discardExistingLeases)
discardExistingLeases
- Indicates whether to discard all existing leases if trueCopyright © 2019. All rights reserved.