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

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

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

Ruby.isGlobalRuntimeReady介绍

[英]Tests whether globalRuntime has been instantiated or not. This method is used by singleton model of org.jruby.embed.ScriptingContainer to decide what RubyInstanceConfig should be used. When a global runtime is not there, RubyInstanceConfig of AbstractContextProvider will be used to enact configurations set by a user. When a global runtime is already instantiated, RubyInstanceConfig of the global runtime should be used in ScriptingContaiener.
[中]测试globalRuntime是否已实例化。这种方法被组织的单例模型所使用。jruby。嵌入ScriptingContainer来决定应该使用什么RubyInstanceConfig。如果没有全局运行时,AbstractContextProvider的RubyInstanceConfig将用于执行用户设置的配置。当全局运行时已经实例化时,应在ScriptingContainer中使用全局运行时的RubyInstanceConfig。

代码示例

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

@Override
public boolean isRuntimeInitialized() {
  return Ruby.isGlobalRuntimeReady();
}

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

@Override
public boolean isRuntimeInitialized() {
  return Ruby.isGlobalRuntimeReady();
}

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

@Override
public boolean isRuntimeInitialized() {
  return Ruby.isGlobalRuntimeReady();
}

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

@Override
public boolean isRuntimeInitialized() {
  return Ruby.isGlobalRuntimeReady();
}

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

public boolean isRuntimeInitialized() {
  return Ruby.isGlobalRuntimeReady();
}

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

public boolean isRuntimeInitialized() {
  return Ruby.isGlobalRuntimeReady();
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

public boolean isRuntimeInitialized() {
  return Ruby.isGlobalRuntimeReady();
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

public boolean isRuntimeInitialized() {
  return Ruby.isGlobalRuntimeReady();
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

@Override
public RubyInstanceConfig getRubyInstanceConfig() {
  if (Ruby.isGlobalRuntimeReady()) return Ruby.getGlobalRuntime().getInstanceConfig();
  else return config;
}

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

@Override
public RubyInstanceConfig getRubyInstanceConfig() {
  if (Ruby.isGlobalRuntimeReady()) return Ruby.getGlobalRuntime().getInstanceConfig();
  else return config;
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

@Override
public RubyInstanceConfig getRubyInstanceConfig() {
  if (Ruby.isGlobalRuntimeReady()) return Ruby.getGlobalRuntime().getInstanceConfig();
  else return config;
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

public Ruby getRuntime() {
  if (!Ruby.isGlobalRuntimeReady()) {
    return Ruby.newInstance(config);
  }
  return Ruby.getGlobalRuntime();
}

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

public Ruby getRuntime() {
  if (!Ruby.isGlobalRuntimeReady()) {
    return Ruby.newInstance(config);
  }
  return Ruby.getGlobalRuntime();
}

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

@Override
public RubyInstanceConfig getRubyInstanceConfig() {
  if (Ruby.isGlobalRuntimeReady()) return Ruby.getGlobalRuntime().getInstanceConfig();
  else return config;
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

public Ruby getRuntime() {
  if (!Ruby.isGlobalRuntimeReady()) {
    return Ruby.newInstance(config);
  }
  return Ruby.getGlobalRuntime();
}

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

public Ruby getRuntime() {
  if (!Ruby.isGlobalRuntimeReady()) {
    return Ruby.newInstance(config);
  }
  return Ruby.getGlobalRuntime();
}

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

public ConcurrentLocalContextProvider(LocalVariableBehavior behavior, boolean lazy) {
  // To save startup time, Ruby runtime instantiation should be delayed as mush as possible
  // so, don't create runtime here.
  if (Ruby.isGlobalRuntimeReady()) config = Ruby.getGlobalRuntime().getInstanceConfig();
  else config = new RubyInstanceConfig();
  this.behavior = behavior;
  this.lazy = lazy;
}

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

static RubyInstanceConfig getGlobalRuntimeConfigOrNew() {
  return Ruby.isGlobalRuntimeReady() ?
      Ruby.getGlobalRuntime().getInstanceConfig() :
        new RubyInstanceConfig();
}

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

static RubyInstanceConfig getGlobalRuntimeConfigOrNew() {
  return Ruby.isGlobalRuntimeReady() ?
      Ruby.getGlobalRuntime().getInstanceConfig() :
        new RubyInstanceConfig();
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

public ConcurrentLocalContextProvider(LocalVariableBehavior behavior, boolean lazy) {
  // To save startup time, Ruby runtime instantiation should be delayed as mush as possible
  // so, don't create runtime here.
  if (Ruby.isGlobalRuntimeReady()) config = Ruby.getGlobalRuntime().getInstanceConfig();
  else config = new RubyInstanceConfig();
  this.behavior = behavior;
  this.lazy = lazy;
}

相关文章

微信公众号

最新文章

更多

Ruby类方法