Package io.trino.spiller
Class SpillSpaceTracker
- java.lang.Object
-
- io.trino.spiller.SpillSpaceTracker
-
@ThreadSafe public class SpillSpaceTracker extends Object
-
-
Constructor Summary
Constructors Constructor Description SpillSpaceTracker(io.airlift.units.DataSize maxSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfree(long bytes)longgetCurrentBytes()Returns the number of bytes currently on disk.longgetMaxBytes()com.google.common.util.concurrent.ListenableFuture<?>reserve(long bytes)Reserves the given number of bytes to spill.StringtoString()
-
-
-
Method Detail
-
reserve
public com.google.common.util.concurrent.ListenableFuture<?> reserve(long bytes)
Reserves the given number of bytes to spill. If more than the maximum, throws an exception.- Throws:
ExceededSpillLimitException
-
free
public void free(long bytes)
-
getCurrentBytes
public long getCurrentBytes()
Returns the number of bytes currently on disk.
-
getMaxBytes
public long getMaxBytes()
-
-