Node Properties Reference
From JPPF 6.2 Documentation
|
Main Page > JPPF Tasks and Execution Policy > Node Properties Reference |
1 Related APIs
All node properties can be obtained using the JPPFSystemInformation class.
This is what is sent to any execution policy object when its accepts(JPPFSystemInformation) method is called to evaluate the policy against a specific node.
As the JPPFSystemInformation class encapsulates several sets of properties, the ExecutionPolicy class provides a method getProperty(JPPFSystemInformation, String) that will lookup a specified property in the following order:
- in JPPFSystemInformation.getJppf() : JPPF configuration properties
- in JPPFSystemInformation.getSystem() : system properties
- in JPPFSystemInformation.getEnv() : environment variables
- in JPPFSystemInformation.getNetwork() : IPV4 and IPV6 addresses assigned to the node
- in JPPFSystemInformation.getRuntime() : runtime properties
2 System properties
The system properties are all the properties accessible through a call to System.getProperties(), including all the -Dproperty=value definitions in the Java command line.
Related APIs:
- JPPFSystemInformation.getSystem()
- SystemUtils.getSystemProperties()
- java.lang.System.getProperties()
3 JPPF configuration properties
The JPPF properties are all the properties defined in the node's JPPF configuration file.
Related APIs:
4 Environment variables
These are the operating system environment variables defined at the time the node's JVM was launched.
Related APIs:
5 Runtime properties
These are properties that can be obtained through a call to the JDK Runtime class.
Related APIs:
List of properties:
- availableProcessors : number of processors available to the JVM
- freeMemory : estimated free JVM heap memory, in bytes
- totalMemory : estimated total JVM heap memory, in bytes
- maxMemory : maximum JVM heap memory, in bytes, equivalent to the value defined through the -Xmx JVM flag
Note: totalMemory and freeMemory are the values taken when the node first connected to the JPPF server. They may have changed subsequently and should therefore only be used with appropriate precautions
6 Network properties
These properties enumerate all IPV4 and IPV6 addresses assigned to the JPPF node's host.
List of properties:
- ipv4.addresses : space-separated list of IPV4 addresses with associated host in the format ipv4_address|host_name
- ipv6.addresses : space-separated list of IPV6 addresses with associated host in the format ipv6_address|host_name
Example:
ipv4.addresses = 192.168.121.3|www.myhost.com 127.0.0.1|localhost 254.169.0.12| ipv6.addresses = 2001:0db8:85a3:08d3:1319:8a2e:0370:7334|www.myhost.com
Note: when a host name cannot be resolved, the right-hand part of the address, on the right of the "|" (pipe character) will be empty