one.world
Class Constants

java.lang.Object
  |
  +--one.world.Constants

public final class Constants
extends Object

Definition of global constants for one.world. Note that most constants defined by this class can be customized through system properties.

Version:
$Revision: 1.38 $

Field Summary
static int ANIMATOR_ADD_THREADS
          The number of threads to add to a concurrent animator if its queue is over the busy threshold.
static int ANIMATOR_CAPACITY
          The default capacity for event queues used by animators.
static long ANIMATOR_IDLE_TIME
          The idle time for concurrent animators.
static int ANIMATOR_MAX_THREADS
          The maximum number of threads used by concurrent animators.
static int ANIMATOR_MIN_THREADS
          The minimum number of threads used by concurrent animators.
static int ANIMATOR_ROOT_ADD_THREADS
          The number of threads to add to the root environment's animator if its queue is over the busy threshold.
static int ANIMATOR_ROOT_MAX_THREADS
          The maximum number of threads used by the root environment.
static int ANIMATOR_ROOT_MIN_THREADS
          The minimum number of threads used by the root environment.
static int ANIMATOR_ROOT_THRESHOLD
          The busy threshold for adding new threads to the root environment's animator.
static long ANIMATOR_SCAN_TIME
          The time between scans for the animator controller.
static int ANIMATOR_THRESHOLD
          The busy threshold for adding new threads to a concurrent animator.
static String BUILD_TIME
          The GMT build time for this release of one.world, represented as a human readable string.
static long CAFFEINE_MARK_RATING
          The embedded CaffeineMark 3.0 performance rating for the Java virtual machine running one.world.
static int CHUNKING_THRESHOLD
          The threshold for representing arbitrary byte arrays as a list of chunks instead of a single binary data tuple.
static boolean DEBUG_DISCOVERY
          The flag for whether discovery should print debug messages.
static boolean DEBUG_ENVIRONMENT
          The flag for whether environment operations should print debug messages.
static boolean DEBUG_EVENTS
          The flag for whether event processing in the core system should be use extra validation and print debug messages.
static boolean DEBUG_NETWORK
          The flag for whether structured I/O networking should print debug messages.
static boolean DEBUG_REP
          The flag for whether basic REP should print debug messages.
static boolean DEBUG_THREAD_CONTROL
          The flag for whether animator controllers should print debug messages.
static boolean DEBUG_TIMER
          The flag for whether timers should print debug messages.
static boolean DEBUG_TUPLE_STORE
          The flag for whether the tuple store should print debug messages.
static String DISCOVERY_ANNOUNCE_ADDR
          The IP multicast address for server announcements from a discovery server.
static long DISCOVERY_ANNOUNCE_PERIOD
          The period between advertisments from a discovery server in milliseconds.
static int DISCOVERY_ANNOUNCE_PORT
          The port number for periodic advertisements from a discovery server.
static long DISCOVERY_ANNOUNCE_VALUE
          The value sent by this discovery server for elections.
static String DISCOVERY_BINDING
          The name of the meta-data field specifying which binding was the source of this forwarded event.
static String DISCOVERY_ELECTION_ADDR
          The IP multicast address for calling and performing elections.
static long DISCOVERY_ELECTION_CALL_TIME
          The length of time to wait before calling a discovery server election (in milliseconds).
static long DISCOVERY_ELECTION_DURATION
          The length of time to wait for the election to complete (in milliseconds).
static int DISCOVERY_ELECTION_PORT
          The port number for election.
static String DISCOVERY_SOURCE_SERVER
          The name of the meta-data field specifying which discovery server forwarded this event.
static long LEASE_DEFAULT_DURATION
          The default duration for leases.
static long LEASE_MAX_DURATION
          The maximum duration for leases.
static long LEASE_MIN_DURATION
          The minimum duration for leases.
static int MAJOR_VERSION
          The major version of this release of one.world.
static int MICRO_VERSION
          The micro version of this release of one.world.
static int MINOR_VERSION
          The minor version of this release of one.world.
static long NETWORK_TIMEOUT
          The default timeout for receiving responses from remote events sent over the network.
static int OPERATION_RETRIES
          The default number of retries when performing an operation.
static long OPERATION_TIMEOUT
          The default timeout when performing an operation.
static int PORT
          The default port for structured I/O communication channels.
static long REP_CACHE_TIMEOUT
          The frequency, in milliseconds, with which cached REP connections will be checked to see if they are still active.
