@Override public org.mwg.Node newNode(long world, long time) { if (!_isConnected.get()) { throw new RuntimeException(CoreConstants.DISCONNECTED_ERROR); } final org.mwg.Node newNode = new BaseNode(world, time, this._nodeKeyCalculator.newKey(), this); this._resolver.initNode(newNode, Constants.NULL_LONG); return newNode; }
@Override public org.mwg.Node newTypedNode(long world, long time, String nodeType) { if (nodeType == null) { throw new RuntimeException("nodeType should not be null"); } if (!_isConnected.get()) { throw new RuntimeException(CoreConstants.DISCONNECTED_ERROR); } final int extraCode = _resolver.stringToHash(nodeType, false); final NodeFactory resolvedFactory = factoryByCode(extraCode); BaseNode newNode; if (resolvedFactory == null) { System.out.println("WARNING: UnKnow NodeType " + nodeType + ", missing plugin configuration in the builder ? Using generic node as a fallback"); newNode = new BaseNode(world, time, this._nodeKeyCalculator.newKey(), this); } else { newNode = (BaseNode) resolvedFactory.create(world, time, this._nodeKeyCalculator.newKey(), this); } this._resolver.initNode(newNode, extraCode); return newNode; }
if (globalIndexNodeUnsafe == null) { globalIndexNodeUnsafe = new BaseNode(world, time, CoreConstants.END_OF_TIME, selfPointer); selfPointer._resolver.initNode(globalIndexNodeUnsafe, CoreConstants.NULL_LONG); globalIndexContent = (LongLongMap) globalIndexNodeUnsafe.getOrCreate(CoreConstants.INDEX_ATTRIBUTE, Type.LONG_TO_LONG_MAP); } else {