Skip to content

Instantly share code, notes, and snippets.

@enesakar
Created December 30, 2013 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enesakar/8182080 to your computer and use it in GitHub Desktop.
Save enesakar/8182080 to your computer and use it in GitHub Desktop.
private static class DefaultOutOfMemoryHandler extends OutOfMemoryHandler {
public void onOutOfMemory(final OutOfMemoryError oom, final HazelcastInstance[] hazelcastInstances) {
for (HazelcastInstance instance : hazelcastInstances) {
if (instance != null) {
Helper.tryCloseConnections(instance);
Helper.tryStopThreads(instance);
Helper.tryShutdown(instance);
}
}
System.err.println(oom);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment