Package com.hazelcast.client
Class ClientOutOfMemoryHandler
java.lang.Object
com.hazelcast.core.OutOfMemoryHandler
com.hazelcast.instance.impl.DefaultOutOfMemoryHandler
com.hazelcast.client.ClientOutOfMemoryHandler
public class ClientOutOfMemoryHandler
extends com.hazelcast.instance.impl.DefaultOutOfMemoryHandler
To clear resources of the client upon OutOfMemory
-
Field Summary
Fields inherited from class com.hazelcast.instance.impl.DefaultOutOfMemoryHandler
FREE_MAX_PERCENTAGE_PROP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonOutOfMemory(OutOfMemoryError oome, HazelcastInstance[] hazelcastInstances) When anOutOfMemoryErroris caught by Hazelcast threads, this method is called for ALLHazelcastInstances knows by current JVM (actually ClassLoader).Methods inherited from class com.hazelcast.instance.impl.DefaultOutOfMemoryHandler
shouldHandleMethods inherited from class com.hazelcast.core.OutOfMemoryHandler
tryCloseConnections, tryShutdown
-
Constructor Details
-
ClientOutOfMemoryHandler
public ClientOutOfMemoryHandler()
-
-
Method Details
-
onOutOfMemory
Description copied from class:OutOfMemoryHandlerWhen anOutOfMemoryErroris caught by Hazelcast threads, this method is called for ALLHazelcastInstances knows by current JVM (actually ClassLoader).User can shutdown the
HazelcastInstance, callSystem.exit(), just log the error, etc. The default handler tries to close socket connections to other nodes and shutdown theHazelcastInstance.Warning:
OutOfMemoryHandlermay not be called even if JVM throwsOutOfMemoryErrorbecause the error may be thrown from an external (user) thread and Hazelcast may not be informed aboutOutOfMemoryError.- Overrides:
onOutOfMemoryin classcom.hazelcast.instance.impl.DefaultOutOfMemoryHandler- Parameters:
oome- OutOfMemoryError thrown by JVMhazelcastInstances- All HazelcastInstances known by JVM, can include inactive or NULL instances.- See Also:
-