public final class TableAsyncClient extends Object
TableClientBuilder.buildAsyncClient() method on a
TableClientBuilder object.| Modifier and Type | Method and Description |
|---|---|
Mono<Void> |
create()
Creates the table within the Tables service.
|
TableAsyncBatch |
createBatch(String partitionKey)
Creates a new
TableAsyncBatch object. |
Mono<Void> |
createEntity(TableEntity entity)
Inserts an entity into the table.
|
Mono<com.azure.core.http.rest.Response<Void>> |
createEntityWithResponse(TableEntity entity)
Inserts an entity into the table.
|
Mono<com.azure.core.http.rest.Response<Void>> |
createWithResponse()
Creates the table within the Tables service.
|
Mono<Void> |
delete()
Deletes the table within the Tables service.
|
Mono<Void> |
deleteEntity(String partitionKey,
String rowKey)
Deletes an entity from the table.
|
Mono<Void> |
deleteEntity(String partitionKey,
String rowKey,
String eTag)
Deletes an entity from the table.
|
Mono<com.azure.core.http.rest.Response<Void>> |
deleteEntityWithResponse(String partitionKey,
String rowKey,
String eTag)
Deletes an entity from the table.
|
Mono<com.azure.core.http.rest.Response<Void>> |
deleteWithResponse()
Deletes the table within the Tables service.
|
String |
getAccountName()
Gets the name of the account containing the table.
|
TablesServiceVersion |
getApiVersion()
Gets the REST API version used by this client.
|
Mono<TableEntity> |
getEntity(String partitionKey,
String rowKey)
Gets a single entity from the table.
|
<T extends TableEntity> |
getEntity(String partitionKey,
String rowKey,
Class<T> resultType)
Gets a single entity from the table.
|
Mono<TableEntity> |
getEntity(String partitionKey,
String rowKey,
String select)
Gets a single entity from the table.
|
<T extends TableEntity> |
getEntity(String partitionKey,
String rowKey,
String select,
Class<T> resultType)
Gets a single entity from the table.
|
Mono<com.azure.core.http.rest.Response<TableEntity>> |
getEntityWithResponse(String partitionKey,
String rowKey,
String select)
Gets a single entity from the table.
|
<T extends TableEntity> |
getEntityWithResponse(String partitionKey,
String rowKey,
String select,
Class<T> resultType)
Gets a single entity from the table.
|
String |
getTableName()
Gets the name of the table.
|
String |
getTableUrl()
Gets the absolute URL for this table.
|
com.azure.core.http.rest.PagedFlux<TableEntity> |
listEntities()
Lists all entities within the table.
|
<T extends TableEntity> |
listEntities(Class<T> resultType)
Lists all entities within the table.
|
com.azure.core.http.rest.PagedFlux<TableEntity> |
listEntities(ListEntitiesOptions options)
Lists entities using the parameters in the provided options.
|
<T extends TableEntity> |
listEntities(ListEntitiesOptions options,
Class<T> resultType)
Lists entities using the parameters in the provided options.
|
Mono<Void> |
updateEntity(TableEntity entity)
Updates an existing entity by merging the provided entity with the existing entity.
|
Mono<Void> |
updateEntity(TableEntity entity,
UpdateMode updateMode)
Updates an existing entity using the specified update mode.
|
Mono<Void> |
updateEntity(TableEntity entity,
UpdateMode updateMode,
boolean ifUnchanged)
Updates an existing entity using the specified update mode.
|
Mono<com.azure.core.http.rest.Response<Void>> |
updateEntityWithResponse(TableEntity entity,
UpdateMode updateMode,
boolean ifUnchanged)
Updates an existing entity using the specified update mode.
|
Mono<Void> |
upsertEntity(TableEntity entity)
Inserts an entity into the table if it does not exist, or merges the entity with the existing entity otherwise.
|
Mono<Void> |
upsertEntity(TableEntity entity,
UpdateMode updateMode)
Inserts an entity into the table if it does not exist, or updates the existing entity using the specified update
mode otherwise.
|
Mono<com.azure.core.http.rest.Response<Void>> |
upsertEntityWithResponse(TableEntity entity,
UpdateMode updateMode)
Inserts an entity into the table if it does not exist, or updates the existing entity using the specified update
mode otherwise.
|
public String getTableName()
public String getAccountName()
public String getTableUrl()
public TablesServiceVersion getApiVersion()
public TableAsyncBatch createBatch(String partitionKey)
TableAsyncBatch object. Batch objects allow you to enqueue multiple create, update, upsert,
and/or delete operations on entities that share the same partition key. When the batch is executed, all of the
operations will be performed as part of a single transaction. As a result, either all operations in the batch
will succeed, or if a failure occurs, all operations in the batch will be rolled back. Each operation in a batch
must operate on a distinct row key. Attempting to add multiple operations to a batch that share the same row key
will cause an exception to be thrown.partitionKey - The partition key shared by all operations in the batch.IllegalArgumentException - if the provided partition key is null or empty.public Mono<Void> create()
com.azure.data.tables.implementation.models.TableServiceErrorException - if a table with the same name already exists within the service.public Mono<com.azure.core.http.rest.Response<Void>> createWithResponse()
com.azure.data.tables.implementation.models.TableServiceErrorException - if a table with the same name already exists within the service.public Mono<Void> createEntity(TableEntity entity)
entity - The entity to insert.com.azure.data.tables.implementation.models.TableServiceErrorException - if an entity with the same partition key and row key already exists within the
table.IllegalArgumentException - if the provided entity is invalid.public Mono<com.azure.core.http.rest.Response<Void>> createEntityWithResponse(TableEntity entity)
entity - The entity to insert.com.azure.data.tables.implementation.models.TableServiceErrorException - if an entity with the same partition key and row key already exists within the
table.IllegalArgumentException - if the provided entity is invalid.public Mono<Void> upsertEntity(TableEntity entity)
entity - The entity to upsert.IllegalArgumentException - if the provided entity is invalid.public Mono<Void> upsertEntity(TableEntity entity, UpdateMode updateMode)
entity - The entity to upsert.updateMode - The type of update to perform if the entity already exits.IllegalArgumentException - if the provided entity is invalid.public Mono<com.azure.core.http.rest.Response<Void>> upsertEntityWithResponse(TableEntity entity, UpdateMode updateMode)
entity - The entity to upsert.updateMode - The type of update to perform if the entity already exits.IllegalArgumentException - if the provided entity is invalid.public Mono<Void> updateEntity(TableEntity entity)
entity - The entity to update.com.azure.data.tables.implementation.models.TableServiceErrorException - if no entity with the same partition key and row key exists within the table.IllegalArgumentException - if the provided entity is invalid.public Mono<Void> updateEntity(TableEntity entity, UpdateMode updateMode)
entity - The entity to update.updateMode - The type of update to perform.com.azure.data.tables.implementation.models.TableServiceErrorException - if no entity with the same partition key and row key exists within the table.IllegalArgumentException - if the provided entity is invalid.public Mono<Void> updateEntity(TableEntity entity, UpdateMode updateMode, boolean ifUnchanged)
entity - The entity to update.updateMode - The type of update to perform.ifUnchanged - When true, the eTag of the provided entity must match the eTag of the entity in the Table
service. If the values do not match, the update will not occur and an exception will be
thrown.com.azure.data.tables.implementation.models.TableServiceErrorException - if no entity with the same partition key and row key exists within the table,
or if ifUnchanged is true and the existing entity's eTag does
not match that of the provided entity.IllegalArgumentException - if the provided entity is invalid.public Mono<com.azure.core.http.rest.Response<Void>> updateEntityWithResponse(TableEntity entity, UpdateMode updateMode, boolean ifUnchanged)
entity - The entity to update.updateMode - The type of update to perform.ifUnchanged - When true, the eTag of the provided entity must match the eTag of the entity in the Table
service. If the values do not match, the update will not occur and an exception will be
thrown.com.azure.data.tables.implementation.models.TableServiceErrorException - if no entity with the same partition key and row key exists within the table,
or if ifUnchanged is true and the existing entity's eTag does
not match that of the provided entity.IllegalArgumentException - if the provided entity is invalid.public Mono<Void> delete()
com.azure.data.tables.implementation.models.TableServiceErrorException - if no table with this name exists within the service.public Mono<com.azure.core.http.rest.Response<Void>> deleteWithResponse()
com.azure.data.tables.implementation.models.TableServiceErrorException - if no table with this name exists within the service.public Mono<Void> deleteEntity(String partitionKey, String rowKey)
partitionKey - The partition key of the entity.rowKey - The row key of the entity.com.azure.data.tables.implementation.models.TableServiceErrorException - if no entity with the provided partition key and row key exists within the
table.IllegalArgumentException - if the provided partition key or row key are null or empty.public Mono<Void> deleteEntity(String partitionKey, String rowKey, String eTag)
partitionKey - The partition key of the entity.rowKey - The row key of the entity.eTag - The value to compare with the eTag of the entity in the Tables service. If the values do not match,
the delete will not occur and an exception will be thrown.com.azure.data.tables.implementation.models.TableServiceErrorException - if no entity with the provided partition key and row key exists within the
table, or if eTag is not null and the existing entity's eTag
does not match that of the provided entity.IllegalArgumentException - if the provided partition key or row key are null or empty.public Mono<com.azure.core.http.rest.Response<Void>> deleteEntityWithResponse(String partitionKey, String rowKey, String eTag)
partitionKey - The partition key of the entity.rowKey - The row key of the entity.eTag - The value to compare with the eTag of the entity in the Tables service. If the values do not match,
the delete will not occur and an exception will be thrown.com.azure.data.tables.implementation.models.TableServiceErrorException - if no entity with the provided partition key and row key exists within the
table, or if eTag is not null and the existing entity's eTag
does not match that of the provided entity.IllegalArgumentException - if the provided partition key or row key are null or empty.public com.azure.core.http.rest.PagedFlux<TableEntity> listEntities()
public com.azure.core.http.rest.PagedFlux<TableEntity> listEntities(ListEntitiesOptions options)
options - The `filter`, `select`, and `top` OData query options to apply to this operation.IllegalArgumentException - if one or more of the OData query options in options is malformed.public <T extends TableEntity> com.azure.core.http.rest.PagedFlux<T> listEntities(Class<T> resultType)
T - The type of the result value, which must be a subclass of TableEntity.resultType - The type of the result value, which must be a subclass of TableEntity.IllegalArgumentException - if an instance of the provided resultType can't be created.public <T extends TableEntity> com.azure.core.http.rest.PagedFlux<T> listEntities(ListEntitiesOptions options, Class<T> resultType)
T - The type of the result value, which must be a subclass of TableEntity.options - The `filter`, `select`, and `top` OData query options to apply to this operation.resultType - The type of the result value, which must be a subclass of TableEntity.IllegalArgumentException - if one or more of the OData query options in options is malformed, or if
an instance of the provided resultType can't be created.public Mono<TableEntity> getEntity(String partitionKey, String rowKey)
partitionKey - The partition key of the entity.rowKey - The partition key of the entity.com.azure.data.tables.implementation.models.TableServiceErrorException - if no entity with the provided partition key and row key exists within the
table.IllegalArgumentException - if the provided partition key or row key are null or empty.public Mono<TableEntity> getEntity(String partitionKey, String rowKey, String select)
partitionKey - The partition key of the entity.rowKey - The partition key of the entity.select - An OData `select` expression to limit the set of properties included in the returned entity.com.azure.data.tables.implementation.models.TableServiceErrorException - if no entity with the provided partition key and row key exists within the
table.IllegalArgumentException - if the provided partition key or row key are null or empty, or if the
select OData query option is malformed.public <T extends TableEntity> Mono<T> getEntity(String partitionKey, String rowKey, Class<T> resultType)
T - The type of the result value, which must be a subclass of TableEntity.partitionKey - The partition key of the entity.rowKey - The partition key of the entity.resultType - The type of the result value, which must be a subclass of TableEntity.com.azure.data.tables.implementation.models.TableServiceErrorException - if no entity with the provided partition key and row key exists within the
table.IllegalArgumentException - if the provided partition key or row key are null or empty, or if an
instance of the provided resultType can't be created.public <T extends TableEntity> Mono<T> getEntity(String partitionKey, String rowKey, String select, Class<T> resultType)
T - The type of the result value, which must be a subclass of TableEntity.partitionKey - The partition key of the entity.rowKey - The partition key of the entity.select - An OData `select` expression to limit the set of properties included in the returned entity.resultType - The type of the result value, which must be a subclass of TableEntity.com.azure.data.tables.implementation.models.TableServiceErrorException - if no entity with the provided partition key and row key exists within the
table.IllegalArgumentException - if the provided partition key or row key are null or empty, if the
select OData query option is malformed, or if an instance of the
provided resultType can't be created.public Mono<com.azure.core.http.rest.Response<TableEntity>> getEntityWithResponse(String partitionKey, String rowKey, String select)
partitionKey - The partition key of the entity.rowKey - The partition key of the entity.select - An OData `select` expression to limit the set of properties included in the returned entity.com.azure.data.tables.implementation.models.TableServiceErrorException - if no entity with the provided partition key and row key exists within the
table.IllegalArgumentException - if the provided partition key or row key are null or empty, or if the
select OData query option is malformed.public <T extends TableEntity> Mono<com.azure.core.http.rest.Response<T>> getEntityWithResponse(String partitionKey, String rowKey, String select, Class<T> resultType)
T - The type of the result value, which must be a subclass of TableEntity.partitionKey - The partition key of the entity.rowKey - The partition key of the entity.select - An OData `select` expression to limit the set of properties included in the returned entity.resultType - The type of the result value, which must be a subclass of TableEntity.com.azure.data.tables.implementation.models.TableServiceErrorException - if no entity with the provided partition key and row key exists within the
table.IllegalArgumentException - if the provided partition key or row key are null or empty, if the
select OData query option is malformed, or if an instance of the
provided resultType can't be created.Copyright © 2021 Microsoft Corporation. All rights reserved.