use of jetbrains.exodus.entitystore.tables.BlobsTable in project xodus by JetBrains.
the class VFSBlobVault method loadAllBlobs.
@NotNull
private static LongSet loadAllBlobs(@NotNull final PersistentEntityStoreImpl store, @NotNull final PersistentStoreTransaction txn) {
final LongSet result = new PackedLongHashSet();
final Transaction envTxn = txn.getEnvironmentTransaction();
try (Cursor entityTypesCursor = store.getEntityTypesTable().getSecondIndexCursor(envTxn)) {
while (entityTypesCursor.getNext()) {
final int entityTypeId = IntegerBinding.compressedEntryToInt(entityTypesCursor.getKey());
final BlobsTable blobs = store.getBlobsTable(txn, entityTypeId);
final Store primary = blobs.getPrimaryIndex();
try (Cursor blobsCursor = primary.openCursor(envTxn)) {
while (blobsCursor.getNext()) {
final long blobId = LongBinding.compressedEntryToLong(blobsCursor.getValue());
result.add(blobId);
}
}
}
return result;
}
}
Aggregations