Package io.prestosql.spiller
Class SpillSpaceTracker
- java.lang.Object
-
- io.prestosql.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 void
free(long bytes)
long
getCurrentBytes()
Returns the number of bytes currently on disk.long
getMaxBytes()
com.google.common.util.concurrent.ListenableFuture<?>
reserve(long bytes)
Reserves the given number of bytes to spill.String
toString()
-
-
-
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()
-
-