static boolean REP_FORCE_NETWORK
          Indicates whether local events must be delivered via the network stack rather than directly.
static int REP_MAX_RETRIES
          The maximum number of retries for sending a remote event or a resolution request.
static int REP_PORT
          The port on which to receive remote events.
static int REP_QUEUE_CAPACITY
          The number of remote events to queue while waiting to establish a connection to a remote endpoint.
static String REP_RETRIES
          The name of the meta-data field specifying the number of retries when sending a remote event or a resolution request.
static String REQUESTOR_ADDRESS
          The name of the meta-data field specifying the requesting environment's IP address.
static String REQUESTOR_ID
          The name of the meta-data field specifying the requesting environment's ID.
static String REQUESTOR_PORT
          The name of the meta-data field specifying the requesting environment's port number.
static int SHELL_PORT
          The port on which the root shell accepts telnet connections.
static long SYNCHRONOUS_TIMEOUT
          The default timeout for synchronous invocations in milliseconds.
static long TIMER_PERIOD
          The period for repeated timer notifications.
 
Method Summary
static boolean getBoolean(String name)
          Get the boolean value from the specified system property.
static int getInt(String name, int value)
          Get the integer value from the specified system property.
static long getLong(String name, long value)
          Get the long value from the specified system property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG_EVENTS

public static final boolean DEBUG_EVENTS
The flag for whether event processing in the core system should be use extra validation and print debug messages. This constant can be specified using the "one.world.debug.events" system property. If this system property is not defined or not "true" (case insensitive), the default is false. Note that this flag can also be set by specifying the "one.world.debug" system property as "true".

DEBUG_ENVIRONMENT

public static final boolean DEBUG_ENVIRONMENT
The flag for whether environment operations should print debug messages. This constant can be specified using the "one.world.debug.environment" system property. If this system property is not defined or not "true" (case insensitive), the default is false. Note that this flag can also be set by specifying the "one.world.debug" system property as "true".

DEBUG_TUPLE_STORE

public static final boolean DEBUG_TUPLE_STORE
The flag for whether the tuple store should print debug messages. This constant can be specified using the "one.world.debug.tuple.store" system property. If this system property is not defined or not "true" (case insensitive), the default is false. Note that this flag can also be set by specifying the "one.world.debug" system property as "true".

DEBUG_THREAD_CONTROL

public static final boolean DEBUG_THREAD_CONTROL
The flag for whether animator controllers should print debug messages. This constant can be specified using the "one.world.debug.thread.control" system property. If this system property is not defined or not "true" (case insensitive), the default is false. Note that this flag can also be set by specifying the "one.world.debug" system property as "true".

DEBUG_TIMER

public static final boolean DEBUG_TIMER
The flag for whether timers should print debug messages. This constant can be specified using the "one.world.debug.timer" system property. If this system property is not defined or not "true" (case insensitive), the default is false. Note that this flag can also be set by specifying the "one.world.debug" system property as "true".

DEBUG_NETWORK

public static final boolean DEBUG_NETWORK
The flag for whether structured I/O networking should print debug messages. This constant can be specified using the "one.world.debug.network" system property. If this system property is not defined or not "true" (case insensitive), the default is false. Note that this flag can also be set by specifying the "one.world.debug" system property as "true".

DEBUG_REP

public static final boolean DEBUG_REP
The flag for whether basic REP should print debug messages. This constant can be specified using the "one.world.debug.rep" system property. If this system property is not defined or not "true" (case insensitive), the default is false. Note that this flag can also be set by specifying the "one.world.debug" system property as "true".

DEBUG_DISCOVERY

public static final boolean DEBUG_DISCOVERY
The flag for whether discovery should print debug messages. This constant can be specified using the "one.world.debug.discovery" system property. If this system property is not defined or not "true" (case insensitive), the default is false. Note that this flag can also be set by specifying the "one.world.debug" system property as "true".

MAJOR_VERSION

public static final int MAJOR_VERSION
The major version of this release of one.world.

MINOR_VERSION

public static final int MINOR_VERSION
The minor version of this release of one.world.

MICRO_VERSION

public static final int MICRO_VERSION
The micro version of this release of one.world.

BUILD_TIME

public static final String BUILD_TIME
The GMT build time for this release of one.world, represented as a human readable string.

CAFFEINE_MARK_RATING

public static final long CAFFEINE_MARK_RATING
The embedded CaffeineMark 3.0 performance rating for the Java virtual machine running one.world. This constant can be specified using the "caffeine.mark.rating" system property. If this system property is not defined, the default is -1 (which is not a legal CaffeineMark rating).

