com.neeve.daemon.config
Interface IDmnConfigDescriptor

All Known Implementing Classes:
DmnConfigDescriptor, SrvConfigDescriptor

public interface IDmnConfigDescriptor

The Daemon configuration descriptor interface.

This interface is the root interface for daemon configuration descriptors. This interface defines methods that work with configuration properties common to all X Platform daemons.

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

Method Summary
 String getGroup()
          Get the daemon group.
 int getIOThreadCount()
          Get the number of I/O threads to start in the daemon.
 long getIOThreadCPUAffinityMask(int threadId)
          Get an IO thread's CPU affinity mask.
 long[] getIOThreadCPUAffinityMasks()
          Get the set of IO thread's CPU affinity mask.
 int getMaxOnDemandThreadCount()
          Get the maximum number of on-demand threads that can be created in the daemon.
 int getMemoryReservePct()
          Get the amount of total memory reserved for OOM handling.
 String getName()
          Get the daemon name.
 short getVersion()
          Get the daemon version.
 boolean isChecked()
          Get whether the daemon is configured to operate in checked mode.
 boolean isMultiThreaded()
          Get whether the daemon is configured to operate in multi-threaded mode.
 boolean isPrintDescriptor()
          Get whether the daemon is configured to print its descriptor on startup.
 void setChecked(boolean val)
          Set whether the daemon should operate in checked mode.
 void setGroup(String group)
          Set the daemon's application group.
 void setIOThreadCount(int count)
          Set the number of I/O threads to start in the daemon.
 void setIOThreadCPUAffinityMask(int threadId, long mask)
          Set the CPU affinity mask for an IO thread..
 void setMaxOnDemandThreadCount(int count)
          Set the maximum number of on-demand threads that can be created in the daemon.
 void setMemoryReservePct(int pct)
          Set the amount of total memory to reserve for OOM handling.
 void setMultiThreaded(boolean val)
          Set whether the daemon should operate in single or multi-threaded mode.
 void setPrintDescriptor(boolean val)
          Set whether the daemon should print its descriptor on startup or not.
 

Method Detail

getName

String getName()
Get the daemon name.

Returns:
Returns the configured name of the daemon.

This method returns the configured name of this daemon. The default name of a daemon is configured using the nv.app.name property.

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

getVersion

short getVersion()
Get the daemon version.

Returns:
Returns the current version of the daemon implementation.

This method returns the daemon implementation version.

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

setGroup

void setGroup(String group)
Set the daemon's application group.

Parameters:
group - The daemon's new application group.
Threading:
This method is safe for concurrent access by multiple threads.

getGroup

String getGroup()
Get the daemon group.

Returns:
Returns the configured application group of the daemon.

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.

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

setChecked

void setChecked(boolean val)
Set whether the daemon should operate in checked mode.

Parameters:
val - Boolean value indicating whether the daemon should operate in checked or unchecked mode.
Threading:
This method is safe for concurrent access by multiple threads.

isChecked

boolean isChecked()
Get whether the daemon is configured to operate in checked mode.

Returns:
Returns whether the daemon is oonfigured to operated in checked or unchecked mode.

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.

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

setMultiThreaded

void setMultiThreaded(boolean val)
Set whether the daemon should operate in single or multi-threaded mode.

Parameters:
val - Boolean value indicating whether the daemon should operate in single or multi threaded mode.
Threading:
This method is safe for concurrent access by multiple threads.

isMultiThreaded

boolean isMultiThreaded()
Get whether the daemon is configured to operate in multi-threaded mode.

Returns:
Returns whether the daemon is oonfigured to operated in single or multi threaded mode.

This method returns whether the daemon is configured to operate in multi-threaded mode.

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

setPrintDescriptor

void setPrintDescriptor(boolean val)
Set whether the daemon should print its descriptor on startup or not.

Parameters:
val - Boolean value indicating whether the daemon should print its descriptor on startup or not.
Threading:
This method is safe for concurrent access by multiple threads.

isPrintDescriptor

boolean isPrintDescriptor()
Get whether the daemon is configured to print its descriptor on startup.

Returns:
Returns whether the daemon is configured to print its descriptor object on startup

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.

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

setIOThreadCount

void setIOThreadCount(int count)
Set the number of I/O threads to start in the daemon.

Parameters:
count - The number of I/O threads to start.
Threading:
This method is safe for concurrent access by multiple threads.

getIOThreadCount

int getIOThreadCount()
Get the number of I/O threads to start in the daemon.

Returns:
Returns the daemon I/O thread count.

This method returns the number of I/O threads to start in the daemon.

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

setIOThreadCPUAffinityMask

void setIOThreadCPUAffinityMask(int threadId,
                                long mask)
Set the CPU affinity mask for an IO thread..

Parameters:
threadId - The IO thread id - 0 <= id < ioThreadCount
mask - The affinity mask to set.
Threading:
This method is safe for concurrent access by multiple threads.

getIOThreadCPUAffinityMask

long getIOThreadCPUAffinityMask(int threadId)
Get an IO thread's CPU affinity mask.

Parameters:
threadId - The IO thread id - 0 <= id < ioThreadCount
Threading:
This method is safe for concurrent access by multiple threads.

getIOThreadCPUAffinityMasks

long[] getIOThreadCPUAffinityMasks()
Get the set of IO thread's CPU affinity mask.

Returns:
Returns the array of CPU affinities. The length of the returned array is equal to the number of IO threads configured in the system.
Threading:
This method is safe for concurrent access by multiple threads.

setMaxOnDemandThreadCount

void setMaxOnDemandThreadCount(int count)
Set the maximum number of on-demand threads that can be created in the daemon.

Parameters:
count - The max number of on-demand threads that can be created.
Threading:
This method is safe for concurrent access by multiple threads.

getMaxOnDemandThreadCount

int getMaxOnDemandThreadCount()
Get the maximum number of on-demand threads that can be created in the daemon.

Returns:
Returns the maxmimum on-demand thread count.

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.

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

setMemoryReservePct

void setMemoryReservePct(int pct)
Set the amount of total memory to reserve for OOM handling.

Parameters:
pct - Percentage of total memory to reserve
Threading:
This method is safe for concurrent access by multiple threads.

getMemoryReservePct

int getMemoryReservePct()
Get the amount of total memory reserved for OOM handling.

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


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