本文整理汇总了Java中com.taobao.tddl.common.model.Atom类的典型用法代码示例。如果您正苦于以下问题:Java Atom类的具体用法?Java Atom怎么用?Java Atom使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Atom类属于com.taobao.tddl.common.model包,在下文中一共展示了Atom类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseAtom
import com.taobao.tddl.common.model.Atom; //导入依赖的package包/类
private static Atom parseAtom(Node node) {
Node nameNode = node.getAttributes().getNamedItem("name");
Map<String, String> props = new HashMap<String, String>();
NodeList childNodes = node.getChildNodes();
for (int i = 0; i < childNodes.getLength(); i++) {
Node item = childNodes.item(i);
if ("properties".equals(item.getNodeName())) {
props = parseProperties(item);
}
}
Atom atom = new Atom();
if (nameNode != null) {
atom.setName(nameNode.getNodeValue());
}
atom.setProperties(props);
return atom;
}
示例2: parseGroup
import com.taobao.tddl.common.model.Atom; //导入依赖的package包/类
private static Group parseGroup(Node node, String appName) {
Node nameNode = node.getAttributes().getNamedItem("name");
Node typeNode = node.getAttributes().getNamedItem("type");
Map<String, String> props = new HashMap<String, String>();
List<Atom> atoms = new ArrayList<Atom>();
NodeList childNodes = node.getChildNodes();
for (int i = 0; i < childNodes.getLength(); i++) {
Node item = childNodes.item(i);
if ("properties".equals(item.getNodeName())) {
props = parseProperties(item);
} else if ("atom".equals(item.getNodeName())) {
atoms.add(parseAtom(item));
}
}
Group group = new Group();
if (nameNode != null) {
group.setName(nameNode.getNodeValue());
}
if (typeNode != null) {
group.setType(getGroupType(typeNode.getNodeValue()));
}
group.setAppName(appName);
group.setProperties(props);
group.setAtoms(atoms);
return group;
}
示例3: getFullGlobalKeyMap
import com.taobao.tddl.common.model.Atom; //导入依赖的package包/类
private Map<String, String> getFullGlobalKeyMap(List<Atom> atoms) {
Map<String, String> result = new HashMap<String, String>();
for (Atom atom : atoms) {
String globalDataId = TAtomConstants.getGlobalDataId(atom.getName());
if (!configHouse.containsKey(globalDataId)) {
result.put(atom.getName(), globalDataId);
}
}
return result;
}
示例4: getFullAppKeyMap
import com.taobao.tddl.common.model.Atom; //导入依赖的package包/类
private Map<String, String> getFullAppKeyMap(List<Atom> atoms) {
Map<String, String> result = new HashMap<String, String>();
for (Atom atom : atoms) {
String appDataId = TAtomConstants.getAppDataId(appName, atom.getName());
if (!configHouse.containsKey(appDataId)) {
result.put(atom.getName(), appDataId);
}
}
return result;
}
示例5: initSonHolder
import com.taobao.tddl.common.model.Atom; //导入依赖的package包/类
protected void initSonHolder(List<Atom> atomKeys) throws Exception {
Class sonHolderClass = Class.forName(ATOM_CONFIG_HOLDER_NAME);
Constructor constructor = sonHolderClass.getConstructor(String.class, List.class, String.class);
sonConfigDataHolder = (AbstractConfigDataHolder) constructor.newInstance(this.appName, atomKeys, this.unitName);
sonConfigDataHolder.init();
delegateDataHolder.setSonConfigDataHolder(sonConfigDataHolder);// 传递给deletegate,由它进行son传递
}
示例6: AtomConfigHolder
import com.taobao.tddl.common.model.Atom; //导入依赖的package包/类
public AtomConfigHolder(String appName, List<Atom> atoms, String unitName){
this.appName = appName;
this.atoms = atoms;
this.unitName = unitName;
}
示例7: setAtom
import com.taobao.tddl.common.model.Atom; //导入依赖的package包/类
public void setAtom(Atom atom) {
this.atom = atom;
}
示例8: getAtomInfo
import com.taobao.tddl.common.model.Atom; //导入依赖的package包/类
Atom getAtomInfo();