public class DistributeRule extends AbstractModel
header, skipSign
Constructor and Description |
---|
DistributeRule() |
DistributeRule(DistributeRule source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
Modifier and Type | Method and Description |
---|---|
String[] |
getColumns()
Get Column name.
|
String |
getDbPattern()
Get Database name matching rule, please fill in the regular expression.Note: This field may return null, indicating that no valid values can be obtained.
|
String |
getRuleType()
Get Rule type.
|
String |
getTablePattern()
Get Table name matching rule.
|
void |
setColumns(String[] Columns)
Set Column name.
|
void |
setDbPattern(String DbPattern)
Set Database name matching rule, please fill in the regular expression.Note: This field may return null, indicating that no valid values can be obtained.
|
void |
setRuleType(String RuleType)
Set Rule type.
|
void |
setTablePattern(String TablePattern)
Set Table name matching rule.
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
public DistributeRule()
public DistributeRule(DistributeRule source)
public String getRuleType()
public void setRuleType(String RuleType)
RuleType
- Rule type. Valid values for non-mongo products: table (partitioned by table name); pk (partitioned by table name + primary key); cols (partitioned by column name). Valid values for mongo: collection (partitioned by collection name); collectionAndObjectId (partitioned by collection + primary key). Note: This field may return null, indicating that no valid values can be obtained.public String getDbPattern()
public void setDbPattern(String DbPattern)
DbPattern
- Database name matching rule, please fill in the regular expression.Note: This field may return null, indicating that no valid values can be obtained.public String getTablePattern()
public void setTablePattern(String TablePattern)
TablePattern
- Table name matching rule. If DatabaseType is mongodb, it matches the collection name.Note: This field may return null, indicating that no valid values can be obtained.public String[] getColumns()
public void setColumns(String[] Columns)
Columns
- Column name. This field is required if RuleType is cols. The subscription task will use the value of this column to calculate the partition. Mongo does not partition by column, so there is no need to pass this field.Note: This field may return null, indicating that no valid values can be obtained.Copyright © 2025. All rights reserved.