public class SystemContext extends SelfDescribingMarshallable
The singleton instance is initialized with the system's current state. If deserialized from another host, the SystemContext object would contain the information of that host at the moment of serialization.
| Modifier and Type | Field and Description |
|---|---|
static SystemContext |
INSTANCE |
EMPTYDISCARD| Constructor and Description |
|---|
SystemContext() |
| Modifier and Type | Method and Description |
|---|---|
int |
availableProcessors()
Provides the number of available processors in the current system.
|
int |
hostId()
Provides the unique identifier for the host system.
|
String |
hostName()
Provides the name of the host system.
|
String |
javaVendor()
Provides the vendor information of the Java environment in the current system.
|
String |
javaVersion()
Provides the version of the Java environment in the current system.
|
long |
upTime()
Provides the system's up time in nanoseconds.
|
String |
userCountry()
Provides the user's country in the current system.
|
String |
userName()
Provides the username of the current user in the system.
|
usesSelfDescribingMessageequals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, wait$equals, $fieldInfoMap, $fieldInfos, $hashCode, $toString, className, copyTo, deepCopy, fromFile, fromFile, fromString, fromString, fromString, getField, getLongField, mergeToMap, readMarshallable, reset, setField, setLongField, streamFromFile, streamFromFile, writeMarshallablebinaryLengthLength, writeValueunexpectedFieldpublic static final SystemContext INSTANCE
public int availableProcessors()
public int hostId()
public String hostName()
public String javaVendor()
public String javaVersion()
public long upTime()
public String userCountry()
public String userName()
Copyright © 2023. All rights reserved.