PartitionManagerOptions Class
- java.
lang. Object - com.
microsoft. azure. eventprocessorhost. PartitionManagerOptions
- com.
public class PartitionManagerOptions
Field Summary
Modifier and Type | Field and Description |
---|---|
int | checkpointTimeoutInSeconds |
final int |
DefaultCheckpointTimeoutInSeconds
The default timeout for checkpoint operations. |
final int | DefaultFastScanIntervalInSeconds |
final int |
DefaultLeaseDurationInSeconds
The default duration after which a partition lease will expire unless renewed. |
final int |
DefaultLeaseRenewIntervalInSeconds
The default duration between lease renewals. |
final int | DefaultSlowScanIntervalInSeconds |
final int | DefaultStartupScanDelayInSeconds |
int | fastScanIntervalInSeconds |
int | leaseDurationInSeconds |
int | leaseRenewIntervalInSeconds |
int | slowScanIntervalInSeconds |
int | startupScanDelayInSeconds |
Constructor Summary
Constructor | Description | |
---|---|---|
PartitionManagerOptions() |
Method Summary
Modifier and Type | Method and Description |
---|---|
int |
getCheckpointTimeoutInSeconds()
Gets the timeout for checkpoint operations. Defaults to DefaultCheckpointTimeoutInSeconds. |
int |
getFastScanIntervalInSeconds()
There are two possible interval times between scans for available partitions, fast and slow. The fast (short) interval is used after a scan in which lease stealing has occurred, to promote quicker rebalancing. Defaults to DefaultFastScanIntervalInSeconds. |
int |
getLeaseDurationInSeconds()
Gets the duration after which a partition lease will expire unless renewed. Defaults to DefaultLeaseDurationInSeconds. |
int |
getLeaseRenewIntervalInSeconds()
Gets the duration between lease renewals. Defaults to DefaultLeaseRenewIntervalInSeconds. |
int |
getSlowScanIntervalInSeconds()
The slow (long) interval is used after a scan in which lease stealing did not occur, to reduce unnecessary scanning when the system is in steady state. Defaults to DefaultSlowScanIntervalInSeconds. |
int |
getStartupScanDelayInSeconds()
Gets the delay time between the first scan for available partitions and the second. This is part of a startup optimization which allows individual hosts to become visible to other hosts, and thereby get a more accurate count of the number of hosts in the system, before they try to estimate how many partitions they should own. Defaults to DefaultStartupScanDelayInSeconds. |
void |
setCheckpointTimeoutInSeconds(int timeout)
Sets the timeout for checkpoint operations. Must be greater than 0. |
void |
setFastScanIntervalInSeconds(int interval)
Sets the time for fast interval. |
void |
setLeaseDurationInSeconds(int duration)
Sets the duration after which a partition lease will expire unless renewed. Must be greater than 0 and should not be less than the renew interval. When using the default, Azure Storage-based ILeaseManager, the duration cannot be greater than 60. |
void |
setLeaseRenewIntervalInSeconds(int interval)
Sets the duration between lease renewals. Must be greater than 0 and less than the current lease duration. |
void |
setSlowScanIntervalInSeconds(int interval)
Sets the time for slow interval. |
void |
setStartupScanDelayInSeconds(int delay)
Sets the delay time in seconds between the first scan and the second. |
Field Details
checkpointTimeoutInSeconds
protected int checkpointTimeoutInSeconds= PartitionManagerOptions.DefaultCheckpointTimeoutInSeconds
DefaultCheckpointTimeoutInSeconds
public static final int DefaultCheckpointTimeoutInSeconds= 120
The default timeout for checkpoint operations.
DefaultFastScanIntervalInSeconds
public static final int DefaultFastScanIntervalInSeconds= 3
DefaultLeaseDurationInSeconds
public static final int DefaultLeaseDurationInSeconds= 30
The default duration after which a partition lease will expire unless renewed.
DefaultLeaseRenewIntervalInSeconds
public static final int DefaultLeaseRenewIntervalInSeconds= 10
The default duration between lease renewals.
DefaultSlowScanIntervalInSeconds
public static final int DefaultSlowScanIntervalInSeconds= 5
DefaultStartupScanDelayInSeconds
public static final int DefaultStartupScanDelayInSeconds= 30
fastScanIntervalInSeconds
protected int fastScanIntervalInSeconds= PartitionManagerOptions.DefaultFastScanIntervalInSeconds
leaseDurationInSeconds
protected int leaseDurationInSeconds= PartitionManagerOptions.DefaultLeaseDurationInSeconds
leaseRenewIntervalInSeconds
protected int leaseRenewIntervalInSeconds= PartitionManagerOptions.DefaultLeaseRenewIntervalInSeconds
slowScanIntervalInSeconds
protected int slowScanIntervalInSeconds= PartitionManagerOptions.DefaultSlowScanIntervalInSeconds
startupScanDelayInSeconds
protected int startupScanDelayInSeconds= PartitionManagerOptions.DefaultStartupScanDelayInSeconds
Constructor Details
PartitionManagerOptions
public PartitionManagerOptions()
Method Details
getCheckpointTimeoutInSeconds
public int getCheckpointTimeoutInSeconds()
Gets the timeout for checkpoint operations. Defaults to DefaultCheckpointTimeoutInSeconds.
Returns:
getFastScanIntervalInSeconds
public int getFastScanIntervalInSeconds()
There are two possible interval times between scans for available partitions, fast and slow. The fast (short) interval is used after a scan in which lease stealing has occurred, to promote quicker rebalancing.
Defaults to DefaultFastScanIntervalInSeconds.
Returns:
getLeaseDurationInSeconds
public int getLeaseDurationInSeconds()
Gets the duration after which a partition lease will expire unless renewed. Defaults to DefaultLeaseDurationInSeconds.
Returns:
getLeaseRenewIntervalInSeconds
public int getLeaseRenewIntervalInSeconds()
Gets the duration between lease renewals. Defaults to DefaultLeaseRenewIntervalInSeconds.
Returns:
getSlowScanIntervalInSeconds
public int getSlowScanIntervalInSeconds()
The slow (long) interval is used after a scan in which lease stealing did not occur, to reduce unnecessary scanning when the system is in steady state.
Defaults to DefaultSlowScanIntervalInSeconds.
Returns:
getStartupScanDelayInSeconds
public int getStartupScanDelayInSeconds()
Gets the delay time between the first scan for available partitions and the second. This is part of a startup optimization which allows individual hosts to become visible to other hosts, and thereby get a more accurate count of the number of hosts in the system, before they try to estimate how many partitions they should own.
Defaults to DefaultStartupScanDelayInSeconds.
Returns:
setCheckpointTimeoutInSeconds
public void setCheckpointTimeoutInSeconds(int timeout)
Sets the timeout for checkpoint operations. Must be greater than 0.
Parameters:
setFastScanIntervalInSeconds
public void setFastScanIntervalInSeconds(int interval)
Sets the time for fast interval.
Parameters:
setLeaseDurationInSeconds
public void setLeaseDurationInSeconds(int duration)
Sets the duration after which a partition lease will expire unless renewed. Must be greater than 0 and should not be less than the renew interval. When using the default, Azure Storage-based ILeaseManager, the duration cannot be greater than 60.
Parameters:
setLeaseRenewIntervalInSeconds
public void setLeaseRenewIntervalInSeconds(int interval)
Sets the duration between lease renewals. Must be greater than 0 and less than the current lease duration.
Parameters:
setSlowScanIntervalInSeconds
public void setSlowScanIntervalInSeconds(int interval)
Sets the time for slow interval.
Parameters:
setStartupScanDelayInSeconds
public void setStartupScanDelayInSeconds(int delay)
Sets the delay time in seconds between the first scan and the second.
Parameters:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for