Package io.trino.spiller
Interface SingleStreamSpiller
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
FileSingleStreamSpiller
public interface SingleStreamSpiller extends Closeable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidclose()Close releases/removes all underlying resources used during spilling like for example all created temporary files.com.google.common.util.concurrent.ListenableFuture<List<Page>>getAllSpilledPages()Initiates read of previously spilled pages.Iterator<Page>getSpilledPages()Returns list of previously spilled Pages as a single stream.longgetSpilledPagesInMemorySize()Returns estimate size of pages that would be returned bygetAllSpilledPages().default com.google.common.util.concurrent.ListenableFuture<?>spill(Page page)Initiate spilling of single page.com.google.common.util.concurrent.ListenableFuture<?>spill(Iterator<Page> page)Initiate spilling of pages stream.
-
-
-
Method Detail
-
spill
com.google.common.util.concurrent.ListenableFuture<?> spill(Iterator<Page> page)
Initiate spilling of pages stream. Returns completed future once spilling has finished. Next spill can be initiated as soon as previous one completes.
-
spill
default com.google.common.util.concurrent.ListenableFuture<?> spill(Page page)
Initiate spilling of single page. Returns completed future once spilling has finished. Next spill can be initiated as soon as previous one completes.
-
getSpilledPages
Iterator<Page> getSpilledPages()
Returns list of previously spilled Pages as a single stream. Pages are in the same order as they were spilled. Method requires the issued spill request to be completed.
-
getSpilledPagesInMemorySize
long getSpilledPagesInMemorySize()
Returns estimate size of pages that would be returned bygetAllSpilledPages().
-
getAllSpilledPages
com.google.common.util.concurrent.ListenableFuture<List<Page>> getAllSpilledPages()
Initiates read of previously spilled pages. The returnedFuturewill be complete once all pages are read.
-
close
void close()
Close releases/removes all underlying resources used during spilling like for example all created temporary files.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-