Package io.trino.memory.context
Interface MemoryReservationHandler
public interface MemoryReservationHandler
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.util.concurrent.ListenableFuture<Void>reserveMemory(String allocationTag, long delta) booleantryReserveMemory(String allocationTag, long delta) Try reserving the given number of bytes.
-
Method Details
-
reserveMemory
com.google.common.util.concurrent.ListenableFuture<Void> reserveMemory(String allocationTag, long delta) - Returns:
- a future that signals the caller to block before reserving more memory.
-
tryReserveMemory
Try reserving the given number of bytes.- Returns:
- true if reservation is successful, false otherwise.
-