public class MemoryPool extends Object
Constructor and Description |
---|
MemoryPool(MemoryPoolId id,
io.airlift.units.DataSize size) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(MemoryPoolListener listener) |
void |
addTaskRevocableMemoryListener(TaskRevocableMemoryListener listener) |
void |
free(QueryId queryId,
String allocationTag,
long bytes) |
void |
freeRevocable(QueryId queryId,
long bytes) |
long |
getFreeBytes()
Returns the number of free bytes.
|
MemoryPoolId |
getId() |
MemoryPoolInfo |
getInfo() |
long |
getMaxBytes() |
long |
getQueryMemoryReservation(QueryId queryId) |
long |
getQueryRevocableMemoryReservation(QueryId queryId) |
long |
getReservedBytes() |
long |
getReservedRevocableBytes() |
void |
onTaskRevocableMemoryReserved(TaskId taskId) |
void |
removeListener(MemoryPoolListener listener) |
void |
removeTaskRevocableMemoryListener(TaskRevocableMemoryListener listener) |
com.google.common.util.concurrent.ListenableFuture<?> |
reserve(QueryId queryId,
String allocationTag,
long bytes)
Reserves the given number of bytes.
|
com.google.common.util.concurrent.ListenableFuture<?> |
reserveRevocable(QueryId queryId,
long bytes) |
String |
toString() |
boolean |
tryReserve(QueryId queryId,
String allocationTag,
long bytes)
Try to reserve the given number of bytes.
|
public MemoryPool(MemoryPoolId id, io.airlift.units.DataSize size)
public MemoryPoolId getId()
public MemoryPoolInfo getInfo()
public void addListener(MemoryPoolListener listener)
public void removeListener(MemoryPoolListener listener)
public void addTaskRevocableMemoryListener(TaskRevocableMemoryListener listener)
public void removeTaskRevocableMemoryListener(TaskRevocableMemoryListener listener)
public com.google.common.util.concurrent.ListenableFuture<?> reserve(QueryId queryId, String allocationTag, long bytes)
public void onTaskRevocableMemoryReserved(TaskId taskId)
public com.google.common.util.concurrent.ListenableFuture<?> reserveRevocable(QueryId queryId, long bytes)
public boolean tryReserve(QueryId queryId, String allocationTag, long bytes)
public void freeRevocable(QueryId queryId, long bytes)
public long getFreeBytes()
public long getMaxBytes()
public long getReservedBytes()
public long getReservedRevocableBytes()
public long getQueryMemoryReservation(QueryId queryId)
public long getQueryRevocableMemoryReservation(QueryId queryId)
Copyright © 2012–2021. All rights reserved.