com.neeve.server.config
Class SrvConfigDescriptor

java.lang.Object
  extended by com.neeve.root.RootObject
      extended by com.neeve.daemon.config.DmnConfigDescriptor
          extended by com.neeve.server.config.SrvConfigDescriptor
All Implemented Interfaces:
com.neeve.daemon.config.IDmnConfigDescriptor

public final class SrvConfigDescriptor
extends com.neeve.daemon.config.DmnConfigDescriptor

Server configuration descriptor.

This class describes a Talon server and contains methods to persist and load descriptors to/from the platform configuration repositories.

Threading:
This class is safe for concurrent access by multiple threads.

Nested Class Summary
static class SrvConfigDescriptor.Heartbeats
          Configures stats collection and heartbeats for the server.
static class SrvConfigDescriptor.HeartbeatTracing
          Configures heartbeat tracing for a server.
 
Field Summary
static float SERVER_ADMINCLIENT_OUTPUTQUEUE_CAPACITY_DEFAULT
          Default value for SERVER_ADMINCLIENT_OUTPUTQUEUE_CAPACITY_PROP: 10.0f
static String SERVER_ADMINCLIENT_OUTPUTQUEUE_CAPACITY_PROP
          Configuration property used to set the capacity (in MB) for the size of the controller admin client's output queue.
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 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
          Default value for SERVER_STATS_NONZG_STATS_COLLECTION_ENABLE_PROP: "nv.server.stats.nonGZStatsCollectionEnable".
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.
 
Method Summary
 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.
 float getAdminClientOutputQueueCapacity()
          Configures the capacity (in MB) 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 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 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 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 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
 
Methods inherited from class com.neeve.daemon.config.DmnConfigDescriptor
setTraceLevel, toString
 
Methods inherited from class com.neeve.root.RootObject
getChecked, getThreaded, getTracer, setChecked, setTracer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.neeve.daemon.config.IDmnConfigDescriptor
setChecked
 

Field Detail

SERVER_ADMINCLIENT_OUTPUTQUEUE_CAPACITY_PROP

public static final String SERVER_ADMINCLIENT_OUTPUTQUEUE_CAPACITY_PROP
Configuration property used to set the capacity (in MB) for the size of the controller admin client's output queue. Outbound packets are dropped once the queue size reaches and/or exceeds the configured capacity.

Property name: "nv.server.adminclient.outputqueue.capacity".
Default value: 10.0f

See Also:
Constant Field Values

SERVER_ADMINCLIENT_OUTPUTQUEUE_CAPACITY_DEFAULT

public static final float SERVER_ADMINCLIENT_OUTPUTQUEUE_CAPACITY_DEFAULT
Default value for SERVER_ADMINCLIENT_OUTPUTQUEUE_CAPACITY_PROP: 10.0f

See Also:
Constant Field Values

SERVER_STATS_ENABLE_PROP

public static final String SERVER_STATS_ENABLE_PROP
Global configuration property used to enable server stats collection and emission via SrvMonHeartbeatMessages.

When enabled the server will collect server heartbeats which can be trace logged or emitted to listening admin clients and/or EventHandlers.

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

See Also:
Constant Field Values

SERVER_STATS_ENABLE_DEFAULT

public static final boolean SERVER_STATS_ENABLE_DEFAULT
Default value for SERVER_STATS_ENABLE_PROP: false.

See Also:
Constant Field Values

SERVER_STATS_INTERVAL_PROP

public static final String SERVER_STATS_INTERVAL_PROP
Global Configuration property used to set the server stats heartbeat interval (in milliseconds) at which to collect SrvMonHeartbeatMessages.

When enabled the server will collect server heartbeats which can be trace logged or emitted to listening admin clients and/or EventHandlers.

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

See Also:
Constant Field Values

SERVER_STATS_INTERVAL_DEFAULT

public static final String SERVER_STATS_INTERVAL_DEFAULT
Default value (in milliseconds) for SERVER_STATS_INTERVAL_PROP: "30000".

See Also:
Constant Field Values

SERVER_STATS_POOL_DEPLETION_THRESHOLD_PROP

public static final 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.

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

See Also:
Constant Field Values

SERVER_STATS_POOL_DEPLETION_THRESHOLD_DEFAULT

public static final float SERVER_STATS_POOL_DEPLETION_THRESHOLD_DEFAULT
Default value for SERVER_STATS_POOL_DEPLETION_THRESHOLD_PROP: 1.0f percent

See Also:
Constant Field Values

