Package net.jcores.jre.options

Examples of net.jcores.jre.options.KillSwitch.terminated()


                        } catch (Exception e) {
                            $.report(MessageType.EXCEPTION, "Function f() passed to Async.onNext() threw an exception " + e.getMessage());                           
                        }
                       
                    } catch (InterruptedException e) {
                        if (killswitch != null && killswitch.terminated()) return;
                        $.report(MessageType.EXCEPTION, "Unexpected Interrupt while waiting at Async.onNext(). Terminating handler");
                        return;
                    }
                }
            }
View Full Code Here


            public void f() {
                try {
                    // Now process all elements
                    for (T t : CoreObject.this) {
                        // Check if we should terminate.
                        if(killswitch != null && killswitch.terminated())  return;
                       
                        // Otherwise process next element.
                        try {
                            queue.add(Async.QEntry(f.f(t)));
                        } catch (Exception e) {
View Full Code Here

                    } catch (Exception e) {
                        options$.failure(f0, e, "manytimes:run", "Exception while executing f().");
                    }

                    // Check if we should terminate
                    if (killswitch != null && killswitch.terminated()) return;
                }
            }
        });

        // Register the future
View Full Code Here

            public void run() {
                try {
                    sleep(delay, options);

                    // Check if we should terminate
                    if (killswitch != null && killswitch.terminated()) return;

                    f0.f();
                } catch (Exception e) {
                    options$.failure(f0, e, "onetime:run", "Exception while executing f().");
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.