A re-packaged version of the benchmark is available here. Simply download the file and execute

   java -jar bench.jar
 
in the same directory, which will run the benchmark and print the overall performance rating.


SYNCHRONOUS_TIMEOUT

public static final long SYNCHRONOUS_TIMEOUT
The default timeout for synchronous invocations in milliseconds. This constant can be specified using the "one.world.synchronous.timeout" system property. If this system property is not defined, the default is 1 minute.

NETWORK_TIMEOUT

public static final long NETWORK_TIMEOUT
The default timeout for receiving responses from remote events sent over the network. This constant can be specified using the "one.world.network.timeout" system property. If this system property is not defined, the default is 1 minute.

ANIMATOR_CAPACITY

public static final int ANIMATOR_CAPACITY
The default capacity for event queues used by animators. This constant can be specified using the "one.world.animator.capacity" system property. If this system property is not defined, the default is 100.
See Also:
Animator

ANIMATOR_MIN_THREADS

public static final int ANIMATOR_MIN_THREADS
The minimum number of threads used by concurrent animators. This constant can be specified using the "one.world.animator.min.threads" system property. If this system property is not defined, the default is 1.
See Also:
Animator

ANIMATOR_MAX_THREADS

public static final int ANIMATOR_MAX_THREADS
The maximum number of threads used by concurrent animators. This constant can be specified using the "one.world.animator.max.threads" system property. If this system property is not defined, the default is 20.
See Also:
Animator

ANIMATOR_IDLE_TIME

public static final long ANIMATOR_IDLE_TIME
The idle time for concurrent animators. When a concurrent animator's thread is idle for this time and has more threads than the minimum number of threads, the thread is terminated. This constant can be specified using the "one.world.animator.idle.time" system property. If this system property is not defined, the default is 5 seconds.
See Also:
Animator

ANIMATOR_SCAN_TIME

public static final long ANIMATOR_SCAN_TIME
The time between scans for the animator controller. This constant can be specified using the "one.world.animator.scan.time" system property. If this system property is not defined, the default is 2 seconds.
See Also:
Animator.Controller

ANIMATOR_THRESHOLD

public static final int ANIMATOR_THRESHOLD
The busy threshold for adding new threads to a concurrent animator. This constant can be specified using the "one.world.animator.threshold" system property. If this system property is not defined, the default is half of the animator capacity.
See Also:
ANIMATOR_CAPACITY, Animator.Controller

ANIMATOR_ADD_THREADS

public static final int ANIMATOR_ADD_THREADS
The number of threads to add to a concurrent animator if its queue is over the busy threshold. This constant can be specified using the "one.world.animator.add.threads" system property. If this system property is not defined, the default is 1.
See Also:
ANIMATOR_THRESHOLD, Animator.Controller

ANIMATOR_ROOT_MIN_THREADS

public static final int ANIMATOR_ROOT_MIN_THREADS
The minimum number of threads used by the root environment. This constant can be specified using the "one.world.animator.root.min.threads" system property. If this system property is not defined, the default is 5.
See Also:
Animator

ANIMATOR_ROOT_MAX_THREADS

public static final int ANIMATOR_ROOT_MAX_THREADS
The maximum number of threads used by the root environment. This constant can be specified using the "one.world.animator.root.max.threads" system property. If this system property is not defined, the default is 50.
See Also:
Animator

ANIMATOR_ROOT_THRESHOLD

public static final int ANIMATOR_ROOT_THRESHOLD
The busy threshold for adding new threads to the root environment's animator. This constant can be specified using the "one.world.animator.root.threshold" system property. If this system property is not defined, the default is a third of the animator capacity.
See Also:
ANIMATOR_CAPACITY, Animator.Controller

ANIMATOR_ROOT_ADD_THREADS

public static final int ANIMATOR_ROOT_ADD_THREADS
The number of threads to add to the root environment's animator if its queue is over the busy threshold. This constant can be specified using the "one.world.animator.root.add.threads" system property. If this system property is not defined, the default is 2.
See Also:
ANIMATOR_ROOT_THRESHOLD, Animator.Controller

TIMER_PERIOD

public static final long TIMER_PERIOD
The period for repeated timer notifications. This constants is used for setting up repeated timer notifications so that timed notifications are not lost, even if all event queues are full. It can be specified using the "one.world.timer.period" system property. If this system propery is not defined, the default is 1 second.
See Also:
Timer