SERVER_STATS_INCLUDE_SERIES_PROP

public static final String SERVER_STATS_INCLUDE_SERIES_PROP
Global configuration property indicating whether or not series stats should be included in heartbeats.

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

See Also:
Constant Field Values

SERVER_STATS_INCLUDE_SERIES_DEFAULT

public static final boolean SERVER_STATS_INCLUDE_SERIES_DEFAULT
The default value for "nv.server.stats.includeSeries": true.

See Also:
Constant Field Values

SERVER_STATS_INCLUDE_SERIES_DATAPOINTS_PROP

public static final String SERVER_STATS_INCLUDE_SERIES_DATAPOINTS_PROP
Indicates whether or not series stats should report the datapoints captured for a series statistic.

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

See Also:
Constant Field Values

SERVER_STATS_INCLUDE_SERIES_DATAPOINTS_DEFAULT

public static final boolean SERVER_STATS_INCLUDE_SERIES_DATAPOINTS_DEFAULT
The default value for "nv.server.stats.includeSeriesDataPoints": false.

See Also:
SERVER_STATS_INCLUDE_SERIES_DATAPOINTS_PROP, Constant Field Values

SERVER_STATS_MAX_TRACKABLE_SERIES_VALUE_PROP

public static final String SERVER_STATS_MAX_TRACKABLE_SERIES_VALUE_PROP
Global Configuration for the maximum trackable value that can be tracked for reported series histogram timings.

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

See Also:
Constant Field Values

SERVER_STATS_MAX_TRACKABLE_SERIES_VALUE_DEFAULT

public static final 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.


SERVER_STATS_POOL_ENABLE_PROP

public static final 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.

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

See Also:
Constant Field Values

SERVER_STATS_POOL_ENABLE_DEFAULT

public static final boolean SERVER_STATS_POOL_ENABLE_DEFAULT
Default value for SERVER_STATS_POOL_ENABLE_PROP: true.

See Also:
Constant Field Values

SERVER_STATS_NONZG_STATS_COLLECTION_ENABLE_PROP

public static final 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.

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

See Also:
Constant Field Values

SERVER_STATS_NONZG_STATS_COLLECTION_ENABLE_DEFAULT

public static final boolean SERVER_STATS_NONZG_STATS_COLLECTION_ENABLE_DEFAULT
Default value for SERVER_STATS_NONZG_STATS_COLLECTION_ENABLE_PROP: "nv.server.stats.nonGZStatsCollectionEnable".

See Also:
Constant Field Values

SERVER_AUTOSTOP_ONLASTAPPSTOP

public static final String SERVER_AUTOSTOP_ONLASTAPPSTOP
Global property controlling whether or not the server will automatically stop after the last app is stopped.

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

See Also:
Constant Field Values

SERVER_AUTOSTOP_ONLASTAPPSTOP_DEFAULT

public static final boolean SERVER_AUTOSTOP_ONLASTAPPSTOP_DEFAULT
Default value for SERVER_AUTOSTOP_ONLASTAPPSTOP: true.

See Also:
Constant Field Values
Method Detail

getName

public final String getName()
Implementation of IDmnConfigDescriptor.getName().


getVersion

public final short getVersion()
Implementation of IDmnConfigDescriptor.getVersion().


setGroup

public final void setGroup(String group)
Implementation of IDmnConfigDescriptor.setGroup(java.lang.String).


getGroup

public final String getGroup()
Implementation of IDmnConfigDescriptor.getGroup().


isChecked

public final boolean isChecked()
Implementation of IDmnConfigDescriptor.isChecked().


setPrintDescriptor

public final void setPrintDescriptor(boolean printDescriptor)
Implementation of IDmnConfigDescriptor.setPrintDescriptor(boolean).


isPrintDescriptor

public final boolean isPrintDescriptor()
Implementation of IDmnConfigDescriptor.isPrintDescriptor().


setMultiThreaded

public final void setMultiThreaded(boolean multiThreaded)
Implementation of IDmnConfigDescriptor.setMultiThreaded(boolean).


isMultiThreaded

public final boolean isMultiThreaded()
Implementation of IDmnConfigDescriptor.isMultiThreaded().


setIOThreadCount

public final void setIOThreadCount(int ioThreadCount)
Implementation of IDmnConfigDescriptor.setIOThreadCount(int).


getIOThreadCount

public final int getIOThreadCount()
Implementation of IDmnConfigDescriptor.getIOThreadCount().


setIOThreadCPUAffinityMask

