001/*
002 * JPPF.
003 * Copyright (C) 2005-2018 JPPF Team.
004 * http://www.jppf.org
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 *   http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019package org.jppf.utils.configuration;
020
021import java.io.File;
022import java.security.KeyStore;
023import java.util.List;
024
025import org.jppf.jmx.JMXHelper;
026import org.jppf.job.persistence.impl.DefaultFilePersistence;
027
028/**
029 * This class holds a static enumeration of the documented JPPF configuration properties.
030 * @author Laurent Cohen
031 * @since 5.2
032. */
033public class JPPFProperties {
034  /** Server host name or IP address. */
035  public static final JPPFProperty<String> SERVER_HOST = new StringProperty("jppf.server.host", "localhost");
036  /** Server port. */
037  public static final JPPFProperty<Integer> SERVER_PORT = new IntProperty("jppf.server.port", 11111);
038  /** Server port number for secure connections. */
039  public static final JPPFProperty<Integer> SERVER_SSL_PORT = new IntProperty("jppf.ssl.server.port", 11143);
040  /** Same name as {@link #SERVER_PORT} but with default value of 11143. */
041  public static final JPPFProperty<Integer> SERVER_SSL_PORT_NODE = new IntProperty("jppf.server.port", 11143);
042  /** Whether to exit the JVM when shutting the driver down. */
043  public static final JPPFProperty<Boolean> SERVER_EXIT_ON_SHUTDOWN = new BooleanProperty("jppf.server.exitOnShutdown", true);
044  /** Whether to resolve IP addresses. */
045  public static final JPPFProperty<Boolean> RESOLVE_ADDRESSES = new BooleanProperty("jppf.resolve.addresses", true, "org.jppf.resolve.addresses");
046  /** Interval between updates of the JVM health data. */
047  public static final JPPFProperty<Long> ADMIN_REFRESH_INTERVAL_HEALTH = new LongProperty("jppf.admin.refresh.interval.health", 3000L); 
048  /** Interval between updates of the server statistics. */
049  public static final JPPFProperty<Long> ADMIN_REFRESH_INTERVAL_STATS = new LongProperty("jppf.admin.refresh.interval.stats", 1000L);
050  /** Interval between updates of the topology views. */
051  public static final JPPFProperty<Long> ADMIN_REFRESH_INTERVAL_TOPOLOGY = new LongProperty("jppf.admin.refresh.interval.topology", 1000L);
052  /** Wether to refresh the node's system info as well (to use for node filtering on the client side). */
053  public static final JPPFProperty<Boolean> ADMIN_REFRESH_SYSTEM_INFO = new BooleanProperty("jppf.admin.refresh.system.info", false);
054  /** Size of the class loader cache for the node. */
055  public static final JPPFProperty<Integer> CLASSLOADER_CACHE_SIZE = new IntProperty("jppf.classloader.cache.size", 50);
056  /** Enable/disable lookup of classpath resources in the file system. */
057  public static final JPPFProperty<Boolean> CLASSLOADER_FILE_LOOKUP = new BooleanProperty("jppf.classloader.file.lookup", true);
058  /** Class loader delegation mode: 'parent' or 'url'. */
059  public static final JPPFProperty<String> CLASSLOADER_DELEGATION = new StringProperty("jppf.classloader.delegation", "parent");
060  /** How often batched class loadin requests are sent to the server. */
061  public static final JPPFProperty<Long> NODE_CLASSLOADING_BATCH_PERIOD = new LongProperty("jppf.node.classloading.batch.period", 100L);
062  /** Prevent broadcast to the specified IPv4 addresses (exclusive filter, server only). */
063  public static final JPPFProperty<String> DISCOVERY_BROADCAST_EXCLUDE_IPV4 = new StringProperty("jppf.discovery.broadcast.exclude.ipv4", null);
064  /** Prevent broadcast to the specified IPv6 addresses (exclusive filter, server only). */
065  public static final JPPFProperty<String> DISCOVERY_BROADCAST_EXCLUDE_IPV6 = new StringProperty("jppf.discovery.broadcast.exclude.ipv6", null);
066  /** Broadcast to the specified IPv4 addresses (inclusive filter, server only). */
067  public static final JPPFProperty<String> DISCOVERY_BROADCAST_INCLUDE_IPV4 = new StringProperty("jppf.discovery.broadcast.include.ipv4", null);
068  /** Broadcast to the specified IPv6 addresses (inclusive filter, server only). */
069  public static final JPPFProperty<String> DISCOVERY_BROADCAST_INCLUDE_IPV6 = new StringProperty("jppf.discovery.broadcast.include.ipv6", null);
070  /** UDP broadcast interval in milliseconds. */
071  public static final JPPFProperty<Long> DISCOVERY_BROADCAST_INTERVAL = new LongProperty("jppf.discovery.broadcast.interval", 5000L);
072  /** Enable/disable automatic server discovery via UDP multicast. */
073  public static final JPPFProperty<Boolean> DISCOVERY_ENABLED = new BooleanProperty("jppf.discovery.enabled", true);
074  /** Whether to discover server connections from multiple network interfaces. */
075  public static final JPPFProperty<Boolean> DISCOVERY_ACCEPT_MULTIPLE_INTERFACES = new BooleanProperty("jppf.discovery.acceptMultipleInterfaces", false);
076  /** IPv4 exclusion patterns for server discovery. */
077  public static final JPPFProperty<String> DISCOVERY_EXCLUDE_IPV4 = new StringProperty("jppf.discovery.exclude.ipv4", null);
078  /** IPv6 exclusion patterns for server discovery. */
079  public static final JPPFProperty<String> DISCOVERY_EXCLUDE_IPV6 = new StringProperty("jppf.discovery.exclude.ipv6", null);
080  /** IPv4 inclusion patterns for server discovery. */
081  public static final JPPFProperty<String> DISCOVERY_INCLUDE_IPV4 = new StringProperty("jppf.discovery.include.ipv4", null);
082  /** IPv6 inclusion patterns for server discovery. */
083  public static final JPPFProperty<String> DISCOVERY_INCLUDE_IPV6 = new StringProperty("jppf.discovery.include.ipv6", null);
084  /** Server discovery: UDP multicast group. */
085  public static final JPPFProperty<String> DISCOVERY_GROUP = new StringProperty("jppf.discovery.group", "230.0.0.1");
086  /** Server discovery: UDP multicast port. */
087  public static final JPPFProperty<Integer> DISCOVERY_PORT = new IntProperty("jppf.discovery.port", 11111);
088  /** Server discovery timeout in milliseconds. */
089  public static final JPPFProperty<Integer> DISCOVERY_TIMEOUT = new IntProperty("jppf.discovery.timeout", 1000);
090  /** Priority assigned to discovered server connections (client/admiin console). */
091  public static final JPPFProperty<Integer> DISCOVERY_PRIORITY = new IntProperty("jppf.discovery.priority", 0);
092  /** Names of the manually configured servers in the client. */
093  public static final JPPFProperty<String[]> DRIVERS = new StringArrayProperty("jppf.drivers", " ", new String[] {"default-driver"});
094  /** Manually defined driver host for a client-to-driver connection (parametrized). */
095  public static final JPPFProperty<String> PARAM_SERVER_HOST = new StringProperty("<driver_name>.jppf.server.host", "localhost");
096  /** Manually defined driver port for a client-to-driver connection (parametrized). */
097  public static final JPPFProperty<Integer> PARAM_SERVER_PORT = new IntProperty("<driver_name>.jppf.server.port", 11111, 0, 65535);
098  /** Manually defined SSL enabled flag for a client-to-driver connection (parametrized). */
099  public static final JPPFProperty<Boolean> PARAM_SERVER_SSL_ENABLED = new BooleanProperty("<driver_name>.jppf.ssl.enabled", false);
100  /** Manually defined priority for a client-to-driver connection (parametrized). */
101  public static final JPPFProperty<Integer> PARAM_PRIORITY = new IntProperty("<driver_name>.jppf.priority", 0);
102  /** Manually defined connection ppol size for a client-to-driver connection (parametrized). */
103  public static final JPPFProperty<Integer> PARAM_POOL_SIZE = new IntProperty("<driver_name>.jppf.pool.size", 1, 1, Integer.MAX_VALUE);
104  /** Manually defined JMX connection ppol size for a client-to-driver connection (parametrized). */
105  public static final JPPFProperty<Integer> PARAM_JMX_POOL_SIZE = new IntProperty("<driver_name>.jppf.jmx.pool.size", 1, 1, Integer.MAX_VALUE);
106  /** UI refresh mode for the job data panel: 'immediate_notifications' | 'deferred_notifications' | 'polling'. */
107  public static final JPPFProperty<String> GUI_PUBLISH_MODE = new StringProperty("jppf.gui.publish.mode", "immediate_notifications");
108  /** Interval between updates of the job data view. */
109  public static final JPPFProperty<Long> GUI_PUBLISH_PERIOD = new LongProperty("jppf.gui.publish.period", 1000L);
110  /** Node idle mode: whether to shutdown the node at once when user activity resumes or wait until the node is no longer executing tasks. */
111  public static final JPPFProperty<Boolean> IDLE_INTERRUPT_IF_RUNNING = new BooleanProperty("jppf.idle.interruptIfRunning", true);
112  /** Enable/disable the idle mode. */
113  public static final JPPFProperty<Boolean> IDLE_MODE_ENABLED = new BooleanProperty("jppf.idle.mode.enabled", false);
114  /** Node idle mode: how often the node will check for keyboard and mouse inactivity. */
115  public static final JPPFProperty<Long> IDLE_POLL_INTEFRVAL = new LongProperty("jppf.idle.poll.interval", 1000L);
116  /** Node idle mode: the time of keyboard and mouse inactivity before considering the node idle. */
117  public static final JPPFProperty<Long> IDLE_TIMEOUT = new LongProperty("jppf.idle.timeout", 300_000L);
118  /** JMX connection pool size when discovery is enabled. */
119  public static final JPPFProperty<Integer> JMX_POOL_SIZE = new IntProperty("jppf.jmx.pool.size", 1, 1, Integer.MAX_VALUE);
120  /** JMX remote protocol. */
121  public static final JPPFProperty<String> JMX_REMOTE_PROTOCOL = new StringProperty("jppf.jmxremote.protocol", JMXHelper.JPPF_JMX_PROTOCOL).setPossibleValues(JMXHelper.remoteProtocols());
122  /** Timeout in milliseconds for JMX requests. */
123  public static final JPPFProperty<Long> JMX_REMOTE_REQUEST_TIMEOUT = new LongProperty("jppf.jmxremote.request.timeout", Long.MAX_VALUE, 0L, Long.MAX_VALUE, "jppf.jmx.request.timeout");
124  /** JVM options for the node or server process. */
125  public static final JPPFProperty<String> JVM_OPTIONS = new StringProperty("jppf.jvm.options", null);
126  /** Temporary buffer pool size for reading lengths as ints (size 4). */
127  public static final JPPFProperty<Integer> LENGTH_BUFFER_POOL_SIZE = new IntProperty("jppf.length.buffer.pool.size", 100, 1, 2*1024);
128  /** Load balancing algorithm name. */
129  public static final JPPFProperty<String> LOAD_BALANCING_ALGORITHM = new StringProperty("jppf.load.balancing.algorithm", "proportional");
130  /** Load balancing parameters profile name. */
131  public static final JPPFProperty<String> LOAD_BALANCING_PROFILE = new StringProperty("jppf.load.balancing.profile", "jppf", "jppf.load.balancing.strategy");
132  /** Class name of the implementation of the load-balancer persistence in the driver or client. */
133  public static final JPPFProperty<String[]> LOAD_BALANCING_PERSISTENCE = new StringArrayProperty("jppf.load.balancing.persistence", " ", (String[]) null, "jppf.load.balancer.persistence");
134  /** The hash function used to generate load-balancer state identifiers. */
135  public static final JPPFProperty<String> LOAD_BALANCING_PERSISTENCE_HASH = new StringProperty("jppf.load.balancing.persistence.hash", "SHA-1", "jppf.load.balancer.persistence.hash");
136  /** Enable/disable remote execution (client only). */
137  public static final JPPFProperty<Boolean> REMOTE_EXECUTION_ENABLED = new BooleanProperty("jppf.remote.execution.enabled", true);
138  /** Enable/disable local execution in the client. */
139  public static final JPPFProperty<Boolean> LOCAL_EXECUTION_ENABLED = new BooleanProperty("jppf.local.execution.enabled", false);
140  /** Maximum threads to use for local execution. */
141  public static final JPPFProperty<Integer> LOCAL_EXECUTION_THREADS = new IntProperty("jppf.local.execution.threads", Runtime.getRuntime().availableProcessors());
142  /** Priority assigned to the client local executor. */
143  public static final JPPFProperty<Integer> LOCAL_EXECUTION_PRIORITY = new IntProperty("jppf.local.execution.priority", 0);
144  /** Whether to enable a node to run in the same JVM as the driver. */
145  public static final JPPFProperty<Boolean> LOCAL_NODE_ENABLED = new BooleanProperty("jppf.local.node.enabled", false);
146  /** Number of processing threads in the node. */
147  public static final JPPFProperty<Integer> PROCESSING_THREADS = new IntProperty("jppf.processing.threads", Runtime.getRuntime().availableProcessors(), "processing.threads");
148  /** @exclude . */
149  public static final JPPFProperty<Integer> PEER_PROCESSING_THREADS = new IntProperty("jppf.peer.processing.threads", Runtime.getRuntime().availableProcessors());
150  /** JMX client connection timeout in millis. 0 or less means no timeout. */
151  public static final JPPFProperty<Long> MANAGEMENT_CONNECTION_TIMEOUT = new LongProperty("jppf.management.connection.timeout", 60_000L);
152  /** Enable/disable management of the node or server. */
153  public static final JPPFProperty<Boolean> MANAGEMENT_ENABLED = new BooleanProperty("jppf.management.enabled", true);
154  /** Management server host. */
155  public static final JPPFProperty<String> MANAGEMENT_HOST = new StringProperty("jppf.management.host", null);
156  /** Management remote connector port. */
157  public static final JPPFProperty<Integer> MANAGEMENT_PORT = new IntProperty("jppf.management.port", 11198, 1024, 65535);
158  /** Enable/disable JMX via secure connections. */
159  public static final JPPFProperty<Boolean> MANAGEMENT_SSL_ENABLED = new BooleanProperty("jppf.management.ssl.enabled", false).setDeprecated(true);
160  /** Secure JMX server port. */
161  public static final JPPFProperty<Integer> MANAGEMENT_SSL_PORT = new IntProperty("jppf.management.ssl.port", 11193, 1024, 65535).setDeprecated(true);
162  /** Node management port (to distinguish from server management port when local node is on). */
163  public static final JPPFProperty<Integer> MANAGEMENT_PORT_NODE = new IntProperty("jppf.node.management.port", 11198, 1024, 65535, "jppf.management.port");
164  /** Fully qualifed class name of a MBeanServerForwarder implementation with optional space-separated string parameters. */
165  public static final JPPFProperty<String[]> MANAGEMENT_SERVER_FORWARDER = new StringArrayProperty("jppf.management.server.forwarder", " ", null);
166  /** Size of the pool of threads used to process node forwarding requests and notifications. */
167  public static final JPPFProperty<Integer> NODE_FORWARDING_POOL_SIZE = new IntProperty("jppf.node.forwarding.pool.size", Runtime.getRuntime().availableProcessors());
168  /** enable/disable network connection checks on write operations. */
169  public static final JPPFProperty<Boolean> NIO_CHECK_CONNECTION = new BooleanProperty("jppf.nio.check.connection", true, "jppf.nio.connection.check");
170  /** Whether the node runs in offline mode . */
171  public static final JPPFProperty<Boolean> NODE_OFFLINE = new BooleanProperty("jppf.node.offline", false);
172  /** Whether the node is an Android node. */
173  public static final JPPFProperty<Boolean> NODE_ANDROID = new BooleanProperty("jppf.node.android", false);
174  /** Whether the node is .Net-enabled. */
175  public static final JPPFProperty<Boolean> DOTNET_BRIDGE_INITIALIZED = new BooleanProperty("jppf.dotnet.bridge.initialized", false);
176  /** Whether the node is a master node. */
177  public static final JPPFProperty<Boolean> PROVISIONING_MASTER = new BooleanProperty("jppf.node.provisioning.master", true);
178  /** Whether the node is a slave node. */
179  public static final JPPFProperty<Boolean> PROVISIONING_SLAVE = new BooleanProperty("jppf.node.provisioning.slave", false);
180  /** UUID of the master node for a given slave node. */
181  public static final JPPFProperty<String> PROVISIONING_MASTER_UUID = new StringProperty("jppf.node.provisioning.master.uuid", null);
182  /** Directory where slave-specific configuration files are located. */
183  public static final JPPFProperty<String> PROVISIONING_SLAVE_CONFIG_PATH = new StringProperty("jppf.node.provisioning.slave.config.path", "config");
184  /** JVM options always added to the slave startup command. */
185  public static final JPPFProperty<String> PROVISIONING_SLAVE_JVM_OPTIONS = new StringProperty("jppf.node.provisioning.slave.jvm.options", null);
186  /** Path prefix for the root directory of slave nodes. */
187  public static final JPPFProperty<String> PROVISIONING_SLAVE_PATH_PREFIX = new StringProperty("jppf.node.provisioning.slave.path.prefix", "slave_nodes/node_");
188  /** Number of slaves to launch upon master node startup. */
189  public static final JPPFProperty<Integer> PROVISIONING_STARTUP_SLAVES = new IntProperty("jppf.node.provisioning.startup.slaves", 0);
190  /** Path to an optional config overrides file for slaves launched at startup. */
191  public static final JPPFProperty<File> PROVISIONING_STARTUP_OVERRIDES_FILE = new FileProperty("jppf.node.provisioning.startup.overrides.file", null);
192  /** An optional config overrides source (name of a class implementing {@link org.jppf.utils.JPPFConfiguration.ConfigurationSourceReader ConfigurationSourceReader}
193   * or {@link org.jppf.utils.JPPFConfiguration.ConfigurationSource ConfigurationSource}) for slaves launched at startup. */
194  public static final JPPFProperty<String> PROVISIONING_STARTUP_OVERRIDES_SOURCE = new StringProperty("jppf.node.provisioning.startup.overrides.source", null);
195  /** Id of a slave node generated by/scoped by its master. */
196  public static final JPPFProperty<Integer> PROVISIONING_SLAVE_ID = new IntProperty("jppf.node.provisioning.slave.id", -1);
197  /** @exclude . */
198  public static final JPPFProperty<Long> PROVISIONING_REQUEST_CHECK_TIMEOUT = new LongProperty("jppf.provisioning.request.check.timeout", 15_000L);
199  /** Serialization scheme: name of a class implementing {@link org.jppf.serialization.JPPFSerialization JPPFSerialization}. */
200  public static final JPPFProperty<String> OBJECT_SERIALIZATION_CLASS = new StringProperty("jppf.object.serialization.class", null);
201  /** Whether to send jobs to orphan peer servers. */
202  public static final JPPFProperty<Boolean> PEER_ALLOW_ORPHANS = new BooleanProperty("jppf.peer.allow.orphans", false);
203  /** Enable/disable peer server discovery. */
204  public static final JPPFProperty<Boolean> PEER_DISCOVERY_ENABLED = new BooleanProperty("jppf.peer.discovery.enabled", false);
205  /** Size of discovered peer server connection pools. */
206  public static final JPPFProperty<Integer> PEER_POOL_SIZE = new IntProperty("jppf.peer.pool.size", 1);
207  /** Toggle secure connections to remote peer servers. */
208  public static final JPPFProperty<Boolean> PEER_SSL_ENABLED = new BooleanProperty("jppf.peer.ssl.enabled", false);
209  /** Heartbeat enabled flag for a discovered peer driver connection. */
210  public static final JPPFProperty<Boolean> PEER_RECOVERY_ENABLED = new BooleanProperty("jppf.peer.recovery.enabled", false);
211  /** @exclude . */
212  public static final JPPFProperty<Long> PEER_HANDLER_PERIOD = new LongProperty("jppf.peer.handler.period", 1000L);
213  /** @exclude . */
214  public static final JPPFProperty<Long> PEER_DISCOVERY_REMOVAL_CLEANUP_INTERVAL = new LongProperty("jppf.peer.discovery.removal.cleanup.interval", 30_000L);
215  /** Space-separated list of peer server names. */
216  public static final JPPFProperty<String> PEERS = new StringProperty("jppf.peers", null);
217  /** The number of connected nodes below which this driver load-balances to other peer drivers. */
218  public static final JPPFProperty<Integer> PEERS_LOAD_BALANCE_THRESHOLD = new IntProperty("jppf.peers.load.balance.threshold", Integer.MAX_VALUE);
219  /** Server host for a manually configured peer driver connection (parametrized). */
220  public static final JPPFProperty<String> PARAM_PEER_SERVER_HOST = new StringProperty("jppf.peer.<peer_name>.server.host", "localhost");
221  /** Server port for a manually configured peer driver connection (parametrized). */
222  public static final JPPFProperty<Integer> PARAM_PEER_SERVER_PORT = new IntProperty("jppf.peer.<peer_name>.server.port", 11111, 0, 65535);
223  /** SSL enabled flag for a manually configured peer driver connection (parametrized). */
224  public static final JPPFProperty<Boolean> PARAM_PEER_SSL_ENABLED = new BooleanProperty("jppf.peer.<peer_name>.ssl.enabled", false);
225  /** COnnection pool size for a manually configured peer driver connection (parametrized). */
226  public static final JPPFProperty<Integer> PARAM_PEER_POOL_SIZE = new IntProperty("jppf.peer.<peer_name>.pool.size", 1, 1, Integer.MAX_VALUE);
227  /** Heartbeat enabled flag for a manually configured peer driver connection (parametrized). */
228  public static final JPPFProperty<Boolean> PARAM_PEER_RECOVERY_ENABLED = new BooleanProperty("jppf.peer.<peer_name>.recovery.enabled", false);
229  /** Heartbeat enabled flag for a manually configured peer client connection (parametrized). */
230  public static final JPPFProperty<Boolean> PARAM_RECOVERY_ENABLED = new BooleanProperty("<driver_name>.jppf.recovery.enabled", false);
231  /** Path to the security policy file. */
232  public static final JPPFProperty<String> POLICY_FILE = new StringProperty("jppf.policy.file", null);
233  /** Connection pool size for server connections discovered via UDP multicast. */
234  public static final JPPFProperty<Integer> POOL_SIZE = new IntProperty("jppf.pool.size", 1, 1, Integer.MAX_VALUE);
235  /** Delay in seconds before the first (re)connection attempt. */
236  public static final JPPFProperty<Long> RECONNECT_INITIAL_DELAY = new LongProperty("jppf.reconnect.initial.delay", 0L, "reconnect.initial.delay");
237  /** Frequency in seconds of reconnection attempts. */
238  public static final JPPFProperty<Long> RECONNECT_INTERVAL = new LongProperty("jppf.reconnect.interval", 1L, "reconnect.interval");
239  /** Time in seconds after which reconnection attempts stop. A negative value means never stop. */
240  public static final JPPFProperty<Long> RECONNECT_MAX_TIME = new LongProperty("jppf.reconnect.max.time", 60L, "reconnect.max.time");
241  /** Enable/disable recovery from hardware failures through a heartbeat mechanism. */
242  public static final JPPFProperty<Boolean> RECOVERY_ENABLED = new BooleanProperty("jppf.recovery.enabled", false);
243  /** Maximum number of pings to the node before the connection is considered broken. */
244  public static final JPPFProperty<Integer> RECOVERY_MAX_RETRIES = new IntProperty("jppf.recovery.max.retries", 3);
245  /** Maximum ping response time from the node. */
246  public static final JPPFProperty<Integer> RECOVERY_READ_TIMEOUT = new IntProperty("jppf.recovery.read.timeout", 15000);
247  /** Number of threads allocated to the node connection reaper. */
248  public static final JPPFProperty<Integer> RECOVERY_REAPER_POOL_SIZE = new IntProperty("jppf.recovery.reaper.pool.size", Runtime.getRuntime().availableProcessors());
249  /** File to redirect {@link System#err} to. */
250  public static final JPPFProperty<File> REDIRECT_ERR = new FileProperty("jppf.redirect.err", null);
251  /** Append to existing file ({@code true}) or create new one ({@code false}). */
252  public static final JPPFProperty<Boolean> REDIRECT_ERR_APPEND = new BooleanProperty("jppf.redirect.err.append", false);
253  /** File to redirect {@link System#out} to. */
254  public static final JPPFProperty<File> REDIRECT_OUT = new FileProperty("jppf.redirect.out", null);
255  /** Append to existing file ({@code true}) or create new one ({@code false}). */
256  public static final JPPFProperty<Boolean> REDIRECT_OUT_APPEND = new BooleanProperty("jppf.redirect.out.append", false);
257  /** Root location of the file-persisted caches. */
258  public static final JPPFProperty<String> RESOURCE_CACHE_DIR = new StringProperty("jppf.resource.cache.dir", System.getProperty("java.io.tmpdir"));
259  /** Whether the class loader resource cache is enabled. */
260  public static final JPPFProperty<Boolean> RESOURCE_CACHE_ENABLED = new BooleanProperty("jppf.resource.cache.enabled", true);
261  /** Type of cache storage: either 'file' or 'memory'. */
262  public static final JPPFProperty<String> RESOURCE_CACHE_STORAGE = new StringProperty("jppf.resource.cache.storage", "file").setPossibleValues("file", "memory");
263  /** @exclude . */
264  public static final JPPFProperty<String> RESOURCE_PROVIDER_CLASS = new StringProperty("jppf.resource.provider.class", "org.jppf.classloader.ResourceProviderImpl");
265  /** Enable/disable the screen saver. */
266  public static final JPPFProperty<Boolean> SCREENSAVER_ENABLED = new BooleanProperty("jppf.screensaver.enabled", false);
267  /** Class name of an implementation of {@code org.jppf.node.screensaver.JPPFScreenSaver}. */
268  public static final JPPFProperty<String> SCREENSAVER_CLASS = new StringProperty("jppf.screensaver.class", null);
269  /** Class name of an implementation of  {@code org.jppf.node.screensaver.NodeIntegration}. */
270  public static final JPPFProperty<String> SCREENSAVER_NODE_LISTENER = new StringProperty("jppf.screensaver.node.listener", null);
271  /** Title of the screensaver's JFrame in windowed mode. */
272  public static final JPPFProperty<String> SCREENSAVER_TITLE = new StringProperty("jppf.screensaver.title", "JPPF screensaver");
273  /** Path to the image for the frame's icon (windowed mode). */
274  public static final JPPFProperty<String> SCREENSAVER_ICON = new StringProperty("jppf.screensaver.icon", "org/jppf/node/jppf-icon.gif");
275  /** Whether to display the screen saver in full screen mode. */
276  public static final JPPFProperty<Boolean> SCREENSAVER_FULLSCREEN = new BooleanProperty("jppf.screensaver.fullscreen", false);
277  /** Width in pixels (windowed mode). */
278  public static final JPPFProperty<Integer> SCREENSAVER_WIDTH = new IntProperty("jppf.screensaver.width", 1000);
279  /** Height in pixels (windowed mode). */
280  public static final JPPFProperty<Integer> SCREENSAVER_HEIGHT = new IntProperty("jppf.screensaver.height", 800);
281  /** Screensaver's on-screen X coordinate (windowed mode). */
282  public static final JPPFProperty<Integer> SCREENSAVER_LOCATION_X = new IntProperty("jppf.screensaver.location.x", 0);
283  /** Screensaver's on-screen Y coordinate (windowed mode). */
284  public static final JPPFProperty<Integer> SCREENSAVER_LOCATION_Y = new IntProperty("jppf.screensaver.location.y", 0);
285  /** Whether to close the screensaver on mouse motion (full screen mode). */
286  public static final JPPFProperty<Boolean> SCREENSAVER_MOUSE_MOTION_CLOSE = new BooleanProperty("jppf.screensaver.mouse.motion.close", true);
287  /** @exclude . */
288  public static final JPPFProperty<Long> SCREENSAVER_MOUSE_MOTION_DELAY = new LongProperty("jppf.screensaver.mouse.motion.delay", 500L);
289  /** Handle collisions between moving logos (built-in default screensaver). */
290  public static final JPPFProperty<Boolean> SCREENSAVER_HANDLE_COLLISIONS = new BooleanProperty("jppf.screensaver.handle.collisions", true);
291  /** Number of moving moving logos (built-in default screensaver). */
292  public static final JPPFProperty<Integer> SCREENSAVER_LOGOS = new IntProperty("jppf.screensaver.logos", 10);
293  /** Speed of moving moving logos! from 1 to 100 (built-in default screensaver). */
294  public static final JPPFProperty<Integer> SCREENSAVER_SPEED = new IntProperty("jppf.screensaver.speed", 100, 1, 100);
295  /** Path(s) to the moving logo image(s) (built-in default screensaver). */
296  public static final JPPFProperty<String> SCREENSAVER_LOGO_PATH = new StringProperty("jppf.screensaver.logo.path", "org/jppf/node/jppf_group_small.gif");
297  /** Path to the larger image at the center of the screen (built-in default screensaver). */
298  public static final JPPFProperty<String> SCREENSAVER_CENTERIMAGE = new StringProperty("jppf.screensaver.centerimage", "org/jppf/node/jppf@home.gif");
299  /** Hhorizontal alignment of the status panel (built-in default screensaver). */
300  public static final JPPFProperty<String> SCREENSAVER_STATUS_PANEL_ALIGNMENT = new StringProperty("jppf.screensaver.status.panel.alignment", "center");
301  /** Eeceive/send buffer size for socket connections. */
302  public static final JPPFProperty<Integer> SOCKET_BUFFER_SIZE = new IntProperty("jppf.socket.buffer.size", 32 * 1024, 1024, 1024 * 1024);
303  /** Enable/disable socket keepalive. */
304  public static final JPPFProperty<Boolean> SOCKET_KEEPALIVE = new BooleanProperty("jppf.socket.keepalive", false);
305  /** Seconds a socket connection can remain idle before being closed (client only). */
306  public static final JPPFProperty<Long> SOCKET_MAX_IDLE = new LongProperty("jppf.socket.max-idle", -1L);
307  /** Enable/disable Nagle's algorithm. */
308  public static final JPPFProperty<Boolean> SOCKET_TCP_NODELAY = new BooleanProperty("jppf.socket.tcp_nodelay", true);
309  /** Enabled/diable secure connections. */
310  public static final JPPFProperty<Boolean> SSL_ENABLED = new BooleanProperty("jppf.ssl.enabled", false);
311  /** Space-separated enabled cipher suites. */
312  public static final JPPFProperty<String[]> SSL_CIPHER_SUITES = new StringArrayProperty("jppf.ssl.cipher.suites", " ", null);
313  /** SSL client authentication level: 'none' | 'want' | 'need'. */
314  public static final JPPFProperty<String> SSL_CLIENT_AUTH = new StringProperty("jppf.ssl.client.auth", "none");
315  /** Whether to use a separate trust store for client certificates (server only). */
316  public static final JPPFProperty<Boolean> SSL_CLIENT_DISTINCT_TRUSTSTORE = new BooleanProperty("jppf.ssl.client.distinct.truststore", false);
317  /** Path to the client trust store in the file system or classpath. */
318  public static final JPPFProperty<String> SSL_CLIENT_TRUSTSTORE_FILE = new StringProperty("jppf.ssl.client.truststore.file", null);
319  /** Plain text client trust store password. */
320  public static final JPPFProperty<String> SSL_CLIENT_TRUSTSTORE_PASSWORD = new StringProperty("jppf.ssl.client.truststore.password", null);
321  /** Client trust store password as an arbitrary source. */
322  public static final JPPFProperty<String> SSL_CLIENT_TRUSTSTORE_PASSWORD_SOURCE = new StringProperty("jppf.ssl.client.truststore.password.source", null);
323  /** Client trust store location as an arbitrary source. */
324  public static final JPPFProperty<String> SSL_CLIENT_TRUSTSTORE_SOURCE = new StringProperty("jppf.ssl.client.truststore.source", null);
325  /** Client trust store format, e.g. 'JKS'. */
326  public static final JPPFProperty<String> SSL_CLIENT_TRUSTSTORE_TYPE = new StringProperty("jppf.ssl.client.truststore.type", KeyStore.getDefaultType());
327  /** Path to the SSL configuration in the file system or classpath. */
328  public static final JPPFProperty<String> SSL_CONFIGURATION_FILE = new StringProperty("jppf.ssl.configuration.file", null);
329  /** SSL configuration as an arbitrary source. */
330  public static final JPPFProperty<String> SSL_CONFIGURATION_SOURCE = new StringProperty("jppf.ssl.configuration.source", null);
331  /** {@link javax.net.ssl.SSLContext SSLContext} protocol. */
332  public static final JPPFProperty<String> SSL_CONTEXT_PROTOCOL = new StringProperty("jppf.ssl.context.protocol", "TLSv1.2");
333  /** Path to the key store in the file system or classpath. */
334  public static final JPPFProperty<String> SSL_KEYSTORE_FILE = new StringProperty("jppf.ssl.keystore.file", null);
335  /** Plain text key store password. */
336  public static final JPPFProperty<String> SSL_KEYSTORE_PASSWORD = new StringProperty("jppf.ssl.keystore.password", null);
337  /** Key store password as an arbitrary source. */
338  public static final JPPFProperty<String> SSL_KEYSTORE_PASSWORD_SOURCE = new StringProperty("jppf.ssl.keystore.password.source", null);
339  /** Key store format, e.g. 'JKS'. */
340  public static final JPPFProperty<String> SSL_KEYSTORE_TYPE = new StringProperty("jppf.ssl.keystore.type", KeyStore.getDefaultType());
341  /** Key store location as an arbitrary source. */
342  public static final JPPFProperty<String> SSL_KEYSTORE_SOURCE = new StringProperty("jppf.ssl.keystore.source", null);
343  /** A list of space-separated enabled protocols. */
344  public static final JPPFProperty<String[]> SSL_PROTOCOLS = new StringArrayProperty("jppf.ssl.protocols", " ", null);
345  /** Path to the trust store in the file system or classpath. */
346  public static final JPPFProperty<String> SSL_TRUSTSTORE_FILE = new StringProperty("jppf.ssl.truststore.file", null);
347  /** Plain text trust store password. */
348  public static final JPPFProperty<String> SSL_TRUSTSTORE_PASSWORD = new StringProperty("jppf.ssl.truststore.password", null);
349  /** Trust store password as an arbitrary source. */
350  public static final JPPFProperty<String> SSL_TRUSTSTORE_PASSWORD_SOURCE = new StringProperty("jppf.ssl.truststore.password.source", null);
351  /** Trust store location as an arbitrary source. */
352  public static final JPPFProperty<String> SSL_TRUSTSTORE_SOURCE = new StringProperty("jppf.ssl.truststore.source", null);
353  /** Trust store format, e.g. 'JKS'. */
354  public static final JPPFProperty<String> SSL_TRUSTSTORE_TYPE = new StringProperty("jppf.ssl.truststore.type", KeyStore.getDefaultType());
355  /** @exclude . */
356  public static final JPPFProperty<Integer> SSL_THREAD_POOL_SIZE = new IntProperty("jppf.ssl.thread.pool.size", 10, "jppf.ssl.thread.pool");
357  /** Maximum size of temporary buffers pool. */
358  public static final JPPFProperty<Integer> TEMP_BUFFER_POOL_SIZE = new IntProperty("jppf.temp.buffer.pool.size", 10, 1, 2*1024);
359  /** Size of temporary buffers used in I/O transfers. */
360  public static final JPPFProperty<Integer> TEMP_BUFFER_SIZE = new IntProperty("jppf.temp.buffer.size", 32*1024, 1024, 64*1024);
361  /** Type of NIO thread pool: either dynamic or fixed. */
362  public static final JPPFProperty<String> NIO_THREAD_POOL_TYPE = new StringProperty("jppf.nio.thread.pool.type", "sync").setPossibleValues("dynamic", "fixed", "sync");
363  /** Core number of threads performing network I/O . */
364  public static final JPPFProperty<Integer> NIO_THREAD_POOL_SIZE = new IntProperty("jppf.nio.thread.pool.size", Runtime.getRuntime().availableProcessors(), 2, 32*1024, "jppf.transition.thread.pool.size");
365  /** Queue size for the pool of threads performing network I/O . */
366  public static final JPPFProperty<Integer> NIO_THREAD_QUEUE_SIZE = new IntProperty("jppf.nio.thread.queue.size", 50, 1, Integer.MAX_VALUE);
367  /** TTL in milliseconds for threads beyond the core number performing network I/O. */
368  public static final JPPFProperty<Long> NIO_THREAD_TTL = new LongProperty("jppf.nio.thread.ttl", 15_000L, 1L, Long.MAX_VALUE);
369  /** Whether to display the animated splash screen at console startup, defaults to false. */
370  public static final JPPFProperty<Boolean> UI_SPLASH = new BooleanProperty("jppf.ui.splash", true);
371  /** Interval between images in milliseconds. */
372  public static final JPPFProperty<Long> UI_SPLASH_DELAY = new LongProperty("jppf.ui.splash.delay", 500L);
373  /** One or more paths to the images displayed in a rolling sequence (like a slide show), separated by '|' (pipe) characters. */
374  public static final JPPFProperty<String> UI_SPLASH_IMAGES = new StringProperty("jppf.ui.splash.images", null);
375  /** The fixed text displayed at center of the splash screen. */
376  public static final JPPFProperty<String> UI_SPLASH_MESSAGE = new StringProperty("jppf.ui.splash.message", "");
377  /** The color of the splash screen message. */
378  public static final JPPFProperty<String> UI_SPLASH_MESSAGE_COLOR = new StringProperty("jppf.ui.splash.message.color", "64, 64, 128");
379  /** @exclude . */
380  public static final JPPFProperty<Long> NIO_SELECT_TIMEOUT = new LongProperty("jppf.nio.select.timeout", 1000L);
381  /** Ratio of available heap over the size of an object to deserialize, below which disk overflow is triggered. */
382  public static final JPPFProperty<Double> DISK_OVERFLOW_THRESHOLD = new DoubleProperty("jppf.disk.overflow.threshold", 2d);
383  /** Whether to call System.gc() and recompute the avalaible heap size before triggering disk overflow. */
384  public static final JPPFProperty<Boolean> GC_ON_DISK_OVERFLOW = new BooleanProperty("jppf.gc.on.disk.overflow", true);
385  /** Minimum heap size in MB below which disk overflow is systematically triggered, to avoid heap fragmentation and ensure there's enough memory to deserialize job headers. */
386  public static final JPPFProperty<Long> LOW_MEMORY_THRESHOLD = new LongProperty("jppf.low.memory.threshold", 32L);
387  /** Whether to check for low memory and trigger disk offloading. */
388  public static final JPPFProperty<Boolean> CHECK_LOW_MEMORY = new BooleanProperty("jppf.check.low.memory", true);
389  /** Used heap in bytes above which notifications from task are offloaded to file. Defaults to 0.8 * maxHeapSize.. */
390  public static final JPPFProperty<String> NOTIFICATION_OFFLOAD_MEMORY_THRESHOLD = new StringProperty("jppf.notification.offload.memory.threshold", "" + (long) (0.8d * Runtime.getRuntime().maxMemory()) + "b" );
391  /** Determines the frequency at which the JVM's cpu load is recomputed, in ms. */
392  public static final JPPFProperty<Long> CPU_LOAD_COMPUTATION_INTERVAL = new LongProperty("jppf.cpu.load.computation.interval", 1000L);
393  /** Type of thread pool to use in the node: either 'default' or 'org.jppf.server.node.fj.ThreadManagerForkJoin'. */
394  public static final JPPFProperty<String> THREAD_MANAGER_CLASS = new StringProperty("jppf.thread.manager.class", "default");
395  /** Internal use. The class of node to instantiate upon node startup. For instance Java and Android nodes use a different class. */
396  public static final JPPFProperty<String> NODE_CLASS = new StringProperty("jppf.node.class", "org.jppf.server.node.remote.JPPFRemoteNode");
397  /** Default script language for scripted property values. */
398  public static final JPPFProperty<String> SCRIPT_DEFAULT_LANGUAGE = new StringProperty("jppf.script.default.language", "javascript");
399  /** Fully qualified name of a class implementing {@link org.jppf.node.connection.DriverConnectionStrategy DriverConnectionStrategy}. */
400  public static final JPPFProperty<String> SERVER_CONNECTION_STRATEGY = new StringProperty("jppf.server.connection.strategy", null);
401  /** @exclude . */
402  public static final JPPFProperty<String> SERIALIZATION_EXCEPTION_HOOK = new StringProperty("jppf.serialization.exception.hook", null);
403  /** Full path to the Java executable. */
404  public static final JPPFProperty<String> JAVA_PATH = new StringProperty("jppf.java.path", null);
405  /** Path to the temporary config overrides properties file. */
406  public static final JPPFProperty<File> CONFIG_OVERRIDES_PATH = new FileProperty("jppf.config.overrides.path", new File("config/config-overrides.properties"));
407  /** @exclude . */
408  public static final JPPFProperty<Boolean> NODE_CHECK_CONNECTION = new BooleanProperty("jppf.node.check.connection", false);
409  /** The default thickness of the scrollbars in the GUI. */
410  public static final JPPFProperty<Integer> DEFAULT_SCROLLBAR_THICKNESS = new IntProperty("jppf.ui.default.scrollbar.thickness", 10);
411  /** Whether a node is idle. This property is only set within a server. */
412  public static final JPPFProperty<Boolean> NODE_IDLE = new BooleanProperty("jppf.node.idle", true);
413  /** UUID of the job for which a node is reserved. */
414  public static final JPPFProperty<String> NODE_RESERVED_JOB = new StringProperty("jppf.node.reserved.job", null);
415  /** UUID of the node beofre restart, when it has a job reserved. */
416  public static final JPPFProperty<String> NODE_RESERVED_UUID = new StringProperty("jppf.node.reserved.uuid", null);
417  /** Whether debug mbean is enabled, defaults to false. */
418  public static final JPPFProperty<Boolean> DEBUG_ENABLED = new BooleanProperty("jppf.debug.enabled", false);
419  /** Interval in seconds between 2 refreshes of a page in the web admin console. */
420  public static final JPPFProperty<Integer> WEB_ADMIN_REFRESH_INTERVAL = new IntProperty("jppf.web.admin.refresh.interval", 3);
421  /** Class name of the implementation of the job persistence in the driver. */
422  public static final JPPFProperty<String[]> JOB_PERSISTENCE = new StringArrayProperty("jppf.job.persistence", " ", new String[] {DefaultFilePersistence.class.getName()});
423  /** Whether object graphs should be serialized or deserialized sequentially instead of in parallel. */
424  public static final JPPFProperty<Boolean> SEQUENTIAL_SERIALiZATION = new BooleanProperty("jppf.sequential.serialization", false, "jppf.sequential.deserialization");
425  /** Whether bias towards local node for scheduling is enabled in the driver. */
426  public static final JPPFProperty<Boolean> LOCAL_NODE_BIAS = new BooleanProperty("jppf.local.node.bias", true);
427  /** Location of the file that contains the DDL statements to create the database table for the databse job persistence. */
428  public static final JPPFProperty<String> JOB_PERSISTENCE_DDL_LOCATION = new StringProperty("jppf.job.persistence.ddl.location", "org/jppf/job/persistence/impl/job_persistence.sql");
429  /** Percentage of used heap above which async job persistence switches to sequential mode, until the used heap decreases below the threshold. */
430  public static final JPPFProperty<Double> JOB_PERSISTENCE_MEMORY_THRESHOLD = new DoubleProperty("jppf.job.persistence.memory.threshold", 70d);
431  /** Location of the file that contains the DDL statements to create the database table for the laod-balancers persistence. */
432  public static final JPPFProperty<String> LOAD_BALANCING_PERSISTENCE_DDL_LOCATION = new StringProperty("jppf.load.balancing.persistence.ddl.location", "org/jppf/load/balancer/persistence/load_balancer_persistence.sql");
433  /** Enable / disable a pluggable view. */
434  public static final JPPFProperty<Boolean> ADMIN_CONSOLE_VIEW_ENABLED = new BooleanProperty("jppf.admin.console.view.<view_name>.enabled", true);
435  /** Name of a pluggable view class, extending org.jppf.ui.plugin.PluggableView. */
436  public static final JPPFProperty<String> ADMIN_CONSOLE_VIEW_CLASS = new StringProperty("jppf.admin.console.view.<view_name>.class", null);
437  /** The title for the view, seen as the tab label. */
438  public static final JPPFProperty<String> ADMIN_CONSOLE_VIEW_TITLE = new StringProperty("jppf.admin.console.view.<view_name>.title", null);
439  /** Path to the icon for a pluggable view, seen as the tab icon. */
440  public static final JPPFProperty<String> ADMIN_CONSOLE_VIEW_ICON = new StringProperty("jppf.admin.console.view.<view_name>.icon", null);
441  /** The built-in view a pluggable view is attached to. It must be one of the tabbed panes of the admin console. Possible values: Main | Topology | Charts. */
442  public static final JPPFProperty<String> ADMIN_CONSOLE_VIEW_ADD_TO = new StringProperty("jppf.admin.console.view.<view_name>.addto", "Main").setPossibleValues("Main", "Topology", "Charts");
443  /** The position at which a pluggable view is inserted withing the enclosing tabbed pane. A negative value means insert at the end. */
444  public static final JPPFProperty<Integer> ADMIN_CONSOLE_VIEW_POSITION = new IntProperty("jppf.admin.console.view.<view_name>.position", -1);
445  /** Whether to automatically select the pluggable view. */
446  public static final JPPFProperty<Boolean> ADMIN_CONSOLE_VIEW_AUTOSELECT = new BooleanProperty("jppf.admin.console.view.<view_name>.autoselect", false);
447  /** A default driver-side execution policy to associate with submitted jobs when they don't have one. */
448  public static final JPPFProperty<String> JOB_SLA_DEFAULT_POLICY = new StringProperty("jppf.job.sla.default.policy", null);
449  /** A default client-side execution policy to associate with submitted jobs when they don't have one. */
450  public static final JPPFProperty<String> JOB_CLIENT_SLA_DEFAULT_POLICY = new StringProperty("jppf.job.client.sla.default.policy", null);
451  /** The list of all predefined properties. */
452  private static List<JPPFProperty<?>> properties;
453
454  /**
455   * Get the list of all predefined configuration properties.
456   * @return A list of {@link JPPFProperty} instances.
457  */
458  public synchronized static List<JPPFProperty<?>> allProperties() {
459    if (properties == null) properties = ConfigurationUtils.allProperties(JPPFProperties.class);
460    return properties;
461  }
462}