Interface GovernanceRepositoryAPI
- All Known Implementing Classes:
GovernanceRepositoryAPIImpl
public interface GovernanceRepositoryAPI
Governance repository API.
-
Method Summary
Modifier and TypeMethodDescriptionvoidDelete job.getChildrenKeys(String key) Get node's sub-nodes list.getJobCheckResult(String jobId) Get job check result.getJobProgress(String jobId, int shardingItem) Get job progress.getShardingItems(String jobId) Get sharding items of job.booleanWhether key existing or not.voidPersist data.voidpersistJobCheckResult(String jobId, boolean checkSuccess) Persist job check result.voidpersistJobProgress(RuleAlteredJobContext jobContext) Persist job progress.voidupdateShardingJobStatus(String jobId, int shardingItem, JobStatus status) Update sharding job status.voidwatch(String key, org.apache.shardingsphere.mode.repository.cluster.listener.DataChangedEventListener listener) Watch key or path of governance server.
-
Method Details
-
isExisted
Whether key existing or not.- Parameters:
key- registry center key- Returns:
- true if job exists, else false
-
persistJobProgress
Persist job progress.- Parameters:
jobContext- job context
-
getJobProgress
Get job progress.- Parameters:
jobId- job idshardingItem- sharding item- Returns:
- job progress
-
persistJobCheckResult
Persist job check result.- Parameters:
jobId- job idcheckSuccess- check success
-
getJobCheckResult
Get job check result.- Parameters:
jobId- job id- Returns:
- job check result
-
deleteJob
Delete job.- Parameters:
jobId- job id
-
getChildrenKeys
Get node's sub-nodes list.- Parameters:
key- key of data- Returns:
- sub-nodes name list
-
watch
void watch(String key, org.apache.shardingsphere.mode.repository.cluster.listener.DataChangedEventListener listener) Watch key or path of governance server.- Parameters:
key- key of datalistener- data changed event listener
-
persist
Persist data.- Parameters:
key- key of datavalue- value of data
-
getShardingItems
Get sharding items of job.- Parameters:
jobId- job id- Returns:
- sharding items
-
updateShardingJobStatus
Update sharding job status.- Parameters:
jobId- job idshardingItem- sharding itemstatus- status
-