public final void setIOThreadCPUAffinityMask(int threadId,
                                             long mask)
Implementation of IDmnConfigDescriptor.setIOThreadCPUAffinityMask(int, long).


getIOThreadCPUAffinityMask

public final long getIOThreadCPUAffinityMask(int threadId)
Implementation of IDmnConfigDescriptor.getIOThreadCPUAffinityMask(int).


getIOThreadCPUAffinityMasks

public final long[] getIOThreadCPUAffinityMasks()
Implementation of IDmnConfigDescriptor.getIOThreadCPUAffinityMasks().


setMaxOnDemandThreadCount

public final void setMaxOnDemandThreadCount(int maxOnDemandThreadCount)
Implementation of IDmnConfigDescriptor.setMaxOnDemandThreadCount(int).


getMaxOnDemandThreadCount

public final int getMaxOnDemandThreadCount()
Implementation of IDmnConfigDescriptor.getMaxOnDemandThreadCount().


setMemoryReservePct

public final void setMemoryReservePct(int pct)
Implementation of IDmnConfigDescriptor.setMemoryReservePct(int).


getMemoryReservePct

public final int getMemoryReservePct()
Implementation of IDmnConfigDescriptor.getMemoryReservePct().


setMaxTraceHistory

public final void setMaxTraceHistory(int val)
Set the maximum number of trace records to buffer in the server's trace history buffer.

Parameters:
val - The maximum number of trace records.
Threading:
This method is safe for concurrent access by multiple threads.

getMaxTraceHistory

public final int getMaxTraceHistory()
Get the maximum number of trace records to buffer in the server's trace history buffer.

Returns:
Returns the max trace history.
Threading:
This method is safe for concurrent access by multiple threads.

setDiscoveryDescriptor

public void setDiscoveryDescriptor(String discoveryDescriptor)
Sets the server's discovery descriptor. Setting this value to null will cause the server to use the default discovery returned by the DiscoveryFactory which would typically be configured via the XRuntime environment' nv.discovery.descriptor value

Parameters:
discoveryDescriptor - The discovery descriptor.
Threading:
This method is safe for concurrent access by multiple threads.

getDiscoveryDescriptor

public String getDiscoveryDescriptor()
Gets the server's discovery descriptor. A return value of null will cause the server to use the DiscoveryFactory's default provider.

Returns:
The discovery descriptor or null if the default discovery provider should be used.
Threading:
This method is safe for concurrent access by multiple threads.

addAcceptor

public final void addAcceptor(String descriptor)
Add a client acceptor to the acceptor set.

Parameters:
descriptor - The acceptor descriptor to add.
Threading:
This method is safe for concurrent access by multiple threads.

removeAcceptor

public final void removeAcceptor(String descriptor)
Remove a client acceptor from the acceptor set.

Parameters:
descriptor - The acceptor descriptor to remove .
Threading:
This method is safe for concurrent access by multiple threads.

getAcceptors

public final Set<String> getAcceptors()
Get the configured list of client acceptors.

Returns:
Returns the list of configured client acceptors.

This method returns the list of acceptors to start in the server to accept incoming client connections.

Threading:
This method is safe for concurrent access by multiple threads.

setClientHandshakeTimeout

public final void setClientHandshakeTimeout(int timeout)
Set the client handshake timeout.

Parameters:
timeout - The handshake timeout to set (in seconds)
Threading:
This method is safe for concurrent access by multiple threads.

getClientHandshakeTimeout

public final int getClientHandshakeTimeout()
Get the client handshake timeout.

Returns:
Returns the maximum time that a server will wait for handshake request to arrive from a client during the initial connection handshake.

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.

Threading:
This method is safe for concurrent access by multiple threads.

setAutoStopOnLastAppStop

public final void setAutoStopOnLastAppStop(boolean autoStopOnLastAppStop)
Configures whether or not the server will automatically stop after the last app is stopped.

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.

Parameters:
autoStopOnLastAppStop - true to stop on last app stop.
See Also:
isAutoStopOnLastAppStop()

isAutoStopOnLastAppStop

public final boolean isAutoStopOnLastAppStop()
Configures whether or not the server will automatically stop after the last app is stopped.

Returns:
true to stop on last app stop

setAdminClientOutputQueueCapacity

public final void setAdminClientOutputQueueCapacity(float capacity)
Configures the capacity (in MB) for the size of the server controller admin clients' output queues. Outbound packets are dropped once the queue size reaches and/or exceeds the configured capacity.

