azure-docs-sdk-java/archive/docs-ref-autogen/com.microsoft.azure.eventpr...

195 строки
13 KiB
YAML

### YamlMime:JavaType
methods:
- fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.acquireLease(CompleteLease lease)
name: acquireLease(CompleteLease lease)
nameWithType: ILeaseManager.acquireLease(CompleteLease lease)
parameters:
- description: <p>Lease info for the desired partition </p>
name: lease
type: <xref href="com.microsoft.azure.eventprocessorhost.CompleteLease?alt=com.microsoft.azure.eventprocessorhost.CompleteLease&text=CompleteLease" data-throw-if-not-resolved="False"/>
returns:
description: <p>CompletableFuture { -&gt;} true if the lease was acquired, false if not, completes exceptionally on error. </p>
type: <xref href="CompletableFuture%3CBoolean%3E?alt=CompletableFuture%3CBoolean%3E&text=CompletableFuture%3CBoolean%3E" data-throw-if-not-resolved="False"/>
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: public CompletableFuture<Boolean> acquireLease(CompleteLease lease)
uid: com.microsoft.azure.eventprocessorhost.ILeaseManager.acquireLease(CompleteLease)
- fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.createAllLeasesIfNotExists(List<String> partitionIds)
name: createAllLeasesIfNotExists(List<String> partitionIds)
nameWithType: ILeaseManager.createAllLeasesIfNotExists(List<String> partitionIds)
parameters:
- description: <p>ids of partitions to create lease info for </p>
name: partitionIds
type: <xref href="List%3CString%3E?alt=List%3CString%3E&text=List%3CString%3E" data-throw-if-not-resolved="False"/>
returns:
description: <p>CompletableFuture { -&gt;} null on success, completes exceptionally on error </p>
type: <xref href="CompletableFuture%3CVoid%3E?alt=CompletableFuture%3CVoid%3E&text=CompletableFuture%3CVoid%3E" data-throw-if-not-resolved="False"/>
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: public CompletableFuture<Void> createAllLeasesIfNotExists(List<String> partitionIds)
uid: com.microsoft.azure.eventprocessorhost.ILeaseManager.createAllLeasesIfNotExists(List<String>)
- fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.createLeaseStoreIfNotExists()
name: createLeaseStoreIfNotExists()
nameWithType: ILeaseManager.createLeaseStoreIfNotExists()
returns:
description: <p>CompletableFuture { -&gt;} null on success, completes exceptionally on error. </p>
type: <xref href="CompletableFuture%3CVoid%3E?alt=CompletableFuture%3CVoid%3E&text=CompletableFuture%3CVoid%3E" data-throw-if-not-resolved="False"/>
summary: >-
<p>Create the lease store if it does not exist, do nothing if it does exist.</p>
<p></p>
syntax: public CompletableFuture<Void> createLeaseStoreIfNotExists()
uid: com.microsoft.azure.eventprocessorhost.ILeaseManager.createLeaseStoreIfNotExists()
- fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.deleteLease(CompleteLease lease)
name: deleteLease(CompleteLease lease)
nameWithType: ILeaseManager.deleteLease(CompleteLease lease)
parameters:
- description: <p>the currently existing lease info for the partition </p>
name: lease
type: <xref href="com.microsoft.azure.eventprocessorhost.CompleteLease?alt=com.microsoft.azure.eventprocessorhost.CompleteLease&text=CompleteLease" data-throw-if-not-resolved="False"/>
returns:
description: <p>CompletableFuture { -&gt;} null on success, completes exceptionally on error. </p>
type: <xref href="CompletableFuture%3CVoid%3E?alt=CompletableFuture%3CVoid%3E&text=CompletableFuture%3CVoid%3E" data-throw-if-not-resolved="False"/>
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: public CompletableFuture<Void> deleteLease(CompleteLease lease)
uid: com.microsoft.azure.eventprocessorhost.ILeaseManager.deleteLease(CompleteLease)
- fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.deleteLeaseStore()
name: deleteLeaseStore()
nameWithType: ILeaseManager.deleteLeaseStore()
returns:
description: <p>CompletableFuture { -&gt;} null on success, completes exceptionally on error. </p>
type: <xref href="CompletableFuture%3CVoid%3E?alt=CompletableFuture%3CVoid%3E&text=CompletableFuture%3CVoid%3E" data-throw-if-not-resolved="False"/>
summary: >-
<p>Deletes the lease store.</p>
<p></p>
syntax: public CompletableFuture<Void> deleteLeaseStore()
uid: com.microsoft.azure.eventprocessorhost.ILeaseManager.deleteLeaseStore()
- fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.getAllLeases()
name: getAllLeases()
nameWithType: ILeaseManager.getAllLeases()
returns:
description: <p>CompletableFuture { -&gt;} list of BaseLease, completes exceptionally on error. </p>
type: CompletableFuture&lt;List&lt;<xref href="com.microsoft.azure.eventprocessorhost.BaseLease?alt=com.microsoft.azure.eventprocessorhost.BaseLease&text=BaseLease" data-throw-if-not-resolved="False"/>&gt;&gt;
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: public CompletableFuture<List<BaseLease>> getAllLeases()
uid: com.microsoft.azure.eventprocessorhost.ILeaseManager.getAllLeases()
- fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.getLease(String partitionId)
name: getLease(String partitionId)
nameWithType: ILeaseManager.getLease(String partitionId)
parameters:
- description: <p>Get the lease info for this partition. </p>
name: partitionId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
returns:
description: <p>CompletableFuture { -&gt;} Lease, completes exceptionally on error. </p>
type: CompletableFuture&lt;<xref href="com.microsoft.azure.eventprocessorhost.CompleteLease?alt=com.microsoft.azure.eventprocessorhost.CompleteLease&text=CompleteLease" data-throw-if-not-resolved="False"/>&gt;
summary: >-
<p>Returns the lease info for the given partition..</p>
<p></p>
syntax: public CompletableFuture<CompleteLease> getLease(String partitionId)
uid: com.microsoft.azure.eventprocessorhost.ILeaseManager.getLease(String)
- fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.getLeaseDurationInMilliseconds()
name: getLeaseDurationInMilliseconds()
nameWithType: ILeaseManager.getLeaseDurationInMilliseconds()
returns:
description: <p>Duration of a lease before it expires unless renewed, specified in milliseconds. </p>
type: <xref href="int?alt=int&text=int" data-throw-if-not-resolved="False"/>
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: public int getLeaseDurationInMilliseconds()
uid: com.microsoft.azure.eventprocessorhost.ILeaseManager.getLeaseDurationInMilliseconds()
- fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.leaseStoreExists()
name: leaseStoreExists()
nameWithType: ILeaseManager.leaseStoreExists()
returns:
description: <p>CompletableFuture { -&gt;} true if it exists, false if not </p>
type: <xref href="CompletableFuture%3CBoolean%3E?alt=CompletableFuture%3CBoolean%3E&text=CompletableFuture%3CBoolean%3E" data-throw-if-not-resolved="False"/>
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: public CompletableFuture<Boolean> leaseStoreExists()
uid: com.microsoft.azure.eventprocessorhost.ILeaseManager.leaseStoreExists()
- fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.releaseLease(CompleteLease lease)
name: releaseLease(CompleteLease lease)
nameWithType: ILeaseManager.releaseLease(CompleteLease lease)
parameters:
- description: <p>Lease to be given up </p>
name: lease
type: <xref href="com.microsoft.azure.eventprocessorhost.CompleteLease?alt=com.microsoft.azure.eventprocessorhost.CompleteLease&text=CompleteLease" data-throw-if-not-resolved="False"/>
returns:
description: <p>CompletableFuture { -&gt;} null on success, completes exceptionally on error. </p>
type: <xref href="CompletableFuture%3CVoid%3E?alt=CompletableFuture%3CVoid%3E&text=CompletableFuture%3CVoid%3E" data-throw-if-not-resolved="False"/>
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: public CompletableFuture<Void> releaseLease(CompleteLease lease)
uid: com.microsoft.azure.eventprocessorhost.ILeaseManager.releaseLease(CompleteLease)
- fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.renewLease(CompleteLease lease)
name: renewLease(CompleteLease lease)
nameWithType: ILeaseManager.renewLease(CompleteLease lease)
parameters:
- description: <p>Lease to be renewed </p>
name: lease
type: <xref href="com.microsoft.azure.eventprocessorhost.CompleteLease?alt=com.microsoft.azure.eventprocessorhost.CompleteLease&text=CompleteLease" data-throw-if-not-resolved="False"/>
returns:
description: <p>true if the lease was renewed, false as described above, completes exceptionally on error. </p>
type: <xref href="CompletableFuture%3CBoolean%3E?alt=CompletableFuture%3CBoolean%3E&text=CompletableFuture%3CBoolean%3E" data-throw-if-not-resolved="False"/>
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: public CompletableFuture<Boolean> renewLease(CompleteLease lease)
uid: com.microsoft.azure.eventprocessorhost.ILeaseManager.renewLease(CompleteLease)
- fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager.updateLease(CompleteLease lease)
name: updateLease(CompleteLease lease)
nameWithType: ILeaseManager.updateLease(CompleteLease lease)
parameters:
- description: <p>New lease info to be stored </p>
name: lease
type: <xref href="com.microsoft.azure.eventprocessorhost.CompleteLease?alt=com.microsoft.azure.eventprocessorhost.CompleteLease&text=CompleteLease" data-throw-if-not-resolved="False"/>
returns:
description: <p>true if the update was successful, false if lease was lost and could not be updated, completes exceptionally on error. </p>
type: <xref href="CompletableFuture%3CBoolean%3E?alt=CompletableFuture%3CBoolean%3E&text=CompletableFuture%3CBoolean%3E" data-throw-if-not-resolved="False"/>
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: public CompletableFuture<Boolean> updateLease(CompleteLease lease)
uid: com.microsoft.azure.eventprocessorhost.ILeaseManager.updateLease(CompleteLease)
nameWithType: ILeaseManager
syntax: public interface ILeaseManager
type: interface
uid: com.microsoft.azure.eventprocessorhost.ILeaseManager
fullName: com.microsoft.azure.eventprocessorhost.ILeaseManager
name: ILeaseManager
package: com.microsoft.azure.eventprocessorhost
metadata: {}