org.soyatec.windowsazure.table
Interface ITable


public interface ITable

API entry point for using structured storage.

The underlying usage pattern is designed to be similar to the one used in blob and queue services in this library.


Method Summary
 ICloudTableColumn createCloudTableColumn(java.lang.String name, java.lang.String value, ETableColumnType type)
          Create a ICloudTableColumn.
 boolean createTable()
          Creates a new table in the service
 ITableServiceEntity createTableServiceEntity(java.lang.String partitionKey, java.lang.String rowKey, java.util.List<ICloudTableColumn> values)
          Create a ITableServiceEntity with partitionKey, rowKey and a list of ICloudTableColumn
 ITableServiceEntity createTableServiceEntity(java.lang.String partitionKey, java.lang.String rowKey, java.sql.Timestamp timestamp)
          Create a ITableServiceEntity with partitionKey, rowKey and timestamp
 boolean deleteTable()
          Deletes a table from the service.
 java.lang.String getAccountName()
          Get the name of the storage account
 java.net.URI getBaseUri()
          Get the base uri of the table service
 IRetryPolicy getRetryPolicy()
          Get the retry policy used for retrying requests
 java.lang.String getTableName()
          Get the name of specified table.
 TableServiceContext getTableServiceContext()
           
 org.soyatec.windowsazure.internal.util.TimeSpan getTimeout()
          Get the timeout per requeet
 boolean isTableExist()
          Checks whether a table with the same name already exists.
 boolean isUsePathStyleUris()
          Whether use/generate path-style or host-style URIs
 void setRetryPolicy(IRetryPolicy retryPolicy)
          Set the IRetryPolicy userd for retrying requests
 void setTimeout(org.soyatec.windowsazure.internal.util.TimeSpan timeout)
          Set timeout per request
 

Method Detail

createTable

boolean createTable()
Creates a new table in the service


isTableExist

boolean isTableExist()
Checks whether a table with the same name already exists.

Returns:
True if the table already exists.

deleteTable

boolean deleteTable()
Deletes a table from the service.

When a table is successfully deleted, it is immediately marked for deletion and is no longer accessible to clients. The table is later removed from the Table service during garbage collection.

Note that deleting a table is likely to take at least 40 seconds to complete. If an operation is attempted against the table while it was being deleted, the service returns status code 409 (Conflict), with additional error information indicating that the table is being deleted.

Parameters:
tableName - The name of the table to be deleted

createCloudTableColumn

ICloudTableColumn createCloudTableColumn(java.lang.String name,
                                         java.lang.String value,
                                         ETableColumnType type)
Create a ICloudTableColumn.

Parameters:
name -
value -
type -
Returns:

createTableServiceEntity

ITableServiceEntity createTableServiceEntity(java.lang.String partitionKey,
                                             java.lang.String rowKey,
                                             java.util.List<ICloudTableColumn> values)
Create a ITableServiceEntity with partitionKey, rowKey and a list of ICloudTableColumn

Parameters:
partitionKey -
rowKey -
values -
Returns:

createTableServiceEntity

ITableServiceEntity createTableServiceEntity(java.lang.String partitionKey,
                                             java.lang.String rowKey,
                                             java.sql.Timestamp timestamp)
Create a ITableServiceEntity with partitionKey, rowKey and timestamp

Parameters:
partitionKey -
rowKey -
timestamp -
Returns:

getBaseUri

java.net.URI getBaseUri()
Get the base uri of the table service

Returns:

getAccountName

java.lang.String getAccountName()
Get the name of the storage account

Returns:

getTableName

java.lang.String getTableName()
Get the name of specified table.

Returns:

isUsePathStyleUris

boolean isUsePathStyleUris()
Whether use/generate path-style or host-style URIs

Returns:

getTimeout

org.soyatec.windowsazure.internal.util.TimeSpan getTimeout()
Get the timeout per requeet

Returns:

getRetryPolicy

IRetryPolicy getRetryPolicy()
Get the retry policy used for retrying requests

Returns:

setTimeout

void setTimeout(org.soyatec.windowsazure.internal.util.TimeSpan timeout)
Set timeout per request

Parameters:
timeout -

setRetryPolicy

void setRetryPolicy(IRetryPolicy retryPolicy)
Set the IRetryPolicy userd for retrying requests

Parameters:
retryPolicy -

getTableServiceContext

TableServiceContext getTableServiceContext()