Interface SSTableCollector
-
- All Known Implementing Classes:
SSTableLister
public interface SSTableCollectorCollect SSTables from listing the included directories
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSSTableCollector.SSTableFilesAndRangeSimple record class containing SSTable component file paths, summary and size
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SSTableCollector.SSTableFilesAndRangeconsumeOne()Get an SSTable from the collector and remove itjava.util.Map<java.nio.file.Path,Digest>fileDigests(java.util.Set<java.nio.file.Path> files)Get the file digests of the input filesvoidincludeDirectory(java.nio.file.Path dir)Include sstables under the directoryvoidincludeFileDigests(java.util.Map<java.nio.file.Path,Digest> fileDigests)Include the digests of the filesvoidincludeSSTable(java.util.List<java.nio.file.Path> sstableComponents)Include the sstable components of an individual SSTablebooleanisEmpty()SSTableCollector.SSTableFilesAndRangepeek()Get an SSTable from the collector, but do not remove itlongtotalSize()
-
-
-
Method Detail
-
includeDirectory
void includeDirectory(java.nio.file.Path dir)
Include sstables under the directory- Parameters:
dir- directory that contains sstables
-
includeSSTable
void includeSSTable(java.util.List<java.nio.file.Path> sstableComponents)
Include the sstable components of an individual SSTable- Parameters:
sstableComponents- sstable components
-
includeFileDigests
void includeFileDigests(java.util.Map<java.nio.file.Path,Digest> fileDigests)
Include the digests of the files- Parameters:
fileDigests- digest of the files
-
fileDigests
java.util.Map<java.nio.file.Path,Digest> fileDigests(java.util.Set<java.nio.file.Path> files)
Get the file digests of the input files- Parameters:
files- files to gather the digests- Returns:
- file digests of the input files
-
totalSize
long totalSize()
- Returns:
- total size of all sstables included
-
peek
SSTableCollector.SSTableFilesAndRange peek()
Get an SSTable from the collector, but do not remove it- Returns:
- sstable or null if the collector is empty
-
consumeOne
SSTableCollector.SSTableFilesAndRange consumeOne()
Get an SSTable from the collector and remove it- Returns:
- sstable or null if the collector is empty
-
isEmpty
boolean isEmpty()
- Returns:
- true if the collector is empty; otherwise, false
-
-