@Override public List<Subscription> listAllSubscriptions() { LOG.debug("Retrieving existing subscriptions"); List<Subscription> results = new ArrayList<>(); Cursor<String, Subscription> mapCursor = subscriptions.cursor(null); while (mapCursor.hasNext()) { String subscriptionStr = mapCursor.next(); results.add(mapCursor.getValue()); } LOG.debug("Loaded {} subscriptions", results.size()); return results; }
private Set<Integer> collectReferencedChunks() { long testVersion = lastChunk.version; DataUtils.checkArgument(testVersion > 0, "Collect references on version 0"); long readCount = getFileStore().readCount.get(); Set<Integer> referenced = new HashSet<>(); for (Cursor<String, String> c = meta.cursor("root."); c.hasNext();) { String key = c.next(); if (!key.startsWith("root.")) { break; } long pos = DataUtils.parseHexLong(c.getValue()); if (pos == 0) { continue; } int mapId = DataUtils.parseHexInt(key.substring("root.".length())); collectReferencedChunks(referenced, mapId, pos, 0); } long pos = lastChunk.metaRootPos; collectReferencedChunks(referenced, 0, pos, 0); readCount = fileStore.readCount.get() - readCount; return referenced; }
Cursor<K, VersionedValue> cursor = map.cursor(null); while (cursor.hasNext()) { K key = cursor.next();
Page lastPage = null; while (cursor.hasNext()) { cursor.next(); Page p = cursor.getPage(); if (p == lastPage) {
private Set<Integer> collectReferencedChunks() { long testVersion = lastChunk.version; DataUtils.checkArgument(testVersion > 0, "Collect references on version 0"); long readCount = getFileStore().readCount.get(); Set<Integer> referenced = new HashSet<>(); for (Cursor<String, String> c = meta.cursor("root."); c.hasNext();) { String key = c.next(); if (!key.startsWith("root.")) { break; } long pos = DataUtils.parseHexLong(c.getValue()); if (pos == 0) { continue; } int mapId = DataUtils.parseHexInt(key.substring("root.".length())); collectReferencedChunks(referenced, mapId, pos, 0); } long pos = lastChunk.metaRootPos; collectReferencedChunks(referenced, 0, pos, 0); readCount = fileStore.readCount.get() - readCount; return referenced; }
private Set<Integer> collectReferencedChunks() { long testVersion = lastChunk.version; DataUtils.checkArgument(testVersion > 0, "Collect references on version 0"); long readCount = getFileStore().readCount; Set<Integer> referenced = New.hashSet(); for (Cursor<String, String> c = meta.cursor("root."); c.hasNext();) { String key = c.next(); if (!key.startsWith("root.")) { break; } long pos = DataUtils.parseHexLong(c.getValue()); if (pos == 0) { continue; } int mapId = DataUtils.parseHexInt(key.substring("root.".length())); collectReferencedChunks(referenced, mapId, pos, 0); } long pos = lastChunk.metaRootPos; collectReferencedChunks(referenced, 0, pos, 0); readCount = fileStore.readCount - readCount; return referenced; }
private Set<Integer> collectReferencedChunks() { long testVersion = lastChunk.version; DataUtils.checkArgument(testVersion > 0, "Collect references on version 0"); long readCount = getFileStore().readCount; Set<Integer> referenced = New.hashSet(); for (Cursor<String, String> c = meta.cursor("root."); c.hasNext();) { String key = c.next(); if (!key.startsWith("root.")) { break; } long pos = DataUtils.parseHexLong(c.getValue()); if (pos == 0) { continue; } int mapId = DataUtils.parseHexInt(key.substring("root.".length())); collectReferencedChunks(referenced, mapId, pos, 0); } long pos = lastChunk.metaRootPos; collectReferencedChunks(referenced, 0, pos, 0); readCount = fileStore.readCount - readCount; return referenced; }
Page lastPage = null; while (cursor.hasNext()) { cursor.next(); Page p = cursor.getPage(); if (p == lastPage) {
Page lastPage = null; while (cursor.hasNext()) { cursor.next(); Page p = cursor.getPage(); if (p == lastPage) {
Page lastPage = null; while (cursor.hasNext()) { cursor.next(); Page p = cursor.getPage(); if (p == lastPage) {
VersionedValue data; synchronized (transaction.store.undoLog) { K key = cursor.next(); data = getValue(key, readLogId, cursor.getValue());
VersionedValue data; synchronized (transaction.store.undoLog) { K key = cursor.next(); data = getValue(key, readLogId, cursor.getValue());