TorqueBox 3.1.2

org.torquebox.core.runtime
Class PoolMetaData

java.lang.Object
  extended by org.torquebox.core.runtime.PoolMetaData

public class PoolMetaData
extends Object

Ruby interpreter pool configuration.

Pools may be created as non-shared, shared, or backed by the global interpreter. These three types of pools are ranked from most memory-intensive (but more secure) to less memory-intensive (but less secure, due to sharing). Threadsafety of the client application should be considered when configuring a pool.

A non-shared pool allows exclusive access to each pooled interpreter to exactly one client at a time. A non-shared pool has minimum and maximum size settings.

A shared pool is a pool backed by a single interpreter, shared among many client simultaneously. The pool owns the interpreter.

A global pool is backed by a single global interpreter, possibly shared with other global pools.

Author:
Bob McWhirter

Nested Class Summary
static class PoolMetaData.PoolType
          Pool types.
 
Field Summary
static org.jboss.as.server.deployment.AttachmentKey<org.jboss.as.server.deployment.AttachmentList<PoolMetaData>> ATTACHMENTS_KEY
           
 
Constructor Summary
PoolMetaData(String name)
          Named SHARED
PoolMetaData(String name, int min, int max)
          Named NON_SHARED
PoolMetaData(String name, PoolMetaData.PoolType type)
          Named specific type
 
Method Summary
static PoolMetaData extractNamedMetaData(List<PoolMetaData> list, String name)
           
 String getInstanceFactoryName()
          Retrieve the instance-factory name.
 String getInstanceName()
          Retrieve the instance name for shared pools.
 int getMaximumSize()
          Retrieve the maximum size of the pool.
 int getMinimumSize()
          Retrieve the minimum size of the pool.
 String getName()
          Retrieve the name of the pool.
 boolean isDeferUntilRequested()
           
 boolean isGlobal()
          Determine if this pool is configured for shared access to the global instance.
 boolean isShared()
          Determine if this pool is configured for shared access to a single instance.
 void setDeferUntilRequested(boolean deferUntilRequested)
           
 void setGlobal()
          Configure this pool to share the global instance.
 void setInstanceFactoryName(String instanceFactoryName)
          Set the optional instance-factory name.
 void setInstanceName(String instanceName)
          Set the instance name for shared pools.
 void setMaximumSize(int maximumSize)
          Set the maximum size of the pool.
 void setMinimumSize(int minimumSize)
          Set the minimum size of the pool.
 void setShared()
          Configure this pool to share a single instance.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTACHMENTS_KEY

public static final org.jboss.as.server.deployment.AttachmentKey<org.jboss.as.server.deployment.AttachmentList<PoolMetaData>> ATTACHMENTS_KEY
Constructor Detail

PoolMetaData

public PoolMetaData(String name)
Named SHARED


PoolMetaData

public PoolMetaData(String name,
                    int min,
                    int max)
Named NON_SHARED


PoolMetaData

public PoolMetaData(String name,
                    PoolMetaData.PoolType type)
Named specific type

Method Detail

extractNamedMetaData

public static PoolMetaData extractNamedMetaData(List<PoolMetaData> list,
                                                String name)

getName

public String getName()
Retrieve the name of the pool.

Returns:
The name of the pool.

setMinimumSize

public void setMinimumSize(int minimumSize)
Set the minimum size of the pool.

Parameters:
minimumSize - The minimum size of the pool.

getMinimumSize

public int getMinimumSize()
Retrieve the minimum size of the pool.

Returns:
The minimum size of the pool.

setMaximumSize

public void setMaximumSize(int maximumSize)
Set the maximum size of the pool.

Parameters:
maximumSize - The maximum size of the pool.

getMaximumSize

public int getMaximumSize()
Retrieve the maximum size of the pool.

Returns:
The maximum size of the pool.

setShared

public void setShared()
Configure this pool to share a single instance.


isShared

public boolean isShared()
Determine if this pool is configured for shared access to a single instance.

Returns:
true if so, otherwise false.

setInstanceFactoryName

public void setInstanceFactoryName(String instanceFactoryName)
Set the optional instance-factory name.

Parameters:
instanceFactoryName - The name of the instance factory to use if non-global.

getInstanceFactoryName

public String getInstanceFactoryName()
Retrieve the instance-factory name.

Returns:
The name of instance factory to use if non-global.

setInstanceName

public void setInstanceName(String instanceName)
Set the instance name for shared pools.

Parameters:
instanceName - The instance name for shared pools.

getInstanceName

public String getInstanceName()
Retrieve the instance name for shared pools.

Returns:
The instance name for shared pools.

setGlobal

public void setGlobal()
Configure this pool to share the global instance.


isGlobal

public boolean isGlobal()
Determine if this pool is configured for shared access to the global instance.

Returns:
true if so, otherwise false.

isDeferUntilRequested

public boolean isDeferUntilRequested()

setDeferUntilRequested

public void setDeferUntilRequested(boolean deferUntilRequested)

toString

public String toString()
Overrides:
toString in class Object

TorqueBox 3.1.2

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