Package com.hazelcast.core

Examples of com.hazelcast.core.OutOfMemoryHandler


        HazelcastInstance[] instances = removeRegisteredInstances();
        if (instances.length == 0) {
            return;
        }

        OutOfMemoryHandler h = clientHandler;
        if (h != null) {
            try {
                h.onOutOfMemory(outOfMemoryError, instances);
            } catch (Throwable ignored) {
            }
        }

        h = handler;
        if (h != null) {
            try {
                h.onOutOfMemory(outOfMemoryError, instances);
            } catch (Throwable ignored) {
            }
        }
    }
View Full Code Here


        OutOfMemoryErrorDispatcher.clear();
    }

    @Test
    public void onOutOfMemoryOutOfMemory(){
        OutOfMemoryHandler handler = mock(OutOfMemoryHandler.class);
        OutOfMemoryError oome = new OutOfMemoryError();
        HazelcastInstance hz1 = mock(HazelcastInstance.class);

        OutOfMemoryErrorDispatcher.register(hz1);
        OutOfMemoryErrorDispatcher.setHandler(handler);
View Full Code Here

        HazelcastInstance[] instances = removeRegisteredInstances();
        if (instances.length == 0) {
            return;
        }

        OutOfMemoryHandler h = clientHandler;
        if (h != null) {
            try {
                h.onOutOfMemory(outOfMemoryError, instances);
            } catch (Throwable ignored) {
            }
        }

        h = handler;
        if (h != null) {
            try {
                h.onOutOfMemory(outOfMemoryError, instances);
            } catch (Throwable ignored) {
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.core.OutOfMemoryHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.