public class ClientOutOfMemoryHandler extends DefaultOutOfMemoryHandler
FREE_MAX_PERCENTAGE_PROP| Constructor and Description |
|---|
ClientOutOfMemoryHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
onOutOfMemory(OutOfMemoryError oome,
HazelcastInstance[] hazelcastInstances)
When an
OutOfMemoryError is caught by Hazelcast threads,
this method is called for ALL HazelcastInstances
knows by current JVM (actually ClassLoader). |
shouldHandletryCloseConnections, tryShutdown, tryStopThreadspublic void onOutOfMemory(OutOfMemoryError oome, HazelcastInstance[] hazelcastInstances)
OutOfMemoryHandlerOutOfMemoryError is caught by Hazelcast threads,
this method is called for ALL HazelcastInstances
knows by current JVM (actually ClassLoader).
User can shutdown the HazelcastInstance, call System.exit(),
just log the error, etc.
The default handler tries to close socket connections to other nodes and shutdown the
HazelcastInstance.
Warning: OutOfMemoryHandler may not be called even if JVM throws OutOfMemoryError because the error may be thrown from an external (user) thread and Hazelcast may not be informed about OutOfMemoryError.
onOutOfMemory in class DefaultOutOfMemoryHandleroome - OutOfMemoryError thrown by JVMhazelcastInstances - All HazelcastInstances known by JVM,
can include inactive or NULL instances.OutOfMemoryHandler.tryCloseConnections(HazelcastInstance),
OutOfMemoryHandler.tryStopThreads(HazelcastInstance),
OutOfMemoryHandler.tryShutdown(HazelcastInstance)Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.