public class OOMListener extends Object implements I2PThread.OOMEventListener
| Constructor and Description |
|---|
OOMListener(RouterContext ctx)
Create a new out-of-memory event listener.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
getWrapperConfigPath(RouterContext ctx)
Get the best guess path for wrapper.config file.
|
void |
outOfMemory(OutOfMemoryError oom)
Handle out-of-memory error by shutting down router gracefully.
|
public OOMListener(RouterContext ctx)
ctx - the router context for accessing router servicespublic static String getWrapperConfigPath(RouterContext ctx)
ctx - the router context for determining installation typepublic void outOfMemory(OutOfMemoryError oom)
outOfMemory in interface I2PThread.OOMEventListeneroom - the out-of-memory error that triggered this handler