本文整理匯總了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();