org.soyatec.windows.azure.table
Class TableStorage

java.lang.Object
  extended by org.soyatec.windows.azure.table.TableStorage
Direct Known Subclasses:
TableStorageRest

public abstract class TableStorage
extends java.lang.Object

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. Users create a TableStorage object by calling the static Create() method passing account credential information to this method.


Field Summary
static RetryPolicy DefaultRetryPolicy
          The default retry policy
static TimeSpan DefaultTimeout
          The default timeout
 
Method Summary
static TableStorage create(StorageAccountInfo info)
          Creates a TableStorage service object.
static TableStorage create(java.net.URI baseUri, boolean usePathStyleUris, java.lang.String accountName, java.lang.String base64Key)
          Creates a TableStorage service object.
 java.lang.String getAccountName()
          Get the name of storage account
abstract  AzureTable getAzureTable(java.lang.String tableName)
          Get a reference to a Azure Table object with a specified name.
 java.lang.String getBase64Key()
          Get the authenticate key for of storage account
 java.net.URI getBaseUri()
          Get The base URI of the table storage service
 SharedKeyCredentials getCredentials()
          Set the credential
 RetryPolicy getRetryPolicy()
          Get the RetryPolicy
 TimeSpan getTimeout()
          Get time out per request
 boolean isUsePathStyleUris()
          Indicates whether to use/generate path-style or host-style URIs
abstract  java.util.List<java.lang.String> listTables()
          Lists all the tables under this service's URL
 void setBase64Key(java.lang.String base64Key)
          Set the authenticate key for of storage account
 void setCredentials(SharedKeyCredentials credentials)
          Get credential
 void setRetryPolicy(RetryPolicy retryPolicy)
          Set the RetryPolicy
 void setTimeout(TimeSpan timeout)
          Set timeout per request
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DefaultRetryPolicy

public static final RetryPolicy DefaultRetryPolicy
The default retry policy


DefaultTimeout

public static final TimeSpan DefaultTimeout
The default timeout

Method Detail

create

public static TableStorage create(java.net.URI baseUri,
                                  boolean usePathStyleUris,
                                  java.lang.String accountName,
                                  java.lang.String base64Key)
Creates a TableStorage service object. This object is the entry point into the table storage API.

Parameters:
baseUri - The base URI of the blob storage service
usePathStyleUris - If true, path-style URIs (http://baseuri/accountname/containername/objectname) are used. If false host-style URIs (http://accountname.baseuri/containername/objectname) are used, where baseuri is the URI of the service. If null, the choice is made automatically: path-style URIs if host name part of base URI is an IP addres, host-style otherwise.
accountName - The name of the storage account
base64Key - Authentication key used for signing requests
Returns:
A newly created TableStorage instance

create

public static TableStorage create(StorageAccountInfo info)
Creates a TableStorage service object. This object is the entry point into the table storage API.

Parameters:
info - StorageAccountInfo
Returns:
A newly created TableStorage instance

listTables

public abstract java.util.List<java.lang.String> listTables()
                                                     throws StorageException
Lists all the tables under this service's URL

Throws:
StorageException

getAzureTable

public abstract AzureTable getAzureTable(java.lang.String tableName)
Get a reference to a Azure Table object with a specified name. The method does not make call to a table service.

Parameters:
tableName - The name of the table
Returns:
A newly created table object

isUsePathStyleUris

public boolean isUsePathStyleUris()
Indicates whether to use/generate path-style or host-style URIs

Returns:

getBaseUri

public java.net.URI getBaseUri()
Get The base URI of the table storage service

Returns:

getAccountName

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

Returns:

getBase64Key

public java.lang.String getBase64Key()
Get the authenticate key for of storage account

Returns:

setBase64Key

public void setBase64Key(java.lang.String base64Key)
Set the authenticate key for of storage account

Parameters:
base64Key -

getRetryPolicy

public RetryPolicy getRetryPolicy()
Get the RetryPolicy

Returns:

setRetryPolicy

public void setRetryPolicy(RetryPolicy retryPolicy)
Set the RetryPolicy

Parameters:
retryPolicy -

getTimeout

public TimeSpan getTimeout()
Get time out per request

Returns:

setTimeout

public void setTimeout(TimeSpan timeout)
Set timeout per request

Parameters:
timeout -

getCredentials

public SharedKeyCredentials getCredentials()
Set the credential

Returns:

setCredentials

public void setCredentials(SharedKeyCredentials credentials)
Get credential

Parameters:
credentials -