|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.aliyun.openservices.ots.OTSClient
public class OTSClient
访问阿里云开放结构化数据服务(Open Table Service, OTS)的入口类。
| 构造方法摘要 | |
|---|---|
OTSClient(String accessKeyId,
String accessKeySecret)
使用默认的OTS Endpoint和默认配置构造一个新的 OTSClient实例。 |
|
OTSClient(String endpoint,
String accessKeyId,
String accessKeySecret)
使用指定的OTS Endpoint和默认配置构造一个新的 OTSClient实例。 |
|
OTSClient(String endpoint,
String accessKeyId,
String accessKeySecret,
ClientConfiguration config)
使用指定的OTS Endpoint和配置构造一个新的 OTSClient实例。 |
|
| 方法摘要 | |
|---|---|
void |
abortTransaction(String transactionId)
撤销一个事务(Transaction),撤销后所有在此事务中的操作都被取消,撤销后此事务ID失效。 |
void |
batchModifyData(String tableName,
Collection<RowChange> rowChanges,
String transactionId)
把PutData和/或DeleteData的多次调用组合成一个调用。 |
void |
commitTransaction(String transactionId)
确认并提交事务(Transaction),提交后此事务ID失效。 |
void |
createTable(TableMeta tableMeta)
创建表(Table)及其相关视图(View)。 |
void |
createTableGroup(String tableGroupName,
PartitionKeyType pkType)
创建表组(Table Group)。 |
void |
deleteData(String tableName,
RowDeleteChange rowChange,
String transactionId)
删除指定行或行中的数据。 |
void |
deleteTable(String tableName)
删除表(Table)及与此表一起创建的视图(View)。 |
void |
deleteTableGroup(String tableGroupName)
删除表组(Table Group)及属于该表组的相关表(Table)和视图(View)。 |
URI |
getEndpoint()
返回访问的OTS Endpoint。 |
Row |
getRow(SingleRowQueryCriteria criteria,
String transactionId)
返回表(Table)或视图(View)中的一行数据。 |
List<Row> |
getRowsByOffset(OffsetRowQueryCriteria criteria,
String transactionId)
返回表(Table)或视图(View)的指定偏移量开始的多行数据。 |
List<Row> |
getRowsByRange(RangeRowQueryCriteria criteria,
String transactionId)
返回表(Table)或视图(View)中主键(Primary Key)的特定范围内的多行数据。 |
RowListing |
getRowsByRange(RangeRowQueryCriteria criteria,
String transactionId,
String nextToken)
返回表(Table)或视图(View)中主键(Primary Key)的特定范围内的多行数据。 |
TableMeta |
getTableMeta(String tableName)
返回表(Table)的结构信息。 |
List<String> |
listTableGroups()
返回表组(Table Group)名的列表。 |
List<String> |
listTables()
返回表(Table)名的列表。 |
void |
putData(String tableName,
RowPutChange rowChange,
String transactionId)
插入一行或修改指定行中的数据。 |
String |
startTransaction(String entityName,
PartitionKeyValue pkValue)
在表(Table)或表组(Table Group)上开始一个事务(Transaction),并得到该事务ID。 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public OTSClient(String accessKeyId,
String accessKeySecret)
OTSClient实例。
accessKeyId - 访问OTS服务的Access Key ID。accessKeySecret - 访问OTS服务的Access Key Secret。
public OTSClient(String endpoint,
String accessKeyId,
String accessKeySecret)
OTSClient实例。
endpoint - OTS服务的endpoint。accessKeyId - 访问OTS服务的Access ID。accessKeySecret - 访问OTS服务的Access Key。
public OTSClient(String endpoint,
String accessKeyId,
String accessKeySecret,
ClientConfiguration config)
OTSClient实例。
endpoint - OTS服务的endpoint。accessKeyId - 访问OTS服务的Access ID。accessKeySecret - 访问OTS服务的Access Key。config - 客户端配置信息(ClientConfiguration)。
如果传入null则使用默认配置。| 方法详细信息 |
|---|
public URI getEndpoint()
public void createTableGroup(String tableGroupName,
PartitionKeyType pkType)
throws OTSException,
ClientException
OTS 复制的描述
OTS 中的 createTableGrouptableGroupName - 表组名称。pkType - 表组的数据分片键的数据类型。
OTSException - OTS访问返回错误消息
ClientException - 请求的返回结果无效,
或由于网络原因请求失败,
或访问超时。
public List<String> listTableGroups()
throws OTSException,
ClientException
OTS 复制的描述
OTS 中的 listTableGroupsOTSException - OTS访问返回错误消息
ClientException - 请求的返回结果无效,
或由于网络原因请求失败,
或访问超时。
public void deleteTableGroup(String tableGroupName)
throws OTSException,
ClientException
OTS 复制的描述
OTS 中的 deleteTableGrouptableGroupName - 表组名。
OTSException - OTS访问返回错误消息
ClientException - 请求的返回结果无效,
或由于网络原因请求失败,
或访问超时。
public void createTable(TableMeta tableMeta)
throws OTSException,
ClientException
OTS 复制的描述
OTS 中的 createTabletableMeta - 表及相关视图的结构信息。
OTSException - OTS访问返回错误消息
ClientException - 请求的返回结果无效,
或由于网络原因请求失败,
或访问超时。
public TableMeta getTableMeta(String tableName)
throws OTSException,
ClientException
OTS 复制的描述
OTS 中的 getTableMetatableName - 表名。
OTSException - OTS访问返回错误消息
ClientException - 请求的返回结果无效,
或由于网络原因请求失败,
或访问超时。
public List<String> listTables()
throws OTSException,
ClientException
OTS 复制的描述
OTS 中的 listTablesOTSException - OTS访问返回错误消息
ClientException - 请求的返回结果无效,
或由于网络原因请求失败,
或访问超时。
public void deleteTable(String tableName)
throws OTSException,
ClientException
OTS 复制的描述
OTS 中的 deleteTabletableName - 表名。
OTSException - OTS访问返回错误消息
ClientException - 请求的返回结果无效,
或由于网络原因请求失败,
或访问超时。
public String startTransaction(String entityName,
PartitionKeyValue pkValue)
throws OTSException,
ClientException
OTS 复制的描述
OTS 中的 startTransactionentityName - 表名或表组名。pkValue - 表示事务(Transaction)建立在哪个数据分片键(Partition Key)上。
OTSException - OTS访问返回错误消息
ClientException - 请求的返回结果无效,
或由于网络原因请求失败,
或访问超时。
public void commitTransaction(String transactionId)
throws OTSException,
ClientException
OTS 复制的描述
OTS 中的 commitTransactiontransactionId - 事务ID。
OTSException - OTS访问返回错误消息
ClientException - 请求的返回结果无效,
或由于网络原因请求失败,
或访问超时。
public void abortTransaction(String transactionId)
throws OTSException,
ClientException
OTS 复制的描述
OTS 中的 abortTransactiontransactionId - 事务ID。
OTSException - OTS访问返回错误消息
ClientException - 请求的返回结果无效,
或由于网络原因请求失败,
或访问超时。
public Row getRow(SingleRowQueryCriteria criteria,
String transactionId)
throws OTSException,
ClientException
OTS 复制的描述
OTS 中的 getRowcriteria - 查询条件。transactionId - 事务ID,不为空时操作在事务中进行。
OTSException - OTS访问返回错误消息
ClientException - 请求的返回结果无效,
或由于网络原因请求失败,
或访问超时。
public List<Row> getRowsByOffset(OffsetRowQueryCriteria criteria,
String transactionId)
throws OTSException,
ClientException
OTS 复制的描述
OTS 中的 getRowsByOffsetcriteria - 查询条件。transactionId - 事务ID,不为空时操作在事务中进行。
OTSException - OTS访问返回错误消息
ClientException - 请求的返回结果无效,
或由于网络原因请求失败,
或访问超时。
public List<Row> getRowsByRange(RangeRowQueryCriteria criteria,
String transactionId)
throws OTSException,
ClientException
OTS 复制的描述
OTS 中的 getRowsByRangecriteria - 查询条件。transactionId - 事务ID,不为空时操作在事务中进行。
OTSException - OTS访问返回错误消息
ClientException - 请求的返回结果无效,
或由于网络原因请求失败,
或访问超时。
public RowListing getRowsByRange(RangeRowQueryCriteria criteria,
String transactionId,
String nextToken)
throws OTSException,
ClientException
OTS 复制的描述
OTS 中的 getRowsByRangecriteria - 查询条件。transactionId - 事务ID,不为空时操作在事务中进行。nextToken - 查找的断点,当nextToken为null时,则为请求开始
OTSException - OTS访问返回错误消息
ClientException - 请求的返回结果无效,
或由于网络原因请求失败,
或访问超时。
public void putData(String tableName,
RowPutChange rowChange,
String transactionId)
throws OTSException,
ClientException
OTS 复制的描述
OTS 中的 putDatatableName - 数据所在表(Table)的名称。rowChange - 表示数据的修改信息。transactionId - 事务ID,不为空时操作在事务中进行。
OTSException - OTS访问返回错误消息
ClientException - 请求的返回结果无效,
或由于网络原因请求失败,
或访问超时。
public void deleteData(String tableName,
RowDeleteChange rowChange,
String transactionId)
throws OTSException,
ClientException
OTS 复制的描述
OTS 中的 deleteDatatableName - 数据所在表(Table)的名称。rowChange - 表示数据的删除信息。
OTSException - OTS访问返回错误消息
ClientException - 请求的返回结果无效,
或由于网络原因请求失败,
或访问超时。
public void batchModifyData(String tableName,
Collection<RowChange> rowChanges,
String transactionId)
throws OTSException,
ClientException
OTS 复制的描述
OTS 中的 batchModifyDatatableName - 数据所在表(Table)的名称。rowChanges - 表示数据的修改信息。
集合中可以包含RowPutChange和RowDeleteChange的实例。
OTSException - OTS访问返回错误消息
ClientException - 请求的返回结果无效,
或由于网络原因请求失败,
或访问超时。
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||