public final class SrvConfigDescriptor
extends com.neeve.daemon.config.DmnConfigDescriptor
This class describes a Talon server and contains methods to persist and load descriptors to/from the platform configuration repositories.
Modifier and Type | Class and Description |
---|---|
static class |
SrvConfigDescriptor.Admin
Configures stats collection and heartbeats for the server.
|
static class |
SrvConfigDescriptor.Heartbeats
Configures stats collection and heartbeats for the server.
|
static class |
SrvConfigDescriptor.HeartbeatTracing
Configures heartbeat tracing for a server.
|
Modifier and Type | Field and Description |
---|---|
static String |
SERVER_ADMIN_APP_MULTIPLEX_SENDS
Global property controlling whether admin messages are sequenced on the admin apps' multiplexer thread.
|
static boolean |
SERVER_ADMIN_APP_MULTIPLEX_SENDS_DEFAULT
Default value for
SERVER_ADMIN_APP_MULTIPLEX_SENDS : true. |
static String |
SERVER_ADMINCLIENT_OUTPUTQUEUE_CAPACITY_DEFAULT
Default value for
SERVER_ADMINCLIENT_OUTPUTQUEUE_CAPACITY_PROP : "10mb" |
static String |
SERVER_ADMINCLIENT_OUTPUTQUEUE_CAPACITY_PROP
Configuration property used to set the capacity for the size
of the controller admin client's output queue.
|
static String |
SERVER_AUTOSTOP_ONAPPSTARTFAIL
Global property controlling whether or not the server will automatically stop if the load or start of any app fails
Property name: "nv.server.autostop.onappstartfail".
|
static boolean |
SERVER_AUTOSTOP_ONAPPSTARTFAIL_DEFAULT
Default value for
SERVER_AUTOSTOP_ONAPPSTARTFAIL : false. |
static String |
SERVER_AUTOSTOP_ONLASTAPPSTOP
Global property controlling whether or not the server will automatically stop after the last app is stopped.
|
static boolean |
SERVER_AUTOSTOP_ONLASTAPPSTOP_DEFAULT
Default value for
SERVER_AUTOSTOP_ONLASTAPPSTOP : true. |
static String |
SERVER_ENABLE_BACKGROUND_COMMANDINVOCATION
Global property controlling whether background command invocation is enabled for admin commands.
|
static boolean |
SERVER_ENABLE_BACKGROUND_COMMANDINVOCATION_DEFAULT
Default value for
SERVER_ENABLE_BACKGROUND_COMMANDINVOCATION : true. |
static boolean |
SERVER_STATS_ENABLE_DEFAULT
Default value for
SERVER_STATS_ENABLE_PROP : false. |
static String |
SERVER_STATS_ENABLE_PROP
Global configuration property used to enable server stats collection and emission via
SrvMonHeartbeatMessages.
|
static boolean |
SERVER_STATS_INCLUDE_SERIES_DATAPOINTS_DEFAULT
The default value for "nv.server.stats.includeSeriesDataPoints": false.
|
static String |
SERVER_STATS_INCLUDE_SERIES_DATAPOINTS_PROP
Indicates whether or not series stats should report the datapoints
captured for a series statistic.
|
static boolean |
SERVER_STATS_INCLUDE_SERIES_DEFAULT
The default value for "nv.server.stats.includeSeries": true.
|
static String |
SERVER_STATS_INCLUDE_SERIES_PROP
Global configuration property indicating whether or not series stats should be included in heartbeats.
|
static String |
SERVER_STATS_INTERVAL_DEFAULT
Default value (in milliseconds) for
SERVER_STATS_INTERVAL_PROP : "30000". |
static String |
SERVER_STATS_INTERVAL_PROP
Global Configuration property used to set the server stats heartbeat interval (in milliseconds) at which to collect
SrvMonHeartbeatMessages.
|
static int |
SERVER_STATS_MAX_TRACKABLE_SERIES_VALUE_DEFAULT
The default maximum tracked latency value:
TimeUnit.MINUTES.toMicros(10) , e.g. a value 10
minutes for a microsend reported latency. |
static String |
SERVER_STATS_MAX_TRACKABLE_SERIES_VALUE_PROP
Global Configuration for the maximum trackable value that can be tracked for reported series histogram timings.
|
static boolean |
SERVER_STATS_NONZG_STATS_COLLECTION_ENABLE_DEFAULT
|
static String |
SERVER_STATS_NONZG_STATS_COLLECTION_ENABLE_PROP
Global property controlling whether or not stats that produce garbage as a result of being
collected are enabled.
|
static float |
SERVER_STATS_POOL_DEPLETION_THRESHOLD_DEFAULT
Default value for
SERVER_STATS_POOL_DEPLETION_THRESHOLD_PROP : 1.0f percent |
static String |
SERVER_STATS_POOL_DEPLETION_THRESHOLD_PROP
Configuration property used to set the percentage decrement at which a preallocated pool
must drop to be included in a server heartbeat.
|
static boolean |
SERVER_STATS_POOL_ENABLE_DEFAULT
Default value for
SERVER_STATS_POOL_ENABLE_PROP : true. |
static String |
SERVER_STATS_POOL_ENABLE_PROP
Global property controlling whether or not pool stats are collected by the server when
"nv.server.stats.enable" is true.
|
Modifier and Type | Method and Description |
---|---|
void |
addAcceptor(String descriptor)
Add a client acceptor to the acceptor set.
|
void |
addApp(SrvConfigAppDescriptor app)
Add a server app to the app set.
|
SrvConfigDescriptor |
clearHeartbeatLoggingProperty(String name)
Clear a server heartbeat logging logging property.
|
static SrvConfigDescriptor |
create(String name)
Create a default server descriptor instance.
|
static SrvConfigDescriptor |
create(UtlAddressDescriptor descriptor)
Create a server descriptor from an address descriptor object
|
static SrvConfigDescriptor |
createFromEnvironment()
Create a server descriptor instance initialized from the environment.
|
void |
delete()
Delete a server descriptor from the default configuration repository.
|
void |
delete(IConfigRepository repo)
Delete a server descriptor from a configuration repository.
|
static boolean |
exists(IConfigRepository repo,
String name)
Checks if a server is configured in a configuration repository.
|
static boolean |
exists(String name)
Checks if a server is configured in the default configuration repository
|
Set<String> |
getAcceptors()
Get the configured list of client acceptors.
|
SrvConfigDescriptor.Admin |
getAdmin()
Configuration for server admin and monitoring.
|
int |
getAdminClientOutputQueueCapacity()
Configures the capacity (in bytes) for the size of the server controller admin clients'
output queues.
|
SrvConfigAppDescriptor |
getApp(String appName)
Get a server app from the app set.
|
Set<String> |
getAppNames()
Get the names of the configured list of server apps.
|
Set<SrvConfigAppDescriptor> |
getApps()
Get the configured list of server apps.
|
int |
getClientHandshakeTimeout()
Get the client handshake timeout.
|
String |
getDiscoveryDescriptor()
Gets the server's discovery descriptor.
|
String |
getDisplayName()
Returns the server's display name.
|
String |
getGroup()
Implementation of
IDmnConfigDescriptor.getGroup() . |
Properties |
getHeartbeatLoggingProperties()
Get the set of server heartbeat logging properties.
|
String |
getHeartbeatLoggingProperty(String name)
Get a server heartbeat logging property.
|
SrvConfigDescriptor.Heartbeats |
getHeartbeats()
Configuration for heartbeats tracing.
|
SrvConfigDescriptor.HeartbeatTracing |
getHeartbeatTracing()
Holds configuration for heartbeat tracing.
|
int |
getIOThreadCount()
Implementation of
IDmnConfigDescriptor.getIOThreadCount() . |
long |
getIOThreadCPUAffinityMask(int threadId)
Implementation of
IDmnConfigDescriptor.getIOThreadCPUAffinityMask(int) . |
long[] |
getIOThreadCPUAffinityMasks()
Implementation of
IDmnConfigDescriptor.getIOThreadCPUAffinityMasks() . |
int |
getMaxOnDemandThreadCount()
Implementation of
IDmnConfigDescriptor.getMaxOnDemandThreadCount() . |
int |
getMaxTraceHistory()
Get the maximum number of trace records to buffer in the server's trace
history buffer.
|
int |
getMemoryReservePct()
Implementation of
IDmnConfigDescriptor.getMemoryReservePct() . |
String |
getName()
Implementation of
IDmnConfigDescriptor.getName() . |
Properties |
getOtherProperties()
Get all non-server properties.
|
String |
getOtherProperty(String name)
Get a non-server property
|
String |
getSystemName()
Get the the name of the system to which this server belongs.
|
String |
getSystemVersion()
Returns the version of the system to which the server belongs.
|
short |
getVersion()
Implementation of
IDmnConfigDescriptor.getVersion() . |
boolean |
isAutoStopOnAppStartFail()
Configures whether or not the server will automatically stop if any of its apps fails to start.
|
boolean |
isAutoStopOnLastAppStop()
Configures whether or not the server will automatically stop after the last app is stopped.
|
boolean |
isChecked()
Implementation of
IDmnConfigDescriptor.isChecked() . |
boolean |
isMultiThreaded()
Implementation of
IDmnConfigDescriptor.isMultiThreaded() . |
boolean |
isPrintDescriptor()
Implementation of
IDmnConfigDescriptor.isPrintDescriptor() . |
static SrvConfigDescriptor |
load(IConfigRepository repo,
String name)
Create a server descriptor from a configuration repository.
|
SrvConfigDescriptor |
load(Properties props,
boolean shortForm)
Load descriptor from properties in a property table.
|
static SrvConfigDescriptor |
load(String name)
Create a server descriptor from the default configuration repository.
|
static Set<SrvConfigDescriptor> |
loadAll()
Create server descriptors for all servers configured in the default
configuration repository.
|
static Set<SrvConfigDescriptor> |
loadAll(IConfigRepository repo)
Create server descriptors for all servers in a configuration repository.
|
void |
removeAcceptor(String descriptor)
Remove a client acceptor from the acceptor set.
|
void |
removeApp(String appName)
Remove a server app from the app set.
|
void |
save()
Save a server descriptor to the default configuration repository.
|
void |
save(IConfigRepository repo)
Save a server descriptor to a configuration repository.
|
Properties |
save(Properties props,
boolean shortForm)
Save a server descriptor to a property table.
|
void |
setAdminClientOutputQueueCapacity(float capacity)
Configures the capacity (in MB) for the size of the server controller admin clients'
output queues.
|
void |
setAdminClientOutputQueueCapacity(String capacity)
Configures the capacity for the size of the server controller admin clients'
output queues.
|
void |
setAutoStopOnAppStartFail(boolean autoStopOnAppStartFail)
Configures whether or not the server will automatically stop if any of its apps fails to start.
|
void |
setAutoStopOnLastAppStop(boolean autoStopOnLastAppStop)
Configures whether or not the server will automatically stop after the last app is stopped.
|
void |
setClientHandshakeTimeout(int timeout)
Set the client handshake timeout.
|
void |
setDiscoveryDescriptor(String discoveryDescriptor)
Sets the server's discovery descriptor.
|
void |
setDisplayName(String displayName)
Sets a display name for this server.
|
void |
setGroup(String group)
Implementation of
IDmnConfigDescriptor.setGroup(java.lang.String) . |
SrvConfigDescriptor |
setHeartbeatLoggingProperties(Properties val)
Set the set of server heartbeat logging properties.
|
SrvConfigDescriptor |
setHeartbeatLoggingProperty(String name,
String val)
Set a server heartbeat logging property.
|
void |
setIOThreadCount(int ioThreadCount)
Implementation of
IDmnConfigDescriptor.setIOThreadCount(int) . |
void |
setIOThreadCPUAffinityMask(int threadId,
long mask)
Implementation of
IDmnConfigDescriptor.setIOThreadCPUAffinityMask(int, long) . |
void |
setMaxOnDemandThreadCount(int maxOnDemandThreadCount)
Implementation of
IDmnConfigDescriptor.setMaxOnDemandThreadCount(int) . |
void |
setMaxTraceHistory(int val)
Set the maximum number of trace records to buffer in the server's trace
history buffer.
|
void |
setMemoryReservePct(int pct)
Implementation of
IDmnConfigDescriptor.setMemoryReservePct(int) . |
void |
setMultiThreaded(boolean multiThreaded)
Implementation of
IDmnConfigDescriptor.setMultiThreaded(boolean) . |
void |
setOtherProperty(String name,
String val)
Set a non-server property.
|
void |
setPrintDescriptor(boolean printDescriptor)
Implementation of
IDmnConfigDescriptor.setPrintDescriptor(boolean) . |
void |
setSystemName(String systemName)
The the name of the system to which this server belongs.
|
void |
setSystemVersion(String systemVersion)
Sets the version of the system to which the server belongs.
|
String |
toString()
Return a string representation of this object
|
getChecked, getThreaded, getTracer, setChecked, setTracer
public static final String SERVER_ADMINCLIENT_OUTPUTQUEUE_CAPACITY_PROP
Property name: "nv.server.adminclient.outputqueue.capacity".
Default value: "10mb"
When no unit suffix is specified the value is interpreted in megabytes.
public static final String SERVER_ADMINCLIENT_OUTPUTQUEUE_CAPACITY_DEFAULT
SERVER_ADMINCLIENT_OUTPUTQUEUE_CAPACITY_PROP
: "10mb"public static final String SERVER_STATS_ENABLE_PROP
When enabled the server will collect server heartbeats which can be trace logged or emitted to
listening admin clients and/or EventHandler
s.
Property name: "nv.server.stats.enable".
Default value: false
When set this will override the configured value for specific servers.
This property is maintained for legacy purposes, the preferred mechanism for
setting this value is to do so on a per server basis either via DDL configuration
or programmatically on the SrvConfigDescriptor
public static final boolean SERVER_STATS_ENABLE_DEFAULT
SERVER_STATS_ENABLE_PROP
: false.public static final String SERVER_STATS_INTERVAL_PROP
When enabled the server will collect server heartbeats which can be trace logged or emitted to
listening admin clients and/or EventHandler
s.
Property name: "nv.server.stats.interval".
Default value: "30000"
When set this will override the configured value for specific servers.
This property is maintained for legacy purposes, the preferred mechanism for
setting this value is to do so on a per server basis either via DDL configuration
or programmatically on the SrvConfigDescriptor
public static final String SERVER_STATS_INTERVAL_DEFAULT
SERVER_STATS_INTERVAL_PROP
: "30000".public static final String SERVER_STATS_POOL_DEPLETION_THRESHOLD_PROP
Property name: "nv.server.stats.pool.depletionThreshold".
Default value: 1.0f
So if a pool is preallocated with 1000 items and this property is set to 10, pool stats will be emitted for the pool when its size drops below 900, 800, 700, until its size reaches 0 (at which point subsequent misses would cause it to be included on every heartbeat).
Setting this to a value greater than 100 or less than or equal to 0 disables depletion threshold reporting.
When set this will override the configured value for specific servers.
This property is maintained for legacy purposes, the preferred mechanism for
setting this value is to do so on a per server basis either via DDL configuration
or programmatically on the SrvConfigDescriptor
public static final float SERVER_STATS_POOL_DEPLETION_THRESHOLD_DEFAULT
SERVER_STATS_POOL_DEPLETION_THRESHOLD_PROP
: 1.0f percentpublic static final String SERVER_STATS_INCLUDE_SERIES_PROP
Property name: "nv.server.stats.includeSeries".
Default value: true
Collection and reporting of series stats is an expensive operation. This property allows series stats to be omitted from heartbeats.
When set this will override the configured value for specific servers.
This property is maintained for legacy purposes, the preferred mechanism for
setting this value is to do so on a per server basis either via DDL configuration
or programmatically on the SrvConfigDescriptor
public static final boolean SERVER_STATS_INCLUDE_SERIES_DEFAULT
public static final String SERVER_STATS_INCLUDE_SERIES_DATAPOINTS_PROP
Including series datapoints can lead to very large heartbeats so this is only recommended for use when exact series distribution data needs to be determined. In practice the computed interval and running histogram are typically accurate enough for most monitoring situations.
Property name: "nv.server.stats.includeSeriesDataPoints".
Default value: false
This property has no effect if SERVER_STATS_INCLUDE_SERIES_PROP
is false
When set this will override the configured value for specific servers.
This property is maintained for legacy purposes, the preferred mechanism for
setting this value is to do so on a per server basis either via DDL configuration
or programmatically on the SrvConfigDescriptor
public static final boolean SERVER_STATS_INCLUDE_SERIES_DATAPOINTS_DEFAULT
public static final String SERVER_STATS_MAX_TRACKABLE_SERIES_VALUE_PROP
Property name: "nv.server.stats.maxTrackableSeriesValue".
Default value: TimeUnit.MINUTES.toMicros(10)
Collection of latency statistics uses an HDR histograms per latency tracked to capture to report interval and running latency. This is set to 10 minutes with the reasoning that we don't really care if we go over 10 minutes ... the situation is bad enough already at that point.
This property has no effect if SERVER_STATS_INCLUDE_SERIES_PROP
is false
When set this will override the configured value for specific servers.
This property is maintained for legacy purposes, the preferred mechanism for
setting this value is to do so on a per server basis either via DDL configuration
or programmatically on the SrvConfigDescriptor
public static final int SERVER_STATS_MAX_TRACKABLE_SERIES_VALUE_DEFAULT
TimeUnit.MINUTES.toMicros(10)
, e.g. a value 10
minutes for a microsend reported latency.public static final String SERVER_STATS_POOL_ENABLE_PROP
Property name: "nv.server.stats.pool.enable".
Default value: true
When set this will override the configured value for specific servers.
This property is maintained for legacy purposes, the preferred mechanism for
setting this value is to do so on a per server basis either via DDL configuration
or programmatically on the SrvConfigDescriptor
public static final boolean SERVER_STATS_POOL_ENABLE_DEFAULT
SERVER_STATS_POOL_ENABLE_PROP
: true.public static final String SERVER_STATS_NONZG_STATS_COLLECTION_ENABLE_PROP
Some stats involve using reflection or 3rd party apis that create garbage. This property can be set to false to suppress collection of those stats. Currently the list of stats that may produce garbage include:
Property name: "nv.server.stats.nonGZStatsCollectionEnable".
Default value: true.
When set this will override the configured value for specific servers.
This property is maintained for legacy purposes, the preferred mechanism for
setting this value is to do so on a per server basis either via DDL configuration
or programmatically on the SrvConfigDescriptor
public static final boolean SERVER_STATS_NONZG_STATS_COLLECTION_ENABLE_DEFAULT
SERVER_STATS_NONZG_STATS_COLLECTION_ENABLE_PROP
: "nv.server.stats.nonGZStatsCollectionEnable".public static final String SERVER_AUTOSTOP_ONAPPSTARTFAIL
Property name: "nv.server.autostop.onappstartfail".
Default value: false.
When set this will override the configured value for specific servers.
This property is maintained for legacy purposes, the preferred mechanism for
setting this value is to do so on a per server basis either via DDL configuration
or programmatically on the SrvConfigDescriptor
public static final boolean SERVER_AUTOSTOP_ONAPPSTARTFAIL_DEFAULT
SERVER_AUTOSTOP_ONAPPSTARTFAIL
: false.public static final String SERVER_AUTOSTOP_ONLASTAPPSTOP
Property name: "nv.server.autostop.onlastappstop".
Default value: true.
When set this will override the configured value for specific servers.
This property is maintained for legacy purposes, the preferred mechanism for
setting this value is to do so on a per server basis either via DDL configuration
or programmatically on the SrvConfigDescriptor
public static final boolean SERVER_AUTOSTOP_ONLASTAPPSTOP_DEFAULT
SERVER_AUTOSTOP_ONLASTAPPSTOP
: true.public static final String SERVER_ENABLE_BACKGROUND_COMMANDINVOCATION
Property name: "nv.server.backgroundcommandinvocation".
Default value: true.
This property is an experimental property and may be modified or removed in future releases.
public static final boolean SERVER_ENABLE_BACKGROUND_COMMANDINVOCATION_DEFAULT
SERVER_ENABLE_BACKGROUND_COMMANDINVOCATION
: true.public static final String SERVER_ADMIN_APP_MULTIPLEX_SENDS
Property name: "nv.server.adminappmultiplexsends".
Default value: true.
This property is an experimental property and may be modified or removed in future releases.
public static final boolean SERVER_ADMIN_APP_MULTIPLEX_SENDS_DEFAULT
SERVER_ADMIN_APP_MULTIPLEX_SENDS
: true.public final String getName()
IDmnConfigDescriptor.getName()
.This method returns the configured name of this daemon. The default name of a daemon is configured using the nv.app.name property.
public final short getVersion()
IDmnConfigDescriptor.getVersion()
.This method returns the daemon implementation version.
public final void setGroup(String group)
IDmnConfigDescriptor.setGroup(java.lang.String)
.group
- The daemon's new application group.public final String getGroup()
IDmnConfigDescriptor.getGroup()
.This method returns the configured group of this daemon. The daemon group is configured using the nv.app.group property. The daemon group serves to partition applications into non-intersecting groups. The daemon does not allow connections from entities that are in a group different from its group.
public final boolean isChecked()
IDmnConfigDescriptor.isChecked()
.This method returns whether the daemon is configured to operated in checked mode. When operating in checked mode, the daemon performs additional state and integrity checks.
public final void setPrintDescriptor(boolean printDescriptor)
IDmnConfigDescriptor.setPrintDescriptor(boolean)
.printDescriptor
- Boolean value indicating whether the daemon should print its
descriptor on startup or not.public final boolean isPrintDescriptor()
IDmnConfigDescriptor.isPrintDescriptor()
.This method returns whether the daemon is configured to print its descriptor object on startup. If true, the daemon will print its descriptor to System.out.
public final void setMultiThreaded(boolean multiThreaded)
IDmnConfigDescriptor.setMultiThreaded(boolean)
.multiThreaded
- Boolean value indicating whether the daemon should operate in
single or multi threaded mode.public final boolean isMultiThreaded()
IDmnConfigDescriptor.isMultiThreaded()
.This method returns whether the daemon is configured to operate in multi-threaded mode.
public final void setIOThreadCount(int ioThreadCount)
IDmnConfigDescriptor.setIOThreadCount(int)
.ioThreadCount
- The number of I/O threads to start.public final int getIOThreadCount()
IDmnConfigDescriptor.getIOThreadCount()
.This method returns the number of I/O threads to start in the daemon.
public final void setIOThreadCPUAffinityMask(int threadId, long mask)
IDmnConfigDescriptor.setIOThreadCPUAffinityMask(int, long)
.threadId
- The IO thread id - 0 <= id < ioThreadCountmask
- The affinity mask to set.public final long getIOThreadCPUAffinityMask(int threadId)
IDmnConfigDescriptor.getIOThreadCPUAffinityMask(int)
.threadId
- The IO thread id - 0 <= id < ioThreadCountpublic final long[] getIOThreadCPUAffinityMasks()
IDmnConfigDescriptor.getIOThreadCPUAffinityMasks()
.public final void setMaxOnDemandThreadCount(int maxOnDemandThreadCount)
IDmnConfigDescriptor.setMaxOnDemandThreadCount(int)
.maxOnDemandThreadCount
- The max number of on-demand threads that can be created.public final int getMaxOnDemandThreadCount()
IDmnConfigDescriptor.getMaxOnDemandThreadCount()
.This method returns the maximum number of on-demand threads that can be created in the daemon. A value of -1 indicates an unlimited number of threads can be created.
public final void setMemoryReservePct(int pct)
IDmnConfigDescriptor.setMemoryReservePct(int)
.pct
- Percentage of total memory to reservepublic final int getMemoryReservePct()
IDmnConfigDescriptor.getMemoryReservePct()
.public final void setMaxTraceHistory(int val)
val
- The maximum number of trace records.public final int getMaxTraceHistory()
public void setDiscoveryDescriptor(String discoveryDescriptor)
discoveryDescriptor
- The discovery descriptor.public String getDiscoveryDescriptor()
public final void addAcceptor(String descriptor)
descriptor
- The acceptor descriptor to add.public final void removeAcceptor(String descriptor)
descriptor
- The acceptor descriptor to remove .public final Set<String> getAcceptors()
This method returns the list of acceptors to start in the server to accept incoming client connections.
public final void setClientHandshakeTimeout(int timeout)
timeout
- The handshake timeout to set (in seconds)public final int getClientHandshakeTimeout()
This method returns the configured client handshake timeout i.e. the maximum time (in seconds) that the server will wait for the handshake request to arrive from the client.
public final void setAutoStopOnAppStartFail(boolean autoStopOnAppStartFail)
Disabling auto stop on app start fail leaves the server running and managable even when one or more applications failed to start. This includes the admin app
autoStopOnAppStartFail
- true to stop if any app fails to start.isAutoStopOnAppStartFail()
public final boolean isAutoStopOnAppStartFail()
public final void setAutoStopOnLastAppStop(boolean autoStopOnLastAppStop)
Disabling auto stop on last app stop leaves the server running and managable even when all applications have stopped. The xvm's internal admin app does not count as a running app.
autoStopOnLastAppStop
- true to stop on last app stop.isAutoStopOnLastAppStop()
public final boolean isAutoStopOnLastAppStop()
public final void setAdminClientOutputQueueCapacity(float capacity)
capacity
- the admin client queue size in MB.getAdminClientOutputQueueCapacity()
public final void setAdminClientOutputQueueCapacity(String capacity)
capacity
- the admin client queue size in MB.getAdminClientOutputQueueCapacity()
public final int getAdminClientOutputQueueCapacity()
public void setSystemName(String systemName)
A system groups a collection of servers together. Typically, all servers in a given system share the same server discovery domain and are managed together.
systemName
- The of the system that contains this server.public String getSystemName()
A system groups a collection of servers together. Typically, all servers in a given system share the same server discovery domain and are managed together.
public final void setDisplayName(String displayName)
displayName
- the server's display namepublic final String getDisplayName()
public void setSystemVersion(String systemVersion)
systemVersion
- the version of the system.public String getSystemVersion()
public final void addApp(SrvConfigAppDescriptor app)
app
- The app to add.public final SrvConfigAppDescriptor getApp(String appName)
appName
- The name of the app to retrieve.public final void removeApp(String appName)
appName
- The name of the app to remove.public final Set<SrvConfigAppDescriptor> getApps()
This method returns the set of server apps to load at server startup.
public final Set<String> getAppNames()
This method returns the set of server apps to load at server startup.
public final SrvConfigDescriptor.Heartbeats getHeartbeats()
public final SrvConfigDescriptor.HeartbeatTracing getHeartbeatTracing()
public final SrvConfigDescriptor setHeartbeatLoggingProperty(String name, String val)
name
- The name of the property to set.val
- The property value.public final String getHeartbeatLoggingProperty(String name)
name
- The property namepublic final SrvConfigDescriptor clearHeartbeatLoggingProperty(String name)
name
- The name of the property to clear.public final SrvConfigDescriptor setHeartbeatLoggingProperties(Properties val)
val
- The property tablepublic final Properties getHeartbeatLoggingProperties()
Note: The properties object returned is the object maintained by the descriptor. Therefore, outbound message logging properties can be added, removed and/or updated directly in the returned object. For the changes to take effect, the changes must be made before the server is created
public final SrvConfigDescriptor.Admin getAdmin()
public final void setOtherProperty(String name, String val)
name
- The property name.public final String getOtherProperty(String name)
name
- The property namepublic final Properties getOtherProperties()
public final SrvConfigDescriptor load(Properties props, boolean shortForm)
props
- The property table to load the descriptor from.shortForm
- This parameter indicates whether the method should
use the long or short for for property names in the table. the long
form of properties are of the form 'nv.server.public final Properties save(Properties props, boolean shortForm)
props
- The property table to save the descriptor to.shortForm
- This parameter indicates whether the method should
use the long or short for for property names when saving the descriptor
to the table. The long form are propertis of the form 'nv.server.IllegalArgumentException
- If the props are null.public final void save(IConfigRepository repo) throws ESrvConfigException
repo
- The configuration respository to save the descriptor in.ESrvConfigException
- Thrown in case an error in encountered during the
saving of the descriptor.This method saves a server descriptor to a configuration repository. The descriptor is saved in a format suitable for loading subsequently using any of the load methods offered by this class.
public final void save() throws ESrvConfigException
ESrvConfigException
This method saves a server descriptor to the default configuration respository. The descriptor is saved in a format suitable for loading subsequently using any of the load methods offered by this class.
public final void delete(IConfigRepository repo) throws ESrvConfigException
repo
- The configuration respository to delete the sever from.ESrvConfigException
- Thrown in case an error in encountered during the
deletion of the descriptor.This method deletes a server descriptor from a configuration repository.
public final void delete() throws ESrvConfigException
ESrvConfigException
- Thrown in case an error in encountered during the
deletion of the descriptor.This method permanently deletes a server descriptor from the default configuration repository.
public final String toString()
public static SrvConfigDescriptor create(String name)
name
- The name of the server described by the created descriptor. The
server name can be specified as null. If so, the server name will be set to
the the value returned by XRuntime.getAppName()
public static SrvConfigDescriptor createFromEnvironment()
public static SrvConfigDescriptor create(UtlAddressDescriptor descriptor)
descriptor
- The address descriptor using which to create the server
descriptor.
This method creates and initializes a server descriptor from the an address
descriptor of the following form:
server://
public static boolean exists(IConfigRepository repo, String name)
repo
- The configuration respository to check in.name
- The name of the server to check for.public static boolean exists(String name)
name
- The name of the server to check for.public static SrvConfigDescriptor load(IConfigRepository repo, String name) throws ESrvConfigException
repo
- The configuration respository to create the descriptor from.name
- The name of the server whose descriptor is to be loaded.ESrvConfigException
This method creates and initializes a server descriptor from a configuration repository.
public static Set<SrvConfigDescriptor> loadAll(IConfigRepository repo) throws ESrvConfigException
repo
- The configuration respository from where to create the servers.This method creates and initializes server descriptors for each of the servers configured in a configuration repository.
ESrvConfigException
public static SrvConfigDescriptor load(String name) throws ESrvConfigException
name
- The name of the server whose descriptor is to be loaded.ESrvConfigException
This method creates and initializes a server descriptor from the default configuration repository.
public static Set<SrvConfigDescriptor> loadAll() throws ESrvConfigException
This method creates and initializes server descriptors for all the servers configured in the default configuration repository.
ESrvConfigException
Copyright © 2019 Neeve Research, LLC. All Rights Reserved.