Parameters:
capacity - the admin client queue size in MB.
See Also:
getAdminClientOutputQueueCapacity()

getAdminClientOutputQueueCapacity

public final float getAdminClientOutputQueueCapacity()
Configures the capacity (in MB) for the size of the server controller admin clients' output queues. Outbound packets are dropped once the queue size reaches and/or exceeds the configured capacity.

Returns:
the admin client queue size in MB

setSystemName

public void setSystemName(String systemName)
The the name of the system to which this server belongs.

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.

Parameters:
systemName - The of the system that contains this server.

getSystemName

public String getSystemName()
Get the the name of the system to which this server belongs.

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.

Returns:
the system to which the server belongs (if available)

setSystemVersion

public void setSystemVersion(String systemVersion)
Sets the version of the system to which the server belongs.

Parameters:
systemVersion - the version of the system.

getSystemVersion

public String getSystemVersion()
Returns the version of the system to which the server belongs.

Returns:
the version of the system.

addApp

public final void addApp(SrvConfigAppDescriptor app)
Add a server app to the app set.

Parameters:
app - The app to add.
Threading:
This method is safe for concurrent access by multiple threads.

getApp

public final SrvConfigAppDescriptor getApp(String appName)
Get a server app from the app set.

Parameters:
appName - The name of the app to retrieve.
Returns:
Returns the app of the supplied name or null if not found.
Threading:
This method is safe for concurrent access by multiple threads.

removeApp

public final void removeApp(String appName)
Remove a server app from the app set.

Parameters:
appName - The name of the app to remove.
Threading:
This method is safe for concurrent access by multiple threads.

getApps

public final Set<SrvConfigAppDescriptor> getApps()
Get the configured list of server apps.

Returns:
Returns the list of configured server apps.

This method returns the set of server apps to load at server startup.

Threading:
This method is safe for concurrent access by multiple threads.

getAppNames

public final Set<String> getAppNames()
Get the names of the configured list of server apps.

Returns:
Returns the list of configured server apps.

This method returns the set of server apps to load at server startup.

Threading:
This method is safe for concurrent access by multiple threads.

getHeartbeats

public final SrvConfigDescriptor.Heartbeats getHeartbeats()
Configuration for heartbeats tracing.

Returns:
Heartbeat tracing configuration.

getHeartbeatTracing

public final SrvConfigDescriptor.HeartbeatTracing getHeartbeatTracing()
Holds configuration for heartbeat tracing.

Returns:
Heartbeat tracing configuration.

setHeartbeatLoggingProperty

public final SrvConfigDescriptor setHeartbeatLoggingProperty(String name,
                                                             String val)
Set a server heartbeat logging property.

Parameters:
name - The name of the property to set.
val - The property value.
Returns:
Returns this for invocation chaining.

getHeartbeatLoggingProperty

public final String getHeartbeatLoggingProperty(String name)
Get a server heartbeat logging property.

Parameters:
name - The property name
Returns:
Returns the property value.

clearHeartbeatLoggingProperty

public final SrvConfigDescriptor clearHeartbeatLoggingProperty(String name)
Clear a server heartbeat logging logging property.

Parameters:
name - The name of the property to clear.
Returns:
Returns this for invocation chaining.

setHeartbeatLoggingProperties

public final SrvConfigDescriptor setHeartbeatLoggingProperties(Properties val)
Set the set of server heartbeat logging properties.

Parameters:
val - The property table

getHeartbeatLoggingProperties

public final Properties getHeartbeatLoggingProperties()
Get the set of server heartbeat logging properties.

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

Returns:
Returns the property table.

setOtherProperty

public final void setOtherProperty(String name,
                                   String val)
Set a non-server property.

Parameters:
name - The property name.
Threading:
This method is safe for concurrent access by multiple threads.

getOtherProperty

public final String getOtherProperty(String name)
Get a non-server property

Parameters:
name - The property name
Threading:
This method is safe for concurrent access by multiple threads.

getOtherProperties

public final Properties getOtherProperties()
Get all non-server properties.

Returns:
Returns the set of non-server properties
Threading:
This method is safe for concurrent access by multiple threads.

load

public final SrvConfigDescriptor load(Properties props,
                                      boolean shortForm)
Load descriptor from properties in a property table.

Parameters:
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.' while the short form is simple ''.
Threading:
This method is safe for concurrent access by multiple threads.

save

public final Properties save(Properties props,
                             boolean shortForm)
Save a server descriptor to a property table.

