@Override public final <A extends Node> void travelInTime(final long targetTime, final Callback<A> callback) { _resolver.lookup(_world, targetTime, _id, callback); }
@Override public final <A extends Node> void jump(final long targetTime, final Callback<A> callback) { _resolver.lookup(_world, targetTime, _id, callback); }
@Override public void indexNames(final long world, final long time, final Callback<String[]> callback) { final CoreGraph selfPointer = this; this._resolver.lookup(world, time, CoreConstants.END_OF_TIME, new Callback<org.mwg.Node>() { @Override public void on(org.mwg.Node globalIndexNodeUnsafe) { if (globalIndexNodeUnsafe == null) { callback.on(new String[0]); } else { LongLongMap globalIndexContent = (LongLongMap) globalIndexNodeUnsafe.get(CoreConstants.INDEX_ATTRIBUTE); if (globalIndexContent == null) { globalIndexNodeUnsafe.free(); callback.on(new String[0]); } else { final String[] result = new String[(int) globalIndexContent.size()]; final int[] resultIndex = {0}; globalIndexContent.each(new LongLongMapCallBack() { @Override public void on(long key, long value) { result[resultIndex[0]] = selfPointer._resolver.hashToString((int) key); resultIndex[0]++; } }); globalIndexNodeUnsafe.free(); callback.on(result); } } } }); }
@Override public <A extends org.mwg.Node> void lookup(long world, long time, long id, Callback<A> callback) { if (!_isConnected.get()) { throw new RuntimeException(CoreConstants.DISCONNECTED_ERROR); } this._resolver.lookup(world, time, id, callback); }
private void internal_index(long world, long time, String name, boolean ifExists, Callback<NodeIndex> callback) { final CoreGraph selfPointer = this; final long indexNameCoded = this._resolver.stringToHash(name, true); this._resolver.lookup(world, time, CoreConstants.END_OF_TIME, new Callback<org.mwg.Node>() { @Override public void on(org.mwg.Node globalIndexNodeUnsafe) {
selfPointer._resolver.lookup(world, time, indexId, callback);