LEASE_MIN_DURATION

public static final long LEASE_MIN_DURATION
The minimum duration for leases. This constant can be specified using the "one.world.lease.min.duration" system property. If this system property is not defined, the default is 1 second.
See Also:
LeaseManager

LEASE_DEFAULT_DURATION

public static final long LEASE_DEFAULT_DURATION
The default duration for leases. This constant can be specified using the "one.world.lease.duration" system property. If this system property is not defined, the default is 1 minute.
See Also:
LeaseManager

LEASE_MAX_DURATION

public static final long LEASE_MAX_DURATION
The maximum duration for leases. This constant can be specified using the "one.world.lease.max.duration" system property. If this system property is not defined, the default is 10 minutes.
See Also:
LeaseManager

OPERATION_RETRIES

public static final int OPERATION_RETRIES
The default number of retries when performing an operation. This constant can be specified using the "one.world.operation.retries" system property. The default is 3.
See Also:
Operation

OPERATION_TIMEOUT

public static final long OPERATION_TIMEOUT
The default timeout when performing an operation. This constant can be specified using the "one.world.operation.timeout" system property. The default is the synchronous timeout.
See Also:
SYNCHRONOUS_TIMEOUT, Operation

REQUESTOR_ID

public static final String REQUESTOR_ID
The name of the meta-data field specifying the requesting environment's ID. Events sent to an environment's request exported event handler are annotated with the sending environment's ID. The name of this meta-data field is "one.world.requestor.id".

REQUESTOR_ADDRESS

public static final String REQUESTOR_ADDRESS
The name of the meta-data field specifying the requesting environment's IP address. Events sent through REP are annotated with the sending environment's ID, IP address, and port number. The name of this meta-data field is "one.world.requestor.address".
See Also:
REQUESTOR_ID, REQUESTOR_PORT

REQUESTOR_PORT

public static final String REQUESTOR_PORT
The name of the meta-data field specifying the requesting environment's port number. Events sent through REP are annotated with the sending environment's ID, IP address, and port number. The name of this meta-data field is "one.world.requestor.port".
See Also:
REQUESTOR_ID, REQUESTOR_ADDRESS

PORT

public static final int PORT
The default port for structured I/O communication channels. This constant can be specified using the "one.world.port" system property. If this system property is not defined, the default port is 5101.
See Also:
SioResource

SHELL_PORT

public static final int SHELL_PORT
The port on which the root shell accepts telnet connections. This constant can be specified using the "one.world.shell.port" system property. If this system property is not defined, the default port is the default telnet port (23). Note that the root shell only accepts telnet connections if the "one.world.shell.pwd" system property is defined.
See Also:
Shell

REP_PORT

public static final int REP_PORT
The port on which to receive remote events. This constant can be specified using the "one.world.rep.port" system property. If this system property is not defined, the default port is 5102.
See Also:
one.world.rep

REP_FORCE_NETWORK

public static final boolean REP_FORCE_NETWORK
Indicates whether local events must be delivered via the network stack rather than directly. This constant can be specified using the "one.world.rep.force.network" system property. If this system property is not defined, the default port is false.
See Also:
one.world.rep

REP_CACHE_TIMEOUT

public static final long REP_CACHE_TIMEOUT
The frequency, in milliseconds, with which cached REP connections will be checked to see if they are still active. This constant can be specified using the "one.world.rep.cache.timeout" system property. If this system property is not defined, the default cache timeout is one minute.
See Also:
one.world.rep

REP_MAX_RETRIES

public static final int REP_MAX_RETRIES
The maximum number of retries for sending a remote event or a resolution request. This constant can be specified using the "one.world.rep.max.retries" system property. If this system property is not defined, the default maximum number of retries is 1.
See Also:
one.world.rep

REP_QUEUE_CAPACITY

public static final int REP_QUEUE_CAPACITY
The number of remote events to queue while waiting to establish a connection to a remote endpoint. If any more events are received before the connection is established, the response will be a NoBufferSpaceException. This constant can be specified using the "one.world.rep.queue.capacity" system property. If this system property is not defined, the default queue size is ANIMATOR_CAPACITY.
See Also:
one.world.rep

REP_RETRIES

public static final String REP_RETRIES
The name of the meta-data field specifying the number of retries when sending a remote event or a resolution request. The name of this meta-data field is "one.world.rep.retries".
See Also:
one.world.rep

DISCOVERY_ANNOUNCE_ADDR

