mirror of
https://gitee.com/BDWare/common
synced 2025-04-27 14:32:18 +00:00
feat: add SelfAdaptiveShardingExecutor
add new type of multi-point contract "SelfAdaptiveSharding"
This commit is contained in:
parent
5ed245459c
commit
2cfd82bb4b
@ -4,6 +4,7 @@ import org.bdware.sc.event.REvent;
|
||||
import org.bdware.sc.node.AnnotationNode;
|
||||
import org.bdware.sc.node.YjsType;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@ -12,7 +13,7 @@ public class ContractDesp {
|
||||
public String contractID;
|
||||
public String contractName;
|
||||
public Map<String, REvent.REventSemantics> events;
|
||||
public List<FunctionDesp> exportedFunctions;
|
||||
public Collection<FunctionDesp> exportedFunctions;
|
||||
public ContractExecType type;
|
||||
public YjsType yjsType;
|
||||
public List<AnnotationNode> annotations;
|
||||
|
@ -9,7 +9,8 @@ public enum ContractExecType implements Serializable {
|
||||
RequestAllResponseFirst,
|
||||
RequestAllResponseHalf,
|
||||
RequestAllResponseAll,
|
||||
Sharding;//分片执行模式
|
||||
Sharding,//分片执行模式
|
||||
SelfAdaptiveSharding; // self-adaptive sharding
|
||||
|
||||
public static ContractExecType getContractTypeByInt(int i) {
|
||||
ContractExecType[] values = ContractExecType.values();
|
||||
@ -25,10 +26,6 @@ public enum ContractExecType implements Serializable {
|
||||
case RequestOnce:
|
||||
case ResponseOnce:
|
||||
return false;
|
||||
case RequestAllResponseAll:
|
||||
case RequestAllResponseFirst:
|
||||
case RequestAllResponseHalf:
|
||||
case Sharding:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user