ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bluehu <husheng...@gmail.com>
Subject how can I delete shutdownhook add by ignite?
Date Wed, 26 Apr 2017 03:23:43 GMT
I start ignite instance by "Ignition.start("ignite.xml")" in my server, but I
want to control the stopping process(press ctrl+c) myself, for example:

    private static void waitForShutdownCommand() {
        Thread shutdown = new Thread() {
            public void run() {
                try {
                    *Thread.sleep(10000);*
                    *ignite.close();*
                } catch (Exception e) {
                    ......
                }
                shutdownSignal.countDown();
            }
        };
        
        Runtime.getRuntime().addShutdownHook(shutdown);
        try {
            shutdownSignal.await();
        } catch (InterruptedException e) {
        }
    }

but ignite do not wait for my close sleep and close immediately. how can I
do this?



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/how-can-I-delete-shutdownhook-add-by-ignite-tp12254.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message