org.apache.helix.manager.zk.ZKHelixDataAccessor.getBaseDataAccessor()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(86)

本文整理了Java中org.apache.helix.manager.zk.ZKHelixDataAccessor.getBaseDataAccessor()方法的一些代码示例,展示了ZKHelixDataAccessor.getBaseDataAccessor()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKHelixDataAccessor.getBaseDataAccessor()方法的具体详情如下:
包路径:org.apache.helix.manager.zk.ZKHelixDataAccessor
类名称:ZKHelixDataAccessor
方法名:getBaseDataAccessor

ZKHelixDataAccessor.getBaseDataAccessor介绍

暂无

代码示例

代码示例来源:origin: apache/helix

@Override
 public void handleChildChange(String parentPath, List<String> currentChilds)
   throws Exception {
  if (currentChilds != null && currentChilds.size() > 1) {
   List<ZNRecord> records =
     accessor.getBaseDataAccessor().getChildren(parentPath, null, 0);
   int transitionMsgCount = 0;
   for (ZNRecord record : records) {
    Message msg = new Message(record);
    if (msg.getMsgType().equals(Message.MessageType.STATE_TRANSITION.name())) {
     transitionMsgCount++;
    }
   }
   if (transitionMsgCount > 1) {
    success.set(false);
    Assert.fail("Should not see more than 1 message");
   }
  }
 }
});

代码示例来源:origin: org.apache.helix/helix-core

_dataAccessor.getProperty(_keyBuilder.stateModelDef(stateModelDefRef));
BaseDataAccessor<ZNRecord> baseAccessor = _dataAccessor.getBaseDataAccessor();
String curStatePath =
  _keyBuilder.currentState(_instanceName, _sessionId, lastCurState.getResourceName())
 _dataAccessor.getBaseDataAccessor().update(curStatePath,
   new CurStateCarryOverUpdater(_sessionId, initState, lastCurState),
   AccessOption.PERSISTENT);

代码示例来源:origin: apache/helix

_dataAccessor.getProperty(_keyBuilder.stateModelDef(stateModelDefRef));
BaseDataAccessor<ZNRecord> baseAccessor = _dataAccessor.getBaseDataAccessor();
String curStatePath =
  _keyBuilder.currentState(_instanceName, _sessionId, lastCurState.getResourceName())
 _dataAccessor.getBaseDataAccessor().update(curStatePath,
   new CurStateCarryOverUpdater(_sessionId, initState, lastCurState),
   AccessOption.PERSISTENT);

相关文章