Class GovernanceRepositoryAPIImpl
java.lang.Object
org.apache.shardingsphere.data.pipeline.core.api.impl.GovernanceRepositoryAPIImpl
- All Implemented Interfaces:
GovernanceRepositoryAPI
Governance repository API impl.
-
Constructor Summary
Constructors -
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.
-
Constructor Details
-
GovernanceRepositoryAPIImpl
public GovernanceRepositoryAPIImpl()
-
-
Method Details
-
isExisted
Description copied from interface:GovernanceRepositoryAPIWhether key existing or not.- Specified by:
isExistedin interfaceGovernanceRepositoryAPI- Parameters:
key- registry center key- Returns:
- true if job exists, else false
-
persistJobProgress
Description copied from interface:GovernanceRepositoryAPIPersist job progress.- Specified by:
persistJobProgressin interfaceGovernanceRepositoryAPI- Parameters:
jobContext- job context
-
getJobProgress
Description copied from interface:GovernanceRepositoryAPIGet job progress.- Specified by:
getJobProgressin interfaceGovernanceRepositoryAPI- Parameters:
jobId- job idshardingItem- sharding item- Returns:
- job progress
-
persistJobCheckResult
Description copied from interface:GovernanceRepositoryAPIPersist job check result.- Specified by:
persistJobCheckResultin interfaceGovernanceRepositoryAPI- Parameters:
jobId- job idcheckSuccess- check success
-
getJobCheckResult
Description copied from interface:GovernanceRepositoryAPIGet job check result.- Specified by:
getJobCheckResultin interfaceGovernanceRepositoryAPI- Parameters:
jobId- job id- Returns:
- job check result
-
deleteJob
Description copied from interface:GovernanceRepositoryAPIDelete job.- Specified by:
deleteJobin interfaceGovernanceRepositoryAPI- Parameters:
jobId- job id
-
getChildrenKeys
Description copied from interface:GovernanceRepositoryAPIGet node's sub-nodes list.- Specified by:
getChildrenKeysin interfaceGovernanceRepositoryAPI- Parameters:
key- key of data- Returns:
- sub-nodes name list
-
watch
public void watch(String key, org.apache.shardingsphere.mode.repository.cluster.listener.DataChangedEventListener listener) Description copied from interface:GovernanceRepositoryAPIWatch key or path of governance server.- Specified by:
watchin interfaceGovernanceRepositoryAPI- Parameters:
key- key of datalistener- data changed event listener
-
persist
Description copied from interface:GovernanceRepositoryAPIPersist data.- Specified by:
persistin interfaceGovernanceRepositoryAPI- Parameters:
key- key of datavalue- value of data
-
getShardingItems
Description copied from interface:GovernanceRepositoryAPIGet sharding items of job.- Specified by:
getShardingItemsin interfaceGovernanceRepositoryAPI- Parameters:
jobId- job id- Returns:
- sharding items
-
updateShardingJobStatus
Description copied from interface:GovernanceRepositoryAPIUpdate sharding job status.- Specified by:
updateShardingJobStatusin interfaceGovernanceRepositoryAPI- Parameters:
jobId- job idshardingItem- sharding itemstatus- status
-