Examples of ThreadService


Examples of com.sun.jmx.remote.opt.util.ThreadService

    connection = clientAdmin.connectionOpen(connection);

    this.env = newEnv;

    reader = new MessageReader();
    threads = new ThreadService(1, 1);
    threads.handoff(reader);

    state = CONNECTED;
    stateLock.notifyAll();
      } else if (state == FAILED || state == CONNECTED) { // reconnect
View Full Code Here

Examples of com.sun.jmx.remote.opt.util.ThreadService

      state = CONNECTED;
      if (tracing) logger.trace("connect",idstr+" "+connectionId+" Connected.");
  }

  notifThread = new ThreadService(0, 1);

  sendNotification(new JMXConnectionNotification(
       JMXConnectionNotification.OPENED,
       this,
       connectionId,
View Full Code Here

Examples of com.sun.jmx.remote.opt.util.ThreadService

  if (cb == null) {
      throw new IllegalArgumentException("Null callback.");
  }
  callback = cb;

  threads = new ThreadService(DefaultConfig.getServerMinThreads(env),
            DefaultConfig.getServerMaxThreads(env));

  reader = new MessageReader();
  threads.handoff(reader);
    }
View Full Code Here

Examples of com.sun.jmx.snmp.tasks.ThreadService

        address = a ;
   
        if ((ipacl == null) && (useAcl == true))
            throw new IllegalArgumentException("ACL object cannot be null") ;

  threadService = new ThreadService(threadNumber);
    }
View Full Code Here

Examples of com.sun.jmx.snmp.tasks.ThreadService

        address = a ;

        if ((ipacl == null) && (useAcl == true))
            throw new IllegalArgumentException("ACL object cannot be null") ;

        threadService = new ThreadService(threadNumber);
    }
View Full Code Here

Examples of com.sun.jmx.snmp.tasks.ThreadService

        address = a ;

        if ((ipacl == null) && (useAcl == true))
            throw new IllegalArgumentException("ACL object cannot be null") ;

        threadService = new ThreadService(threadNumber);
    }
View Full Code Here

Examples of org.jruby.internal.runtime.ThreadService

    }

    @JRubyMethod(name = "pass", meta = true)
    public static IRubyObject pass(IRubyObject recv) {
        Ruby runtime = recv.getRuntime();
        ThreadService ts = runtime.getThreadService();
        boolean critical = ts.getCritical();
       
        ts.setCritical(false);
       
        Thread.yield();
       
        ts.setCritical(critical);
       
        return recv.getRuntime().getNil();
    }
View Full Code Here

Examples of org.jruby.internal.runtime.ThreadService

     * @param config The configuration to use for the new instance
     * @see org.jruby.RubyInstanceConfig
     */
    private Ruby(RubyInstanceConfig config) {
        this.config             = config;
        this.threadService      = new ThreadService(this);
        if(config.isSamplingEnabled()) {
            org.jruby.util.SimpleSampler.registerThreadContext(threadService.getCurrentContext());
        }

        this.in                 = config.getInput();
View Full Code Here

Examples of org.jruby.internal.runtime.ThreadService

    }

    public static class ThreadMethods {
        @JRubyMethod(name = "exclusive", meta = true, compat = RUBY1_8)
        public static IRubyObject exclusive(ThreadContext context, IRubyObject receiver, Block block) {
            ThreadService service  = context.getRuntime().getThreadService();
            boolean old = service.getCritical();
            try {
                service.setCritical(true);
                return block.yield(receiver.getRuntime().getCurrentContext(), (IRubyObject) null);
            } finally {
                service.setCritical(old);
            }
        }
View Full Code Here

Examples of org.jruby.internal.runtime.ThreadService

        final String threadDumpSignal = runtime.getInstanceConfig().getThreadDumpSignal();
        if (threadDumpSignal != null && threadDumpSignal.length() > 0) {
            SIGNALS.trap(runtime, new BlockCallback() {
                public IRubyObject call(ThreadContext context, IRubyObject[] args, Block block) {
                    System.err.println("Ruby Thread Dump");
                    final ThreadService threadService = runtime.getThreadService();
                    RubyThread[] thrs = threadService.getActiveRubyThreads();
                    for (RubyThread th : thrs) {
                        System.err.println("\n" + th);
                        RubyException exc = new RubyException(runtime, runtime.getRuntimeError(), "");
                        ThreadContext tc = threadService.getThreadContextForThread(th);
                        if (tc != null) {
                            exc.setBacktraceData(new BacktraceData(th.javaBacktrace(), tc.createBacktrace2(0, false), false, false, Gather.NORMAL));
                            exc.printBacktrace(System.err);
                        } else {
                            System.err.println("    [no longer alive]");
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.