public class CreateTableRequest extends Object implements Request
setTableMeta(TableMeta) 来更改表的Meta。
在初始化实例之后,可以通过调用setReservedThroughput(ReservedThroughput) 来更改表的预留吞吐量。
在初始化实例之后,可以通过调用setTableOptions(TableOptions) 来更改表的配置。| Constructor and Description |
|---|
CreateTableRequest(TableMeta tableMeta,
TableOptions tableOptions)
初始化CreateTableRequest实例。
|
CreateTableRequest(TableMeta tableMeta,
TableOptions tableOptions,
List<IndexMeta> indexMeta) |
CreateTableRequest(TableMeta tableMeta,
TableOptions tableOptions,
ReservedThroughput reservedThroughput) |
CreateTableRequest(TableMeta tableMeta,
TableOptions tableOptions,
ReservedThroughput reservedThroughput,
List<IndexMeta> indexMeta) |
| Modifier and Type | Method and Description |
|---|---|
void |
addIndex(IndexMeta indexMeta)
添加索引表
|
void |
addIndex(IndexMeta[] indexMetas)
添加索引表
|
List<IndexMeta> |
getIndexMetaList()
返回索引表meta列表
|
String |
getOperationName() |
ReservedThroughput |
getReservedThroughput()
获取表的预留吞吐量。
|
SSESpecification |
getSseSpecification()
获取服务器端加密的配置参数
|
StreamSpecification |
getStreamSpecification()
获取Stream的配置参数
|
TableMeta |
getTableMeta()
获取表的结构信息。
|
TableOptions |
getTableOptions()
获取表的配置参数。
|
boolean |
hasLocalTxnSet()
是否显式设置了本地事务开关
|
boolean |
isLocalTxnEnabled()
获取本地事务开关,如果未设置则抛出异常
|
void |
setLocalTxnEnabled(boolean enableLocalTxn)
设置本地事务开关
|
void |
setReservedThroughput(ReservedThroughput reservedThroughput)
设置表的预留吞吐量。
|
void |
setSseSpecification(SSESpecification sseSpecification)
设置服务器端加密的配置参数
|
void |
setStreamSpecification(StreamSpecification streamSpecification)
设置Stream的配置参数
|
void |
setTableMeta(TableMeta tableMeta)
设置表的结构信息。
|
void |
setTableOptions(TableOptions tableOptions)
设置表的配置参数。
|
public CreateTableRequest(TableMeta tableMeta, TableOptions tableOptions)
表的预留吞吐量和表的配置都会采用默认值,若有需求需要定制更改,可以调用相应的设置函数。
表默认将不进行任何预切分,若需要对表的分区进行设置,可以调用相应的设置函数。
tableMeta - 表的结构信息。public CreateTableRequest(TableMeta tableMeta, TableOptions tableOptions, ReservedThroughput reservedThroughput)
public CreateTableRequest(TableMeta tableMeta, TableOptions tableOptions, List<IndexMeta> indexMeta)
public CreateTableRequest(TableMeta tableMeta, TableOptions tableOptions, ReservedThroughput reservedThroughput, List<IndexMeta> indexMeta)
public String getOperationName()
getOperationName in interface Requestpublic TableMeta getTableMeta()
public void setTableMeta(TableMeta tableMeta)
tableMeta - 表的结构信息public ReservedThroughput getReservedThroughput()
public void setReservedThroughput(ReservedThroughput reservedThroughput)
reservedThroughput - 表的预留吞吐量。public TableOptions getTableOptions()
public void setTableOptions(TableOptions tableOptions)
tableOptions - 表的配置。public StreamSpecification getStreamSpecification()
public void setStreamSpecification(StreamSpecification streamSpecification)
streamSpecification - public SSESpecification getSseSpecification()
public void setSseSpecification(SSESpecification sseSpecification)
sseSpecification - public void addIndex(IndexMeta[] indexMetas)
indexMetas - 索引表metapublic void addIndex(IndexMeta indexMeta)
indexMeta - 索引表metapublic boolean hasLocalTxnSet()
public void setLocalTxnEnabled(boolean enableLocalTxn)
enableLocalTxn - 本地事务开关public boolean isLocalTxnEnabled()
Copyright © 2024. All Rights Reserved.