use of com.ctrip.xpipe.redis.console.service.vo.DcMetaBuilder in project x-pipe by ctripcorp.
the class AdvancedDcMetaService method getDcMeta.
@Override
public DcMeta getDcMeta(String dcName) {
DcTbl dcTbl = dcService.find(dcName);
DcMeta dcMeta = new DcMeta().setId(dcName).setLastModifiedTime(dcTbl.getDcLastModifiedTime());
ParallelCommandChain chain = new ParallelCommandChain(executors);
chain.add(retry3TimesUntilSuccess(new GetAllSentinelCommand(dcMeta)));
chain.add(retry3TimesUntilSuccess(new GetAllKeeperContainerCommand(dcMeta)));
DcMetaBuilder builder = new DcMetaBuilder(dcMeta, dcTbl.getId(), executors, redisMetaService, dcClusterService, clusterMetaService, dcClusterShardService, dcService, factory);
chain.add(retry3TimesUntilSuccess(builder));
try {
chain.execute().get();
} catch (Exception e) {
logger.error("[queryDcMeta] ", e);
}
return dcMeta;
}
Aggregations