mirror of
https://gitee.com/BDWare/common
synced 2025-04-27 22:42:19 +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.AnnotationNode;
|
||||||
import org.bdware.sc.node.YjsType;
|
import org.bdware.sc.node.YjsType;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -12,7 +13,7 @@ public class ContractDesp {
|
|||||||
public String contractID;
|
public String contractID;
|
||||||
public String contractName;
|
public String contractName;
|
||||||
public Map<String, REvent.REventSemantics> events;
|
public Map<String, REvent.REventSemantics> events;
|
||||||
public List<FunctionDesp> exportedFunctions;
|
public Collection<FunctionDesp> exportedFunctions;
|
||||||
public ContractExecType type;
|
public ContractExecType type;
|
||||||
public YjsType yjsType;
|
public YjsType yjsType;
|
||||||
public List<AnnotationNode> annotations;
|
public List<AnnotationNode> annotations;
|
||||||
|
@ -9,7 +9,8 @@ public enum ContractExecType implements Serializable {
|
|||||||
RequestAllResponseFirst,
|
RequestAllResponseFirst,
|
||||||
RequestAllResponseHalf,
|
RequestAllResponseHalf,
|
||||||
RequestAllResponseAll,
|
RequestAllResponseAll,
|
||||||
Sharding;//分片执行模式
|
Sharding,//分片执行模式
|
||||||
|
SelfAdaptiveSharding; // self-adaptive sharding
|
||||||
|
|
||||||
public static ContractExecType getContractTypeByInt(int i) {
|
public static ContractExecType getContractTypeByInt(int i) {
|
||||||
ContractExecType[] values = ContractExecType.values();
|
ContractExecType[] values = ContractExecType.values();
|
||||||
@ -25,10 +26,6 @@ public enum ContractExecType implements Serializable {
|
|||||||
case RequestOnce:
|
case RequestOnce:
|
||||||
case ResponseOnce:
|
case ResponseOnce:
|
||||||
return false;
|
return false;
|
||||||
case RequestAllResponseAll:
|
|
||||||
case RequestAllResponseFirst:
|
|
||||||
case RequestAllResponseHalf:
|
|
||||||
case Sharding:
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user