TorqueBox 3.1.2

org.torquebox.core.runtime
Class RestartableRubyRuntimePool

java.lang.Object
  extended by org.torquebox.core.runtime.RestartableRubyRuntimePool
All Implemented Interfaces:
BasicRubyRuntimePoolMBean, RestartableRubyRuntimePoolMBean, RubyRuntimePool

public class RestartableRubyRuntimePool
extends Object
implements RubyRuntimePool, RestartableRubyRuntimePoolMBean


Constructor Summary
RestartableRubyRuntimePool(RubyRuntimePool pool)
           
 
Method Summary
 org.jruby.Ruby borrowRuntime(String requester)
           
 RubyRuntimePool duplicate()
           
 Object evaluate(String code)
           
 Set<String> getAllRuntimeNames()
           
 int getAvailable()
           
 RubyRuntimePool getBackingPool()
           
 int getBorrowed()
           
 int getMaximumInstances()
           
 int getMinimumInstances()
           
 String getName()
           
 int getSize()
           
 boolean isDeferredUntilRequested()
           
 boolean isDrained()
           
 boolean isLazy()
           
 boolean isStarted()
           
 void registerRestartListener(RubyRuntimePoolRestartListener listener)
           
 void restart()
           
protected  void restartInternal(RubyRuntimePool newPool)
           
protected  void retirePool(RubyRuntimePool pool)
           
 void returnRuntime(org.jruby.Ruby runtime)
           
 void setDeferUntilRequested(boolean deferUntilRequested)
           
 void setInstanceFactory(InstanceFactory<org.jruby.Ruby> factory)
           
 void setMaximumInstances(int maxInstances)
           
 void setMinimumInstances(int minInstances)
           
 void setNamespaceContextSelector(org.jboss.as.naming.context.NamespaceContextSelector nsContextSelector)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestartableRubyRuntimePool

public RestartableRubyRuntimePool(RubyRuntimePool pool)
Method Detail

restart

public void restart()
Specified by:
restart in interface RestartableRubyRuntimePoolMBean

restartInternal

protected void restartInternal(RubyRuntimePool newPool)

borrowRuntime

public org.jruby.Ruby borrowRuntime(String requester)
                             throws Exception
Specified by:
borrowRuntime in interface RubyRuntimePool
Throws:
Exception

returnRuntime

public void returnRuntime(org.jruby.Ruby runtime)
Specified by:
returnRuntime in interface RubyRuntimePool

retirePool

protected void retirePool(RubyRuntimePool pool)

getAllRuntimeNames

public Set<String> getAllRuntimeNames()
Specified by:
getAllRuntimeNames in interface BasicRubyRuntimePoolMBean
Specified by:
getAllRuntimeNames in interface RubyRuntimePool

getName

public String getName()
Specified by:
getName in interface BasicRubyRuntimePoolMBean
Specified by:
getName in interface RubyRuntimePool

start

public void start()
           throws Exception
Specified by:
start in interface RubyRuntimePool
Throws:
Exception

stop

public void stop()
          throws Exception
Specified by:
stop in interface RubyRuntimePool
Throws:
Exception

registerRestartListener

public void registerRestartListener(RubyRuntimePoolRestartListener listener)

setNamespaceContextSelector

public void setNamespaceContextSelector(org.jboss.as.naming.context.NamespaceContextSelector nsContextSelector)
Specified by:
setNamespaceContextSelector in interface RubyRuntimePool

setInstanceFactory

public void setInstanceFactory(InstanceFactory<org.jruby.Ruby> factory)
Specified by:
setInstanceFactory in interface RubyRuntimePool

duplicate

public RubyRuntimePool duplicate()
Specified by:
duplicate in interface RubyRuntimePool

isDrained

public boolean isDrained()
Specified by:
isDrained in interface RubyRuntimePool

evaluate

public Object evaluate(String code)
                throws Exception
Specified by:
evaluate in interface BasicRubyRuntimePoolMBean
Specified by:
evaluate in interface RubyRuntimePool
Throws:
Exception

setMinimumInstances

public void setMinimumInstances(int minInstances)
Specified by:
setMinimumInstances in interface BasicRubyRuntimePoolMBean
Specified by:
setMinimumInstances in interface RubyRuntimePool

getMinimumInstances

public int getMinimumInstances()
Specified by:
getMinimumInstances in interface BasicRubyRuntimePoolMBean
Specified by:
getMinimumInstances in interface RubyRuntimePool

setMaximumInstances

public void setMaximumInstances(int maxInstances)
Specified by:
setMaximumInstances in interface BasicRubyRuntimePoolMBean
Specified by:
setMaximumInstances in interface RubyRuntimePool

getMaximumInstances

public int getMaximumInstances()
Specified by:
getMaximumInstances in interface BasicRubyRuntimePoolMBean
Specified by:
getMaximumInstances in interface RubyRuntimePool

isLazy

public boolean isLazy()
Specified by:
isLazy in interface BasicRubyRuntimePoolMBean
Specified by:
isLazy in interface RubyRuntimePool

isStarted

public boolean isStarted()
Specified by:
isStarted in interface BasicRubyRuntimePoolMBean
Specified by:
isStarted in interface RubyRuntimePool

getSize

public int getSize()
Specified by:
getSize in interface BasicRubyRuntimePoolMBean
Specified by:
getSize in interface RubyRuntimePool

getBorrowed

public int getBorrowed()
Specified by:
getBorrowed in interface BasicRubyRuntimePoolMBean
Specified by:
getBorrowed in interface RubyRuntimePool

getAvailable

public int getAvailable()
Specified by:
getAvailable in interface BasicRubyRuntimePoolMBean
Specified by:
getAvailable in interface RubyRuntimePool

isDeferredUntilRequested

public boolean isDeferredUntilRequested()
Specified by:
isDeferredUntilRequested in interface RubyRuntimePool

setDeferUntilRequested

public void setDeferUntilRequested(boolean deferUntilRequested)
Specified by:
setDeferUntilRequested in interface RubyRuntimePool

getBackingPool

public RubyRuntimePool getBackingPool()

TorqueBox 3.1.2

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.