Transactional 事务
结构声明
- TS Declaration
- Java Class
- JSON Schema
interface Transactional {
"concept": "Transactional", // 产品概念
"enabled": boolean, // 事务是否生效
"propagation": "REQUIRED" | "REQUIRES_NEW" | "SUPPORTS" | "NOT_SUPPORTED" | "MANDATORY" | "NEVER", // 事务的传播机制
"isolation": "DEFAULT" | "READ_UNCOMMITTED" | "READ_COMMITTED" | "REPEATABLE_READ" | "SERIALIZABLE", // 事务的隔离级别
}
class TransactionalTreeNode {
ConceptEnum concept; // 产品概念
boolean enabled; // 事务是否生效
PropagationEnum propagation; // 事务的传播机制
IsolationEnum isolation; // 事务的隔离级别
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/Transactional",
"definitions": {
"Transactional": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "Transactional"
},
"enabled": {
"type": "boolean"
},
"propagation": {
"type": "string",
"enum": [
"REQUIRED",
"REQUIRES_NEW",
"SUPPORTS",
"NOT_SUPPORTED",
"MANDATORY",
"NEVER"
]
},
"isolation": {
"type": "string",
"enum": [
"DEFAULT",
"READ_UNCOMMITTED",
"READ_COMMITTED",
"REPEATABLE_READ",
"SERIALIZABLE"
]
}
},
"required": [
"concept",
"enabled",
"propagation",
"isolation"
],
"additionalProperties": false
}
}
}
示例
简单示例
- JSON
- YAML
{
"concept": "Transactional",
"enabled": true,
"propagation": null,
"isolation": null
}
concept: Transactional
enabled: true
propagation: null
isolation: null