public static final String DISCOVERY_ANNOUNCE_ADDR
The IP multicast address for server announcements from a discovery server. This address should be used with the DISCOVERY_ANNOUNCE_PORT. This constant can be specified using the "one.world.discovery.announce.addr" system property. The default is 230.0.0.1.

DISCOVERY_ANNOUNCE_PORT

public static final int DISCOVERY_ANNOUNCE_PORT
The port number for periodic advertisements from a discovery server. This port number should be used with the DISCOVERY_ANNOUNCE_ADDR. This constant can be specified using the "one.world.discovery.announce.port system property. The default is 5104.

This must not conflict with any other port number. Changing the discovery server announcement port without changing the election port could result in strange behavior such as the elected server not being visible to the other discovery clients on the network.


DISCOVERY_ELECTION_ADDR

public static final String DISCOVERY_ELECTION_ADDR
The IP multicast address for calling and performing elections. This address should be used with the DISCOVERY_ELECTION_PORT. This constant can be specified using the "one.world.discovery.election.addr" system property. The default is 230.0.0.1.

DISCOVERY_ELECTION_PORT

public static final int DISCOVERY_ELECTION_PORT
The port number for election. This address should be used with the DISCOVERY_ELECTION_ADDR. This constant can be specified using the "one.world.discovery.election.port" system property. The default is 5105.

DISCOVERY_ANNOUNCE_PERIOD

public static final long DISCOVERY_ANNOUNCE_PERIOD
The period between advertisments from a discovery server in milliseconds. The advertisements occur on the multicast channel specified by the <DISCOVERY_ANNOUNCE_ADDR, DISCOVERY_ANNOUNCE_PORT> pair. This constant can be specified using the "one.world.discovery.announce.period" system property. The default is two seconds.

DISCOVERY_ANNOUNCE_VALUE

public static final long DISCOVERY_ANNOUNCE_VALUE
The value sent by this discovery server for elections. This should normally be -1 to indicate that a heuristic based on the node uptime and memory should be used. If any other value, this value will be used during discovery elections. This is primarily useful as a testing aid. This constant can be sepecified using the "one.world.discovery.announce.value" system property. The default is -1.

DISCOVERY_ELECTION_DURATION

public static final long DISCOVERY_ELECTION_DURATION
The length of time to wait for the election to complete (in milliseconds). This constant can be specified using the "one.world.discovery.election.duration" system property. The default is one second.

DISCOVERY_ELECTION_CALL_TIME

public static final long DISCOVERY_ELECTION_CALL_TIME
The length of time to wait before calling a discovery server election (in milliseconds). This constant can be specified using the "one.world.discovery.election.calltime" system property. The default is twice the period of an announcemnt.
See Also:
DISCOVERY_ANNOUNCE_PERIOD

DISCOVERY_SOURCE_SERVER

public static final String DISCOVERY_SOURCE_SERVER
The name of the meta-data field specifying which discovery server forwarded this event. This is used to squelch UnknownResourceException events for stale bindings.

DISCOVERY_BINDING

public static final String DISCOVERY_BINDING
The name of the meta-data field specifying which binding was the source of this forwarded event. This is used to squelch UnknownResourceException events for stale bindings.

CHUNKING_THRESHOLD

public static final int CHUNKING_THRESHOLD
The threshold for representing arbitrary byte arrays as a list of chunks instead of a single binary data tuple. This constant can be specified using the "one.world.chunking.threshold" system property.
Method Detail

getBoolean

public static boolean getBoolean(String name)
Get the boolean value from the specified system property. This method attempts to parse the system property with the specified name. If the system property exists and if it is "true" (case insensitive), then this method returns true. Otherwise it returns false.
Parameters:
name - The name of the system property.
Returns:
true if the system property is defined and is "true" (case insensitive.

getInt

public static int getInt(String name,
                         int value)
Get the integer value from the specified system property. This method attempts to parse the system property with the specified name. If the system property exists and if it represents a valid positive integer, that integer is returned. Otherwise, the specified default value is returned.

The specified default must be a positive integer.

Parameters:
name - The name of the system property.
value - The default value.
Returns:
The corresponding positive integer.

getLong

public static long getLong(String name,
                           long value)
Get the long value from the specified system property. This method attempts to parse the system property with the specified name. If the system property exists and if it represents a valid positive long, that long is returned. Otherwise, the specified default value is returned.

The specified default must be a positive long.

Parameters:
name - The name of the system property.
value - The default value.
Returns:
The corresponding positive long.


(C) Copyright 2001 UW CSE