882 строки
45 KiB
YAML
882 строки
45 KiB
YAML
### YamlMime:ManagedReference
|
|
items:
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager
|
|
id: _in_memory_lease_manager
|
|
parent: com.microsoft.azure.eventprocessorhost
|
|
children:
|
|
- com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.acquireLease(CompleteLease)
|
|
- com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.createAllLeasesIfNotExists(List<String>)
|
|
- com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.createLeaseStoreIfNotExists()
|
|
- com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.deleteLease(CompleteLease)
|
|
- com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.deleteLeaseStore()
|
|
- com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.getAllLeases()
|
|
- com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.getLease(String)
|
|
- com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.getLeaseDurationInMilliseconds()
|
|
- com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.initialize(HostContext)
|
|
- com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.InMemoryLeaseManager()
|
|
- com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.leaseStoreExists()
|
|
- com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.notifyOnSteal(String,String,Callable<?>)
|
|
- com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.releaseLease(CompleteLease)
|
|
- com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.renewLease(CompleteLease)
|
|
- com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.setLatency(long)
|
|
- com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.updateLease(CompleteLease)
|
|
href: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.yml
|
|
langs:
|
|
- java
|
|
name: InMemoryLeaseManager
|
|
nameWithType: InMemoryLeaseManager
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager
|
|
type: Class
|
|
source:
|
|
remote: &o0
|
|
path: azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/InMemoryLeaseManager.java
|
|
branch: master
|
|
repo: https://github.com/Azure/azure-event-hubs-java
|
|
path: azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/InMemoryLeaseManager.java
|
|
startLine: 34
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
syntax:
|
|
content: public class InMemoryLeaseManager implements ILeaseManager
|
|
inheritance:
|
|
- java.lang.Object
|
|
- com.microsoft.azure.eventprocessorhost._i_lease_manager
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.acquireLease(CompleteLease)
|
|
id: acquireLease(CompleteLease)
|
|
parent: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.yml
|
|
langs:
|
|
- java
|
|
name: acquireLease(CompleteLease lease)
|
|
nameWithType: InMemoryLeaseManager.acquireLease(CompleteLease lease)
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.acquireLease(CompleteLease lease)
|
|
overload: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.acquireLease*
|
|
type: Method
|
|
source:
|
|
remote: *o0
|
|
path: azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/InMemoryLeaseManager.java
|
|
startLine: 152
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
summary: >-
|
|
<p>Acquire the lease on the desired partition for this EventProcessorHost. </p>
|
|
|
|
<p>Note that it is legal to acquire a lease that is currently owned by another host, which is called "stealing". Lease-stealing is how partitions are redistributed when additional hosts are started. </p>
|
|
|
|
<p>The existing Azure Storage implementation can experience races between two host instances attempting to acquire or steal the lease at the same time. To avoid situations where two host instances both believe that they own the lease, acquisition can fail non-exceptionally by returning false and should do so when there is any doubt <ndash></ndash> the worst that can happen is that no host instance owns the lease for a short time. This is qualitatively different from, for example, the underlying store throwing an access exception, which is an error and should complete exceptionally.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<Boolean> acquireLease(CompleteLease lease)
|
|
parameters:
|
|
- id: lease
|
|
type: com.microsoft.azure.eventprocessorhost._complete_lease
|
|
description: <p>Lease info for the desired partition </p>
|
|
return:
|
|
type: 7e53ac82
|
|
description: <p>CompletableFuture { ->} true if the lease was acquired, false if not, completes exceptionally on error. </p>
|
|
overridden: com.microsoft.azure.eventprocessorhost._i_lease_manager.acquireLease(CompleteLease)
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.createAllLeasesIfNotExists(List<String>)
|
|
id: createAllLeasesIfNotExists(List<String>)
|
|
parent: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.yml
|
|
langs:
|
|
- java
|
|
name: createAllLeasesIfNotExists(List<String> partitionIds)
|
|
nameWithType: InMemoryLeaseManager.createAllLeasesIfNotExists(List<String> partitionIds)
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.createAllLeasesIfNotExists(List<String> partitionIds)
|
|
overload: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.createAllLeasesIfNotExists*
|
|
type: Method
|
|
source:
|
|
remote: *o0
|
|
path: azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/InMemoryLeaseManager.java
|
|
startLine: 113
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
summary: >-
|
|
<p>Create in the store a lease for each of the given partitions, if it does not exist. Do nothing for any lease which exists in the store already.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<Void> createAllLeasesIfNotExists(List<String> partitionIds)
|
|
parameters:
|
|
- id: partitionIds
|
|
type: 7d60c20e
|
|
description: <p>ids of partitions to create lease info for </p>
|
|
return:
|
|
type: db03ee24
|
|
description: <p>CompletableFuture { ->} null on success, completes exceptionally on error </p>
|
|
overridden: com.microsoft.azure.eventprocessorhost._i_lease_manager.createAllLeasesIfNotExists(List<String>)
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.createLeaseStoreIfNotExists()
|
|
id: createLeaseStoreIfNotExists()
|
|
parent: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.yml
|
|
langs:
|
|
- java
|
|
name: createLeaseStoreIfNotExists()
|
|
nameWithType: InMemoryLeaseManager.createLeaseStoreIfNotExists()
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.createLeaseStoreIfNotExists()
|
|
overload: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.createLeaseStoreIfNotExists*
|
|
type: Method
|
|
source:
|
|
remote: *o0
|
|
path: azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/InMemoryLeaseManager.java
|
|
startLine: 78
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
summary: >-
|
|
<p>Create the lease store if it does not exist, do nothing if it does exist.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<Void> createLeaseStoreIfNotExists()
|
|
return:
|
|
type: db03ee24
|
|
description: <p>CompletableFuture { ->} null on success, completes exceptionally on error. </p>
|
|
overridden: com.microsoft.azure.eventprocessorhost._i_lease_manager.createLeaseStoreIfNotExists()
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.deleteLease(CompleteLease)
|
|
id: deleteLease(CompleteLease)
|
|
parent: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.yml
|
|
langs:
|
|
- java
|
|
name: deleteLease(CompleteLease lease)
|
|
nameWithType: InMemoryLeaseManager.deleteLease(CompleteLease lease)
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.deleteLease(CompleteLease lease)
|
|
overload: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.deleteLease*
|
|
type: Method
|
|
source:
|
|
remote: *o0
|
|
path: azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/InMemoryLeaseManager.java
|
|
startLine: 144
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
summary: >-
|
|
<p>Delete the lease info for a partition from the store. If there is no stored lease for the given partition, that is treated as success.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<Void> deleteLease(CompleteLease lease)
|
|
parameters:
|
|
- id: lease
|
|
type: com.microsoft.azure.eventprocessorhost._complete_lease
|
|
description: <p>the currently existing lease info for the partition </p>
|
|
return:
|
|
type: db03ee24
|
|
description: <p>CompletableFuture { ->} null on success, completes exceptionally on error. </p>
|
|
overridden: com.microsoft.azure.eventprocessorhost._i_lease_manager.deleteLease(CompleteLease)
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.deleteLeaseStore()
|
|
id: deleteLeaseStore()
|
|
parent: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.yml
|
|
langs:
|
|
- java
|
|
name: deleteLeaseStore()
|
|
nameWithType: InMemoryLeaseManager.deleteLeaseStore()
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.deleteLeaseStore()
|
|
overload: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.deleteLeaseStore*
|
|
type: Method
|
|
source:
|
|
remote: *o0
|
|
path: azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/InMemoryLeaseManager.java
|
|
startLine: 86
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
summary: >-
|
|
<p>Deletes the lease store.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<Void> deleteLeaseStore()
|
|
return:
|
|
type: db03ee24
|
|
description: <p>CompletableFuture { ->} null on success, completes exceptionally on error. </p>
|
|
overridden: com.microsoft.azure.eventprocessorhost._i_lease_manager.deleteLeaseStore()
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.getAllLeases()
|
|
id: getAllLeases()
|
|
parent: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.yml
|
|
langs:
|
|
- java
|
|
name: getAllLeases()
|
|
nameWithType: InMemoryLeaseManager.getAllLeases()
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.getAllLeases()
|
|
overload: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.getAllLeases*
|
|
type: Method
|
|
source:
|
|
remote: *o0
|
|
path: azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/InMemoryLeaseManager.java
|
|
startLine: 102
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
summary: >-
|
|
<p>Returns lightweight BaseLease for all leases, which includes name of owning host and whether lease is expired. An implementation is free to return CompleteLease or its own class derived from CompleteLease, but it is important that getAllLeases run as fast as possible. If it is faster to obtain only the information required for a BaseLease, we heavily recommend doing that.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<List<BaseLease>> getAllLeases()
|
|
return:
|
|
type: 0eb76d20com.microsoft.azure.eventprocessorhost._base_leasee7daa122
|
|
description: <p>CompletableFuture { ->} list of BaseLease, completes exceptionally on error. </p>
|
|
overridden: com.microsoft.azure.eventprocessorhost._i_lease_manager.getAllLeases()
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.getLease(String)
|
|
id: getLease(String)
|
|
parent: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.yml
|
|
langs:
|
|
- java
|
|
name: getLease(String partitionId)
|
|
nameWithType: InMemoryLeaseManager.getLease(String partitionId)
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.getLease(String partitionId)
|
|
overload: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.getLease*
|
|
type: Method
|
|
source:
|
|
remote: *o0
|
|
path: azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/InMemoryLeaseManager.java
|
|
startLine: 94
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
summary: >-
|
|
<p>Returns the lease info for the given partition..</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<CompleteLease> getLease(String partitionId)
|
|
parameters:
|
|
- id: partitionId
|
|
type: "26831127"
|
|
description: <p>Get the lease info for this partition. </p>
|
|
return:
|
|
type: 9cdf14d0com.microsoft.azure.eventprocessorhost._complete_leasea08ddfce
|
|
description: <p>CompletableFuture { ->} Lease, completes exceptionally on error. </p>
|
|
overridden: com.microsoft.azure.eventprocessorhost._i_lease_manager.getLease(String)
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.getLeaseDurationInMilliseconds()
|
|
id: getLeaseDurationInMilliseconds()
|
|
parent: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.yml
|
|
langs:
|
|
- java
|
|
name: getLeaseDurationInMilliseconds()
|
|
nameWithType: InMemoryLeaseManager.getLeaseDurationInMilliseconds()
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.getLeaseDurationInMilliseconds()
|
|
overload: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.getLeaseDurationInMilliseconds*
|
|
type: Method
|
|
source:
|
|
remote: *o0
|
|
path: azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/InMemoryLeaseManager.java
|
|
startLine: 65
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
summary: >-
|
|
<p>The lease duration is mostly internal to the lease manager implementation but may be needed by other parts of the event processor host.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public int getLeaseDurationInMilliseconds()
|
|
return:
|
|
type: f75371fa
|
|
description: <p>Duration of a lease before it expires unless renewed, specified in milliseconds. </p>
|
|
overridden: com.microsoft.azure.eventprocessorhost._i_lease_manager.getLeaseDurationInMilliseconds()
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.initialize(HostContext)
|
|
id: initialize(HostContext)
|
|
parent: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.yml
|
|
langs:
|
|
- java
|
|
name: initialize(HostContext hostContext)
|
|
nameWithType: InMemoryLeaseManager.initialize(HostContext hostContext)
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.initialize(HostContext hostContext)
|
|
overload: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.initialize*
|
|
type: Method
|
|
source:
|
|
remote: *o0
|
|
path: azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/InMemoryLeaseManager.java
|
|
startLine: 44
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
syntax:
|
|
content: public void initialize(HostContext hostContext)
|
|
parameters:
|
|
- id: hostContext
|
|
type: 96d8d450
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.InMemoryLeaseManager()
|
|
id: InMemoryLeaseManager()
|
|
parent: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.yml
|
|
langs:
|
|
- java
|
|
name: InMemoryLeaseManager()
|
|
nameWithType: InMemoryLeaseManager.InMemoryLeaseManager()
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.InMemoryLeaseManager()
|
|
overload: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.InMemoryLeaseManager*
|
|
type: Constructor
|
|
source:
|
|
remote: *o0
|
|
path: azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/InMemoryLeaseManager.java
|
|
startLine: 39
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
syntax:
|
|
content: public InMemoryLeaseManager()
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.leaseStoreExists()
|
|
id: leaseStoreExists()
|
|
parent: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.yml
|
|
langs:
|
|
- java
|
|
name: leaseStoreExists()
|
|
nameWithType: InMemoryLeaseManager.leaseStoreExists()
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.leaseStoreExists()
|
|
overload: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.leaseStoreExists*
|
|
type: Method
|
|
source:
|
|
remote: *o0
|
|
path: azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/InMemoryLeaseManager.java
|
|
startLine: 70
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
summary: >-
|
|
<p>Does the lease store exist? </p>
|
|
|
|
<p>The returned CompletableFuture completes with true if the checkpoint store exists or false if it does not. It completes exceptionally on error.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<Boolean> leaseStoreExists()
|
|
return:
|
|
type: 7e53ac82
|
|
description: <p>CompletableFuture { ->} true if it exists, false if not </p>
|
|
overridden: com.microsoft.azure.eventprocessorhost._i_lease_manager.leaseStoreExists()
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.notifyOnSteal(String,String,Callable<?>)
|
|
id: notifyOnSteal(String,String,Callable<?>)
|
|
parent: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.yml
|
|
langs:
|
|
- java
|
|
name: notifyOnSteal(String expectedOwner, String partitionId, Callable<?> notifier)
|
|
nameWithType: InMemoryLeaseManager.notifyOnSteal(String expectedOwner, String partitionId, Callable<?> notifier)
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.notifyOnSteal(String expectedOwner, String partitionId, Callable<?> notifier)
|
|
overload: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.notifyOnSteal*
|
|
type: Method
|
|
source:
|
|
remote: *o0
|
|
path: azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/InMemoryLeaseManager.java
|
|
startLine: 201
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
syntax:
|
|
content: public void notifyOnSteal(String expectedOwner, String partitionId, Callable<?> notifier)
|
|
parameters:
|
|
- id: expectedOwner
|
|
type: "26831127"
|
|
- id: partitionId
|
|
type: "26831127"
|
|
- id: notifier
|
|
type: 5fc09e59
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.releaseLease(CompleteLease)
|
|
id: releaseLease(CompleteLease)
|
|
parent: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.yml
|
|
langs:
|
|
- java
|
|
name: releaseLease(CompleteLease lease)
|
|
nameWithType: InMemoryLeaseManager.releaseLease(CompleteLease lease)
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.releaseLease(CompleteLease lease)
|
|
overload: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.releaseLease*
|
|
type: Method
|
|
source:
|
|
remote: *o0
|
|
path: azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/InMemoryLeaseManager.java
|
|
startLine: 238
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
summary: >-
|
|
<p>Give up a lease currently held by this host. </p>
|
|
|
|
<p>If the lease has expired or been taken by another host, releasing it is unnecessary but will succeed since the intent has been fulfilled.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<Void> releaseLease(CompleteLease lease)
|
|
parameters:
|
|
- id: lease
|
|
type: com.microsoft.azure.eventprocessorhost._complete_lease
|
|
description: <p>Lease to be given up </p>
|
|
return:
|
|
type: db03ee24
|
|
description: <p>CompletableFuture { ->} null on success, completes exceptionally on error. </p>
|
|
overridden: com.microsoft.azure.eventprocessorhost._i_lease_manager.releaseLease(CompleteLease)
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.renewLease(CompleteLease)
|
|
id: renewLease(CompleteLease)
|
|
parent: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.yml
|
|
langs:
|
|
- java
|
|
name: renewLease(CompleteLease lease)
|
|
nameWithType: InMemoryLeaseManager.renewLease(CompleteLease lease)
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.renewLease(CompleteLease lease)
|
|
overload: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.renewLease*
|
|
type: Method
|
|
source:
|
|
remote: *o0
|
|
path: azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/InMemoryLeaseManager.java
|
|
startLine: 206
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
summary: >-
|
|
<p>Renew a lease currently held by this host instance. </p>
|
|
|
|
<p>If the lease has been taken by another host instance (either stolen or after expiration) or explicitly released, renewLease must return false. With the Azure Storage-based implementation, it IS possible to renew an expired lease that has not been taken by another host, so your implementation can allow that or not, whichever is convenient. If it does not, renewLease should return false.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<Boolean> renewLease(CompleteLease lease)
|
|
parameters:
|
|
- id: lease
|
|
type: com.microsoft.azure.eventprocessorhost._complete_lease
|
|
description: <p>Lease to be renewed </p>
|
|
return:
|
|
type: 7e53ac82
|
|
description: <p>true if the lease was renewed, false as described above, completes exceptionally on error. </p>
|
|
overridden: com.microsoft.azure.eventprocessorhost._i_lease_manager.renewLease(CompleteLease)
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.setLatency(long)
|
|
id: setLatency(long)
|
|
parent: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.yml
|
|
langs:
|
|
- java
|
|
name: setLatency(long milliseconds)
|
|
nameWithType: InMemoryLeaseManager.setLatency(long milliseconds)
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.setLatency(long milliseconds)
|
|
overload: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.setLatency*
|
|
type: Method
|
|
source:
|
|
remote: *o0
|
|
path: azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/InMemoryLeaseManager.java
|
|
startLine: 48
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
syntax:
|
|
content: public void setLatency(long milliseconds)
|
|
parameters:
|
|
- id: milliseconds
|
|
type: 0364520f
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.updateLease(CompleteLease)
|
|
id: updateLease(CompleteLease)
|
|
parent: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.yml
|
|
langs:
|
|
- java
|
|
name: updateLease(CompleteLease lease)
|
|
nameWithType: InMemoryLeaseManager.updateLease(CompleteLease lease)
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.updateLease(CompleteLease lease)
|
|
overload: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.updateLease*
|
|
type: Method
|
|
source:
|
|
remote: *o0
|
|
path: azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/InMemoryLeaseManager.java
|
|
startLine: 267
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
summary: >-
|
|
<p>Update the store with the information in the provided lease. </p>
|
|
|
|
<p>It is necessary to currently hold a lease in order to update it. If the lease has been stolen, or expired, or released, it cannot be updated. Lease manager implementations should renew the lease before performing the update to avoid lease expiration during the process.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<Boolean> updateLease(CompleteLease lease)
|
|
parameters:
|
|
- id: lease
|
|
type: com.microsoft.azure.eventprocessorhost._complete_lease
|
|
description: <p>New lease info to be stored </p>
|
|
return:
|
|
type: 7e53ac82
|
|
description: <p>true if the update was successful, false if lease was lost and could not be updated, completes exceptionally on error. </p>
|
|
overridden: com.microsoft.azure.eventprocessorhost._i_lease_manager.updateLease(CompleteLease)
|
|
references:
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.InMemoryLeaseManager*
|
|
name: InMemoryLeaseManager
|
|
nameWithType: InMemoryLeaseManager.InMemoryLeaseManager
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.InMemoryLeaseManager
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
- uid: 96d8d450
|
|
spec.java:
|
|
- name: HostContext
|
|
fullName: HostContext
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.initialize*
|
|
name: initialize
|
|
nameWithType: InMemoryLeaseManager.initialize
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.initialize
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
- uid: 0364520f
|
|
spec.java:
|
|
- name: long
|
|
fullName: long
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.setLatency*
|
|
name: setLatency
|
|
nameWithType: InMemoryLeaseManager.setLatency
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.setLatency
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
- uid: f75371fa
|
|
spec.java:
|
|
- name: int
|
|
fullName: int
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.getLeaseDurationInMilliseconds*
|
|
name: getLeaseDurationInMilliseconds
|
|
nameWithType: InMemoryLeaseManager.getLeaseDurationInMilliseconds
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.getLeaseDurationInMilliseconds
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
- uid: 7e53ac82
|
|
spec.java:
|
|
- name: CompletableFuture<Boolean>
|
|
fullName: CompletableFuture<Boolean>
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.leaseStoreExists*
|
|
name: leaseStoreExists
|
|
nameWithType: InMemoryLeaseManager.leaseStoreExists
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.leaseStoreExists
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
- uid: db03ee24
|
|
spec.java:
|
|
- name: CompletableFuture<Void>
|
|
fullName: CompletableFuture<Void>
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.createLeaseStoreIfNotExists*
|
|
name: createLeaseStoreIfNotExists
|
|
nameWithType: InMemoryLeaseManager.createLeaseStoreIfNotExists
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.createLeaseStoreIfNotExists
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.deleteLeaseStore*
|
|
name: deleteLeaseStore
|
|
nameWithType: InMemoryLeaseManager.deleteLeaseStore
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.deleteLeaseStore
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
- uid: "26831127"
|
|
spec.java:
|
|
- name: String
|
|
fullName: String
|
|
- uid: 9cdf14d0com.microsoft.azure.eventprocessorhost._complete_leasea08ddfce
|
|
spec.java:
|
|
- name: CompletableFuture<
|
|
fullName: CompletableFuture<
|
|
- uid: com.microsoft.azure.eventprocessorhost._complete_lease
|
|
name: CompleteLease
|
|
fullName: com.microsoft.azure.eventprocessorhost.CompleteLease
|
|
href: com.microsoft.azure.eventprocessorhost._complete_lease.yml
|
|
- name: '>'
|
|
fullName: '>'
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.getLease*
|
|
name: getLease
|
|
nameWithType: InMemoryLeaseManager.getLease
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.getLease
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
- uid: 0eb76d20com.microsoft.azure.eventprocessorhost._base_leasee7daa122
|
|
spec.java:
|
|
- name: CompletableFuture<List<
|
|
fullName: CompletableFuture<List<
|
|
- uid: com.microsoft.azure.eventprocessorhost._base_lease
|
|
name: BaseLease
|
|
fullName: com.microsoft.azure.eventprocessorhost.BaseLease
|
|
href: com.microsoft.azure.eventprocessorhost._base_lease.yml
|
|
- name: '>>'
|
|
fullName: '>>'
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.getAllLeases*
|
|
name: getAllLeases
|
|
nameWithType: InMemoryLeaseManager.getAllLeases
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.getAllLeases
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
- uid: 7d60c20e
|
|
spec.java:
|
|
- name: List<String>
|
|
fullName: List<String>
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.createAllLeasesIfNotExists*
|
|
name: createAllLeasesIfNotExists
|
|
nameWithType: InMemoryLeaseManager.createAllLeasesIfNotExists
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.createAllLeasesIfNotExists
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.deleteLease*
|
|
name: deleteLease
|
|
nameWithType: InMemoryLeaseManager.deleteLease
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.deleteLease
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.acquireLease*
|
|
name: acquireLease
|
|
nameWithType: InMemoryLeaseManager.acquireLease
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.acquireLease
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
- uid: 5fc09e59
|
|
spec.java:
|
|
- name: Callable<?>
|
|
fullName: Callable<?>
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.notifyOnSteal*
|
|
name: notifyOnSteal
|
|
nameWithType: InMemoryLeaseManager.notifyOnSteal
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.notifyOnSteal
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.renewLease*
|
|
name: renewLease
|
|
nameWithType: InMemoryLeaseManager.renewLease
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.renewLease
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.releaseLease*
|
|
name: releaseLease
|
|
nameWithType: InMemoryLeaseManager.releaseLease
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.releaseLease
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
- uid: com.microsoft.azure.eventprocessorhost._in_memory_lease_manager.updateLease*
|
|
name: updateLease
|
|
nameWithType: InMemoryLeaseManager.updateLease
|
|
fullName: com.microsoft.azure.eventprocessorhost.InMemoryLeaseManager.updateLease
|
|
package: com.microsoft.azure.eventprocessorhost
|
|
- uid: com.microsoft.azure.eventprocessorhost._i_lease_manager
|
|
parent: com.microsoft.azure.eventprocessorhost
|
|
href: com.microsoft.azure.eventprocessorhost._i_lease_manager.yml
|
|
name: ILeaseManager
|
|
nameWithType: ILeaseManager
|
|
fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager
|
|
type: Interface
|
|
syntax:
|
|
content: public interface ILeaseManager
|
|
- uid: com.microsoft.azure.eventprocessorhost._i_lease_manager.getLeaseDurationInMilliseconds()
|
|
parent: com.microsoft.azure.eventprocessorhost._i_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._i_lease_manager.yml
|
|
name: getLeaseDurationInMilliseconds()
|
|
nameWithType: ILeaseManager.getLeaseDurationInMilliseconds()
|
|
fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.getLeaseDurationInMilliseconds()
|
|
type: Method
|
|
summary: >-
|
|
<p>The lease duration is mostly internal to the lease manager implementation but may be needed by other parts of the event processor host.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public int getLeaseDurationInMilliseconds()
|
|
return:
|
|
type: f75371fa
|
|
description: <p>Duration of a lease before it expires unless renewed, specified in milliseconds. </p>
|
|
- uid: com.microsoft.azure.eventprocessorhost._i_lease_manager.leaseStoreExists()
|
|
parent: com.microsoft.azure.eventprocessorhost._i_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._i_lease_manager.yml
|
|
name: leaseStoreExists()
|
|
nameWithType: ILeaseManager.leaseStoreExists()
|
|
fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.leaseStoreExists()
|
|
type: Method
|
|
summary: >-
|
|
<p>Does the lease store exist? </p>
|
|
|
|
<p>The returned CompletableFuture completes with true if the checkpoint store exists or false if it does not. It completes exceptionally on error.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<Boolean> leaseStoreExists()
|
|
return:
|
|
type: 7e53ac82
|
|
description: <p>CompletableFuture { ->} true if it exists, false if not </p>
|
|
- uid: com.microsoft.azure.eventprocessorhost._i_lease_manager.createLeaseStoreIfNotExists()
|
|
parent: com.microsoft.azure.eventprocessorhost._i_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._i_lease_manager.yml
|
|
name: createLeaseStoreIfNotExists()
|
|
nameWithType: ILeaseManager.createLeaseStoreIfNotExists()
|
|
fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.createLeaseStoreIfNotExists()
|
|
type: Method
|
|
summary: >-
|
|
<p>Create the lease store if it does not exist, do nothing if it does exist.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<Void> createLeaseStoreIfNotExists()
|
|
return:
|
|
type: db03ee24
|
|
description: <p>CompletableFuture { ->} null on success, completes exceptionally on error. </p>
|
|
- uid: com.microsoft.azure.eventprocessorhost._i_lease_manager.deleteLeaseStore()
|
|
parent: com.microsoft.azure.eventprocessorhost._i_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._i_lease_manager.yml
|
|
name: deleteLeaseStore()
|
|
nameWithType: ILeaseManager.deleteLeaseStore()
|
|
fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.deleteLeaseStore()
|
|
type: Method
|
|
summary: >-
|
|
<p>Deletes the lease store.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<Void> deleteLeaseStore()
|
|
return:
|
|
type: db03ee24
|
|
description: <p>CompletableFuture { ->} null on success, completes exceptionally on error. </p>
|
|
- uid: com.microsoft.azure.eventprocessorhost._complete_lease
|
|
parent: com.microsoft.azure.eventprocessorhost
|
|
href: com.microsoft.azure.eventprocessorhost._complete_lease.yml
|
|
name: CompleteLease
|
|
nameWithType: CompleteLease
|
|
fullName: com.microsoft.azure.eventprocessorhost.CompleteLease
|
|
type: Class
|
|
summary: >-
|
|
<p>CompleteLease class is public so that advanced users can implement an ILeaseManager. Unless you are implementing ILeaseManager you should not have to deal with objects of this class or derived classes directly. </p>
|
|
|
|
<p>CompleteLease carries around complete information about a lease. By itself, it has the epoch. Any lease manager implementation can derive from this class to add data which the lease manager needs to function <ndash></ndash> see AzureBlobLease for an example. Having two distinct classes allows the code to clearly express which variety of lease any variable holds or a method requires, and avoids the problem of accidentally supplying a lightweight BaseLease to a method which needs the lease-manager-specific fields. </p>
|
|
syntax:
|
|
content: public class CompleteLease extends BaseLease
|
|
- uid: com.microsoft.azure.eventprocessorhost._i_lease_manager.getLease(String)
|
|
parent: com.microsoft.azure.eventprocessorhost._i_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._i_lease_manager.yml
|
|
name: getLease(String partitionId)
|
|
nameWithType: ILeaseManager.getLease(String partitionId)
|
|
fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.getLease(String partitionId)
|
|
type: Method
|
|
summary: >-
|
|
<p>Returns the lease info for the given partition..</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<CompleteLease> getLease(String partitionId)
|
|
parameters:
|
|
- id: partitionId
|
|
type: "26831127"
|
|
description: <p>Get the lease info for this partition. </p>
|
|
return:
|
|
type: 9cdf14d0com.microsoft.azure.eventprocessorhost._complete_leasea08ddfce
|
|
description: <p>CompletableFuture { ->} Lease, completes exceptionally on error. </p>
|
|
- uid: com.microsoft.azure.eventprocessorhost._base_lease
|
|
parent: com.microsoft.azure.eventprocessorhost
|
|
href: com.microsoft.azure.eventprocessorhost._base_lease.yml
|
|
name: BaseLease
|
|
nameWithType: BaseLease
|
|
fullName: com.microsoft.azure.eventprocessorhost.BaseLease
|
|
type: Class
|
|
summary: >-
|
|
<p>BaseLease class is public so that advanced users can implement an ILeaseManager. Unless you are implementing ILeaseManager you should not have to deal with objects of this class or derived classes directly. </p>
|
|
|
|
<p>This lightweight base exists to allow ILeaseManager.getAllLeases to operate as quickly as possible <ndash></ndash> for some lease manager implementations, loading the entire contents of a lease form the store may be expensive. BaseLease contains only the minimum amount of information required to allow PartitionScanner to operate. </p>
|
|
|
|
<p>Note that a Lease object just carries information about a partition lease. The APIs to acquire/renew/release a lease are all on ILeaseManager. </p>
|
|
syntax:
|
|
content: public class BaseLease
|
|
- uid: com.microsoft.azure.eventprocessorhost._i_lease_manager.getAllLeases()
|
|
parent: com.microsoft.azure.eventprocessorhost._i_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._i_lease_manager.yml
|
|
name: getAllLeases()
|
|
nameWithType: ILeaseManager.getAllLeases()
|
|
fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.getAllLeases()
|
|
type: Method
|
|
summary: >-
|
|
<p>Returns lightweight BaseLease for all leases, which includes name of owning host and whether lease is expired. An implementation is free to return CompleteLease or its own class derived from CompleteLease, but it is important that getAllLeases run as fast as possible. If it is faster to obtain only the information required for a BaseLease, we heavily recommend doing that.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<List<BaseLease>> getAllLeases()
|
|
return:
|
|
type: 0eb76d20com.microsoft.azure.eventprocessorhost._base_leasee7daa122
|
|
description: <p>CompletableFuture { ->} list of BaseLease, completes exceptionally on error. </p>
|
|
- uid: com.microsoft.azure.eventprocessorhost._i_lease_manager.createAllLeasesIfNotExists(List<String>)
|
|
parent: com.microsoft.azure.eventprocessorhost._i_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._i_lease_manager.yml
|
|
name: createAllLeasesIfNotExists(List<String> partitionIds)
|
|
nameWithType: ILeaseManager.createAllLeasesIfNotExists(List<String> partitionIds)
|
|
fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.createAllLeasesIfNotExists(List<String> partitionIds)
|
|
type: Method
|
|
summary: >-
|
|
<p>Create in the store a lease for each of the given partitions, if it does not exist. Do nothing for any lease which exists in the store already.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<Void> createAllLeasesIfNotExists(List<String> partitionIds)
|
|
parameters:
|
|
- id: partitionIds
|
|
type: 7d60c20e
|
|
description: <p>ids of partitions to create lease info for </p>
|
|
return:
|
|
type: db03ee24
|
|
description: <p>CompletableFuture { ->} null on success, completes exceptionally on error </p>
|
|
- uid: com.microsoft.azure.eventprocessorhost._i_lease_manager.deleteLease(CompleteLease)
|
|
parent: com.microsoft.azure.eventprocessorhost._i_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._i_lease_manager.yml
|
|
name: deleteLease(CompleteLease lease)
|
|
nameWithType: ILeaseManager.deleteLease(CompleteLease lease)
|
|
fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.deleteLease(CompleteLease lease)
|
|
type: Method
|
|
summary: >-
|
|
<p>Delete the lease info for a partition from the store. If there is no stored lease for the given partition, that is treated as success.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<Void> deleteLease(CompleteLease lease)
|
|
parameters:
|
|
- id: lease
|
|
type: com.microsoft.azure.eventprocessorhost._complete_lease
|
|
description: <p>the currently existing lease info for the partition </p>
|
|
return:
|
|
type: db03ee24
|
|
description: <p>CompletableFuture { ->} null on success, completes exceptionally on error. </p>
|
|
- uid: com.microsoft.azure.eventprocessorhost._i_lease_manager.acquireLease(CompleteLease)
|
|
parent: com.microsoft.azure.eventprocessorhost._i_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._i_lease_manager.yml
|
|
name: acquireLease(CompleteLease lease)
|
|
nameWithType: ILeaseManager.acquireLease(CompleteLease lease)
|
|
fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.acquireLease(CompleteLease lease)
|
|
type: Method
|
|
summary: >-
|
|
<p>Acquire the lease on the desired partition for this EventProcessorHost. </p>
|
|
|
|
<p>Note that it is legal to acquire a lease that is currently owned by another host, which is called "stealing". Lease-stealing is how partitions are redistributed when additional hosts are started. </p>
|
|
|
|
<p>The existing Azure Storage implementation can experience races between two host instances attempting to acquire or steal the lease at the same time. To avoid situations where two host instances both believe that they own the lease, acquisition can fail non-exceptionally by returning false and should do so when there is any doubt <ndash></ndash> the worst that can happen is that no host instance owns the lease for a short time. This is qualitatively different from, for example, the underlying store throwing an access exception, which is an error and should complete exceptionally.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<Boolean> acquireLease(CompleteLease lease)
|
|
parameters:
|
|
- id: lease
|
|
type: com.microsoft.azure.eventprocessorhost._complete_lease
|
|
description: <p>Lease info for the desired partition </p>
|
|
return:
|
|
type: 7e53ac82
|
|
description: <p>CompletableFuture { ->} true if the lease was acquired, false if not, completes exceptionally on error. </p>
|
|
- uid: com.microsoft.azure.eventprocessorhost._i_lease_manager.renewLease(CompleteLease)
|
|
parent: com.microsoft.azure.eventprocessorhost._i_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._i_lease_manager.yml
|
|
name: renewLease(CompleteLease lease)
|
|
nameWithType: ILeaseManager.renewLease(CompleteLease lease)
|
|
fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.renewLease(CompleteLease lease)
|
|
type: Method
|
|
summary: >-
|
|
<p>Renew a lease currently held by this host instance. </p>
|
|
|
|
<p>If the lease has been taken by another host instance (either stolen or after expiration) or explicitly released, renewLease must return false. With the Azure Storage-based implementation, it IS possible to renew an expired lease that has not been taken by another host, so your implementation can allow that or not, whichever is convenient. If it does not, renewLease should return false.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<Boolean> renewLease(CompleteLease lease)
|
|
parameters:
|
|
- id: lease
|
|
type: com.microsoft.azure.eventprocessorhost._complete_lease
|
|
description: <p>Lease to be renewed </p>
|
|
return:
|
|
type: 7e53ac82
|
|
description: <p>true if the lease was renewed, false as described above, completes exceptionally on error. </p>
|
|
- uid: com.microsoft.azure.eventprocessorhost._i_lease_manager.releaseLease(CompleteLease)
|
|
parent: com.microsoft.azure.eventprocessorhost._i_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._i_lease_manager.yml
|
|
name: releaseLease(CompleteLease lease)
|
|
nameWithType: ILeaseManager.releaseLease(CompleteLease lease)
|
|
fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.releaseLease(CompleteLease lease)
|
|
type: Method
|
|
summary: >-
|
|
<p>Give up a lease currently held by this host. </p>
|
|
|
|
<p>If the lease has expired or been taken by another host, releasing it is unnecessary but will succeed since the intent has been fulfilled.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<Void> releaseLease(CompleteLease lease)
|
|
parameters:
|
|
- id: lease
|
|
type: com.microsoft.azure.eventprocessorhost._complete_lease
|
|
description: <p>Lease to be given up </p>
|
|
return:
|
|
type: db03ee24
|
|
description: <p>CompletableFuture { ->} null on success, completes exceptionally on error. </p>
|
|
- uid: com.microsoft.azure.eventprocessorhost._i_lease_manager.updateLease(CompleteLease)
|
|
parent: com.microsoft.azure.eventprocessorhost._i_lease_manager
|
|
href: com.microsoft.azure.eventprocessorhost._i_lease_manager.yml
|
|
name: updateLease(CompleteLease lease)
|
|
nameWithType: ILeaseManager.updateLease(CompleteLease lease)
|
|
fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.updateLease(CompleteLease lease)
|
|
type: Method
|
|
summary: >-
|
|
<p>Update the store with the information in the provided lease. </p>
|
|
|
|
<p>It is necessary to currently hold a lease in order to update it. If the lease has been stolen, or expired, or released, it cannot be updated. Lease manager implementations should renew the lease before performing the update to avoid lease expiration during the process.</p>
|
|
|
|
<p></p>
|
|
syntax:
|
|
content: public CompletableFuture<Boolean> updateLease(CompleteLease lease)
|
|
parameters:
|
|
- id: lease
|
|
type: com.microsoft.azure.eventprocessorhost._complete_lease
|
|
description: <p>New lease info to be stored </p>
|
|
return:
|
|
type: 7e53ac82
|
|
description: <p>true if the update was successful, false if lease was lost and could not be updated, completes exceptionally on error. </p>
|