@FunctionalInterface
public interface MemoryManagerClient
MemoryManager
.Modifier and Type | Method and Description |
---|---|
void |
memoryLow(java.util.concurrent.Phaser phaser)
This method is invoked by
MemoryManager which this client registers to, when the available heap memory is low. |
void memoryLow(java.util.concurrent.Phaser phaser)
MemoryManager
which this client registers to, when the available heap memory is low.
It is expected that the client performs some clean up action to help with dealing with this shortage of memory. Client needs to
signal the MemoryManager
when that action completes. The passed phaser needs to be used for that purpose.
Client should register with this phaser before performing the clean up and arrive and deregister itself after clean up is done.
If no cleanup is possible/required, just register and arrive and deregister immediately.phaser
- phaser used to coordinate with MemoryManager
Copyright © 2012–2022 The Apache Software Foundation. All rights reserved.