Class SpillSpaceTracker

java.lang.Object
io.trino.spiller.SpillSpaceTracker

@ThreadSafe public class SpillSpaceTracker extends Object
  • Constructor Details

    • SpillSpaceTracker

      public SpillSpaceTracker(io.airlift.units.DataSize maxSize)
  • Method Details

    • reserve

      public com.google.common.util.concurrent.ListenableFuture<Void> reserve(long bytes)
      Reserves the given number of bytes to spill. If more than the maximum, throws an exception.
    • free

      public void free(long bytes)
    • getCurrentBytes

      public long getCurrentBytes()
      Returns the number of bytes currently on disk.
    • getMaxBytes

      public long getMaxBytes()
    • toString

      public String toString()
      Overrides:
      toString in class Object