org.jruby.Ruby.getRuntimeNumber()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(124)

本文整理了Java中org.jruby.Ruby.getRuntimeNumber方法的一些代码示例,展示了Ruby.getRuntimeNumber的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.getRuntimeNumber方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:getRuntimeNumber

Ruby.getRuntimeNumber介绍

暂无

代码示例

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

public BeanManagerImpl(Ruby ruby, boolean managementEnabled) {
  this.managementEnabled = managementEnabled;
  this.base = "org.jruby:type=Runtime,name=" + ruby.getRuntimeNumber() + ",";
}

代码示例来源:origin: org.jruby/jruby-complete

public BeanManagerImpl(Ruby ruby, boolean managementEnabled) {
  this.managementEnabled = managementEnabled;
  this.base = "org.jruby:type=Runtime,name=" + FORMAT.format(new Date()) +
      ruby.getRuntimeNumber() + ",";
}

代码示例来源:origin: org.jruby/jruby-core

public BeanManagerImpl(Ruby ruby, boolean managementEnabled) {
  this.managementEnabled = managementEnabled;
  this.base = "org.jruby:type=Runtime,name=" + FORMAT.format(new Date()) +
      ruby.getRuntimeNumber() + ",";
}

代码示例来源:origin: org.jruby/jruby-complete

private static void initThreadName(final Ruby runtime, final Thread thread, final String file, final int line) {
  // "Ruby-0-Thread-16: (irb):21"
  final String newName;
  final StringBuilder name = new StringBuilder(24);
  name
      .append(RUBY_THREAD_PREFIX)
      .append(runtime.getRuntimeNumber())
      .append('-')
      .append("Thread-")
      .append(incAndGetThreadCount(runtime));
  if ( file != null ) {
    name
        .append(':')
        .append(' ')
        .append(file)
        .append(':')
        .append(line + 1);
  }
  newName = name.toString();
  thread.setName(newName);
}

代码示例来源:origin: org.jruby/jruby-core

private static void initThreadName(final Ruby runtime, final Thread thread, final String file, final int line) {
  // "Ruby-0-Thread-16: (irb):21"
  final String newName;
  final StringBuilder name = new StringBuilder(24);
  name
      .append(RUBY_THREAD_PREFIX)
      .append(runtime.getRuntimeNumber())
      .append('-')
      .append("Thread-")
      .append(incAndGetThreadCount(runtime));
  if ( file != null ) {
    name
        .append(':')
        .append(' ')
        .append(file)
        .append(':')
        .append(line + 1);
  }
  newName = name.toString();
  thread.setName(newName);
}

代码示例来源:origin: org.jruby/jruby-core

public JITCompiler(Ruby runtime) {
  this.runtime = runtime;
  this.config = runtime.getInstanceConfig();
  this.executor = new ThreadPoolExecutor(
      0, // don't start threads until needed
      2, // two max
      60, // stop then if no jitting for 60 seconds
      TimeUnit.SECONDS,
      new LinkedBlockingQueue<Runnable>(),
      new DaemonThreadFactory("Ruby-" + runtime.getRuntimeNumber() + "-JIT", Thread.MIN_PRIORITY));
}

代码示例来源:origin: org.jruby/jruby-complete

public JITCompiler(Ruby runtime) {
  this.runtime = runtime;
  this.config = runtime.getInstanceConfig();
  this.executor = new ThreadPoolExecutor(
      0, // don't start threads until needed
      2, // two max
      60, // stop then if no jitting for 60 seconds
      TimeUnit.SECONDS,
      new LinkedBlockingQueue<Runnable>(),
      new DaemonThreadFactory("Ruby-" + runtime.getRuntimeNumber() + "-JIT", Thread.MIN_PRIORITY));
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

public JITCompiler(Ruby runtime) {
  this.runtime = runtime;
  this.config = runtime.getInstanceConfig();
  this.executor = new ThreadPoolExecutor(
      2, // always two threads
      2,
      0, // never stop
      TimeUnit.SECONDS,
      new LinkedBlockingQueue<Runnable>(),
      new DaemonThreadFactory("Ruby-" + runtime.getRuntimeNumber() + "-JIT", Thread.MIN_PRIORITY));
  
  runtime.getBeanManager().register(this);
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

Thread thread = new Thread(runnable);
thread.setDaemon(true);
thread.setName("Ruby-" + runtime.getRuntimeNumber() + "-" + thread.getName() + ": " + context.getFile() + ":" + (context.getLine() + 1));
threadImpl = new NativeThread(this, thread);

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

TimeUnit.SECONDS,
new SynchronousQueue<Runnable>(),
new DaemonThreadFactory("Ruby-" + getRuntimeNumber() + "-Worker"));
TimeUnit.SECONDS,
new SynchronousQueue<Runnable>(),
new DaemonThreadFactory("Ruby-" + getRuntimeNumber() + "-Fiber"));

代码示例来源:origin: org.jruby/jruby-complete

TimeUnit.SECONDS,
new SynchronousQueue<Runnable>(),
new DaemonThreadFactory("Ruby-" + getRuntimeNumber() + "-Worker"));
TimeUnit.SECONDS,
new SynchronousQueue<Runnable>(),
new DaemonThreadFactory("Ruby-" + getRuntimeNumber() + "-Fiber"));

代码示例来源:origin: org.jruby/jruby-core

TimeUnit.SECONDS,
new SynchronousQueue<Runnable>(),
new DaemonThreadFactory("Ruby-" + getRuntimeNumber() + "-Worker"));
TimeUnit.SECONDS,
new SynchronousQueue<Runnable>(),
new DaemonThreadFactory("Ruby-" + getRuntimeNumber() + "-Fiber"));

相关文章

Ruby类方法