feat: add SelfAdaptiveShardingExecutor

add new type of multi-point contract "SelfAdaptiveSharding"
This commit is contained in:
Frank.R.Wu 2021-11-11 12:52:39 +08:00
parent 5ed245459c
commit 2cfd82bb4b
2 changed files with 4 additions and 6 deletions

View File

@ -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;

View File

@ -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;
}