@ThreadSafe public final class SimpleLocalMemoryContext extends Object implements LocalMemoryContext
| Constructor and Description |
|---|
SimpleLocalMemoryContext(AggregatedMemoryContext parentMemoryContext,
String allocationTag) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this LocalMemoryContext.
|
long |
getBytes() |
com.google.common.util.concurrent.ListenableFuture<?> |
setBytes(long bytes)
When this method returns, the bytes tracked by this LocalMemoryContext has been updated.
|
String |
toString() |
boolean |
trySetBytes(long bytes)
This method can return false when there is not enough memory available to satisfy a positive delta allocation
(
bytes is greater than the bytes tracked by this LocalMemoryContext). |
public SimpleLocalMemoryContext(AggregatedMemoryContext parentMemoryContext, String allocationTag)
public long getBytes()
getBytes in interface LocalMemoryContextpublic com.google.common.util.concurrent.ListenableFuture<?> setBytes(long bytes)
LocalMemoryContextsetBytes in interface LocalMemoryContextpublic boolean trySetBytes(long bytes)
LocalMemoryContextbytes is greater than the bytes tracked by this LocalMemoryContext).
trySetBytes in interface LocalMemoryContextbytes.public void close()
LocalMemoryContextgetBytes()) can be called.close in interface LocalMemoryContextCopyright © 2012–2019. All rights reserved.