Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions accord-core/src/main/java/accord/local/CommandStores.java
Original file line number Diff line number Diff line change
Expand Up @@ -1121,4 +1121,15 @@ protected Snapshot current()
{
return current;
}

public AsyncResult<List<Ranges>> getInUseRanges()
{
List<AsyncResult<Ranges>> results = new ArrayList<>();
Snapshot snapshot = current;
for (ShardHolder shard : snapshot.shards)
results.add(shard.store.submit((PreLoadContext.Empty) () -> "Get not retired ranges",
safeCommandStore -> shard.ranges().notRetired(safeCommandStore)));

return AsyncResults.allOf(results);
}
}