public class GridUnsafeGuard extends Object
guard.begin();
try {
guard.releaseLater(x);
}
finally {
guard.end();
}
while another thread can safely read the memory being deallocated:
guard.begin();
try {
mem.readLong(x.getPointer());
}
finally {
guard.end();
}
| Constructor and Description |
|---|
GridUnsafeGuard() |
| Modifier and Type | Method and Description |
|---|---|
void |
begin()
Begins concurrent memory operation.
|
void |
end()
Ends concurrent memory operation and releases resources.
|
void |
finalizeLater(Runnable finalizer)
Does finalization when it will be safe to deallocate offheap memory.
|
void |
releaseLater(GridUnsafeCompoundMemory compound)
Releases memory in the future when it will be safe to do that.
|
String |
toString() |
public void begin()
public void end()
public void releaseLater(GridUnsafeCompoundMemory compound)
compound - Compound memory.public void finalizeLater(Runnable finalizer)
finalizer - Finalizer.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.2.0 Release Date : September 15 2017