public class ConfigurationParameters extends Object implements Cloneable, Serializable
ThrowBoundaryError
associated with a Schedulable
.
Note that these parameters are immutable.
Since JamaicaVM has a fixed block size for object, the default for the string parametes, class name length, method name length, and file name length, should be chosen to optimally use the space reserved. For instance, in the case of contiguous array, a string length of 25 will use a full block more than one of 24, or 32 more bytes. The next effective size is 40 characters. When stored as tree arrays both these values use one additional block. This is true up to 56 charaters. Longer sizes are generally not required. In general, class names are longer than method or file names, since they include its package name. The equivalent number of frame count are 12, 20, and 48.
Constructor and Description |
---|
ConfigurationParameters(int messageLength,
int stackTraceDepth,
int classNameLength,
int methodNameLength,
int fileNameLength,
long[] sizes)
Creates a parameter object for initializing the state of a
Schedulable . |
ConfigurationParameters(long[] sizes)
Same as
ConfigurationParameters(int,int,int,int,int,long[])
with arguments (0, 0, 0, 0, 0, sizes) . |
Modifier and Type | Method and Description |
---|---|
int |
getClassNameLength()
Obtain the maximum number of character available for storing class names
in each stack trace frame.
|
static ConfigurationParameters |
getDefault()
Set the parameters object to be used when none is provided for an
instance of
Schedulable . |
static ReleaseRunner |
getDefaultRunner()
Gets the system default release runner.
|
int |
getFileNameLength()
Obtain the maximum number of character available for storing file names
in each stack trace frame.
|
int |
getMessageLength()
Obtain the size of the buffer dedicated to storing the message of the
last thrown throwable in the context of instances of
Schedulable
created with these parameters. |
int |
getMethodNameLength()
Obtain the maximum number of character available for storing method
signatures in each stack trace frame.
|
long[] |
getSizes()
Gets the array of implementation-specific sizes associated with
Schedulable objects created with these parameters. |
int |
getStackTraceDepth()
Obtain the number of frames available for storing the stack trace of the
last thrown throwable in the context of instances of
Schedulable
created with these parameters. |
static void |
setDefault(ConfigurationParameters config)
Set the parameters object to be used when none is provided for an
instance of
Schedulable . |
static void |
setDefaultRunner(ReleaseRunner runner)
Sets the system default release runner.
|
public ConfigurationParameters(int messageLength, int stackTraceDepth, int classNameLength, int methodNameLength, int fileNameLength, long[] sizes) throws StaticIllegalStateException
Schedulable
. The parameters provide the data for this
initialization. For RealtimeThread
and bound versions of
AsyncBaseEventHandler
, the stack and message buffers
can be set exactly, but for the unbound event handlers, the system
cannot give any guarentees to allow thread sharing.StaticIllegalStateException
messageLength
- The size of the buffer, in units of char
,
for storing an exception message used by preallocated exceptions
and errors thrown in the context
of an instance of Schedulable
which was created with
this
as its configuration parameters. The value 0
indicates that no message should be stored. The value of -1
uses the system default and is the default when an instance of
this class is not provided.stackTraceDepth
- The number of stack trace elements,
reserved for use by preallocated exceptions and errors
thrown in the execution context of the Schedulable
object
created with these parameters. The
amount of space this requires is implementation-specific.
The value 0
indicates that no stack trace
should be stored. The value of -1
uses
the system default and is the default when an instance of this
class is not provided.classNameLength
- The number of characters reserved in each frame
for saving the full class name in a given stack trace frame.methodNameLength
- The number of characters reserved in each frame
for saving the method signature in a given stack trace frame.fileNameLength
- The number of characters reserved in each frame
for saving the file name in a given stack trace frame.sizes
- An array of implementation-specific values dictating
memory parameters for Schedulable
objects
created with these parameters, such as maximum Java and
native stack sizes. The sizes
array will not
be stored in the constructed object. The default is system
dependent, and indicated by setting this parameter to null
or by not providing an instance of this class.
JamaicaVM: not yet used.
public ConfigurationParameters(long[] sizes)
ConfigurationParameters(int,int,int,int,int,long[])
with arguments (0, 0, 0, 0, 0, sizes)
.public static void setDefault(ConfigurationParameters config)
Schedulable
. Setting to null
restores
the default values.config
- the new default parameter object.public static ConfigurationParameters getDefault()
Schedulable
.public static void setDefaultRunner(ReleaseRunner runner)
runner
- The runner to be used when none is set. When
null
, the default release runner is set to the
original system default.public static ReleaseRunner getDefaultRunner()
public int getMessageLength()
Schedulable
created with these parameters.
The value 0
indicates that no message will be stored.char
.public int getStackTraceDepth()
Schedulable
created with these parameters.
The value 0
indicates that no stack trace will be stored.public int getClassNameLength()
char
.public int getMethodNameLength()
char
.public int getFileNameLength()
char
.public long[] getSizes()
Schedulable
objects created with these parameters.
This method may allocate memory.null
when none are set.aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2019 aicas GmbH. All Rights Reserved.