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