Parameters:
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.' while the short form is the simple ''.
Throws:
IllegalArgumentException - If the props are null.
Threading:
This method is notsafe for concurrent access by multiple threads.

save

public final void save(IConfigRepository repo)
                throws ESrvConfigException
Save a server descriptor to a configuration repository.

Parameters:
repo - The configuration respository to save the descriptor in.
Throws:
ESrvConfigException - Thrown in case an error in encountered during the saving of the descriptor.
Threading:
This method is notsafe for concurrent access by multiple threads.

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.


save

public final void save()
                throws ESrvConfigException
Save a server descriptor to the default configuration repository.

Throws:
ESrvConfigException
Threading:
This method is notsafe for concurrent access by multiple threads.

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.


delete

public final void delete(IConfigRepository repo)
                  throws ESrvConfigException
Delete a server descriptor from a configuration repository.

Parameters:
repo - The configuration respository to delete the sever from.
Throws:
ESrvConfigException - Thrown in case an error in encountered during the deletion of the descriptor.
Threading:
This method is notsafe for concurrent access by multiple threads.

This method deletes a server descriptor from a configuration repository.


delete

public final void delete()
                  throws ESrvConfigException
Delete a server descriptor from the default configuration repository.

Throws:
ESrvConfigException - Thrown in case an error in encountered during the deletion of the descriptor.
Threading:
This method is notsafe for concurrent access by multiple threads.

This method permanently deletes a server descriptor from the default configuration repository.


toString

public final String toString()
Return a string representation of this object

Overrides:
toString in class Object

create

public static SrvConfigDescriptor create(String name)
Create a default server descriptor instance.

Parameters:
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()
Returns:
Returns the created server descriptor.
Threading:
This method is safe for concurrent access by multiple threads.

createFromEnvironment

public static SrvConfigDescriptor createFromEnvironment()
Create a server descriptor instance initialized from the environment.

Returns:
Returns the created configuration descriptor.
Threading:
This method is safe for concurrent access by multiple threads.

create

public static SrvConfigDescriptor create(UtlAddressDescriptor descriptor)
Create a server descriptor from an address descriptor object

Parameters:
descriptor - The address descriptor using which to create the server descriptor.
Threading:
This method is safe for concurrent access by multiple threads.

This method creates and initializes a server descriptor from the an address descriptor of the following form:

server://&prop=val&...&nv.server.apps=appdesc1,..., appdescN...&prop=val The creation process instantiate the apps described in the server descriptor string.


exists

public static boolean exists(IConfigRepository repo,
                             String name)
Checks if a server is configured in a configuration repository.

Parameters:
repo - The configuration respository to check in.
name - The name of the server to check for.
Threading:
This method is safe for concurrent access by multiple threads.

exists

public static boolean exists(String name)
Checks if a server is configured in the default configuration repository

Parameters:
name - The name of the server to check for.
Threading:
This method is safe for concurrent access by multiple threads.

load

public static SrvConfigDescriptor load(IConfigRepository repo,
                                       String name)
                                throws ESrvConfigException
Create a server descriptor from a configuration repository.

Parameters:
repo - The configuration respository to create the descriptor from.
name - The name of the server whose descriptor is to be loaded.
Throws:
ESrvConfigException
Threading:
This method is safe for concurrent access by multiple threads.

This method creates and initializes a server descriptor from a configuration repository.


loadAll

public static Set<SrvConfigDescriptor> loadAll(IConfigRepository repo)
                                        throws ESrvConfigException
Create server descriptors for all servers in a configuration repository.

Parameters:
repo - The configuration respository from where to create the servers.
Returns:
Returns the set of server descriptors.

This method creates and initializes server descriptors for each of the servers configured in a configuration repository.

Throws:
ESrvConfigException
Threading:
This method is safe for concurrent access by multiple threads.

load

public static SrvConfigDescriptor load(String name)
                                throws ESrvConfigException
Create a server descriptor from the default configuration repository.

Parameters:
name - The name of the server whose descriptor is to be loaded.
Throws:
ESrvConfigException
Threading:
This method is safe for concurrent access by multiple threads.

This method creates and initializes a server descriptor from the default configuration repository.


loadAll

public static Set<SrvConfigDescriptor> loadAll()
                                        throws ESrvConfigException
Create server descriptors for all servers configured in the default configuration repository.

Returns:
Returns the set of server descriptors.

This method creates and initializes server descriptors for all the servers configured in the default configuration repository.

Throws:
ESrvConfigException
Threading:
This method is safe for concurrent access by multiple threads.


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.