com.dvt.app.threadworks
Class DefaultTaskManagerEnvironment

java.lang.Object
  |
  +--com.dvt.app.threadworks.DefaultTaskManagerEnvironment
All Implemented Interfaces:
TaskManagerEnvironment

public class DefaultTaskManagerEnvironment
extends java.lang.Object
implements TaskManagerEnvironment

Represents a default environment for a TaskManager.

Copyright: Delta Vortex Technologies, 2001.


Field Summary
static int DEFAULT_DIAGNOSTIC_REPORTING_INTERVAL
          Default interval for reporting diagnostics in milliseconds.
static java.lang.String DEFAULT_LOG_LABEL
          Default log label
static int DEFAULT_MAX_CONCURRENT_TASKS
          Default maximum number of concurrent tasks.
static int DEFAULT_MAX_TASK_TIME_ALLOWED
          Default maximum time allowed on 1 task in milliseconds.
static java.lang.String DEFAULT_PROP_FILE_NAME
          Default properties file name
 
Constructor Summary
DefaultTaskManagerEnvironment()
           
DefaultTaskManagerEnvironment(Logger log, int maxNbrConcurrentTasks, int threadPriority, long maxTaskTimeAllowedInMillis, long diagnosticReportingIntervalInMillis, java.lang.String logLabel)
           
DefaultTaskManagerEnvironment(java.lang.String propertiesFileName)
           
 
Method Summary
 long getDiagnosticReportingIntervalInMillis()
          Describes how often diagnostic information is logged.
 Logger getLogger()
          Provides logger for diagnostic info and error reporting.
 java.lang.String getLogLabel()
          Label for Task Manager in Logs.
 int getMaxNbrConcurrentTasks()
          Describes the maximum number of tasks that can be run at one time.
 long getTaskTimeAllowedInMillis()
          Describes how long a task is allowed to run before being terminated.
 int getThreadPriority()
          Thread priority used for running tasks.
 void setDiagnosticReportingIntervalInMillis(long diagnosticReportIntervalInMillis)
          Sets how often diagnostic information is logged.
 void setLogger(Logger l)
          Sets logger for diagnostic info and error reporting.
 void setLogLabel(java.lang.String label)
          Label for Task Manager in Logs.
 void setMaxNbrConcurrentTasks(int maxNbrConcurrentTasks)
          Sets the maximum number of tasks that can be run at one time.
 void setTaskTimeAllowedInMillis(long timeAllowedInMillis)
          Sets how long a task is allowed to run before being terminated.
 void setThreadPriority(int priority)
          Thread priority used for running tasks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PROP_FILE_NAME

public static final java.lang.String DEFAULT_PROP_FILE_NAME
Default properties file name

DEFAULT_MAX_CONCURRENT_TASKS

public static final int DEFAULT_MAX_CONCURRENT_TASKS
Default maximum number of concurrent tasks.

DEFAULT_DIAGNOSTIC_REPORTING_INTERVAL

public static final int DEFAULT_DIAGNOSTIC_REPORTING_INTERVAL
Default interval for reporting diagnostics in milliseconds.

DEFAULT_MAX_TASK_TIME_ALLOWED

public static final int DEFAULT_MAX_TASK_TIME_ALLOWED
Default maximum time allowed on 1 task in milliseconds.

DEFAULT_LOG_LABEL

public static final java.lang.String DEFAULT_LOG_LABEL
Default log label
Constructor Detail

DefaultTaskManagerEnvironment

public DefaultTaskManagerEnvironment()

DefaultTaskManagerEnvironment

public DefaultTaskManagerEnvironment(java.lang.String propertiesFileName)
                              throws java.io.IOException

DefaultTaskManagerEnvironment

public DefaultTaskManagerEnvironment(Logger log,
                                     int maxNbrConcurrentTasks,
                                     int threadPriority,
                                     long maxTaskTimeAllowedInMillis,
                                     long diagnosticReportingIntervalInMillis,
                                     java.lang.String logLabel)
Method Detail

getLogger

public Logger getLogger()
Provides logger for diagnostic info and error reporting.
Specified by:
getLogger in interface TaskManagerEnvironment

setLogger

public void setLogger(Logger l)
Sets logger for diagnostic info and error reporting.

getMaxNbrConcurrentTasks

public int getMaxNbrConcurrentTasks()
Describes the maximum number of tasks that can be run at one time.
Specified by:
getMaxNbrConcurrentTasks in interface TaskManagerEnvironment

setMaxNbrConcurrentTasks

public void setMaxNbrConcurrentTasks(int maxNbrConcurrentTasks)
Sets the maximum number of tasks that can be run at one time.

getTaskTimeAllowedInMillis

public long getTaskTimeAllowedInMillis()
Describes how long a task is allowed to run before being terminated.
Specified by:
getTaskTimeAllowedInMillis in interface TaskManagerEnvironment

setTaskTimeAllowedInMillis

public void setTaskTimeAllowedInMillis(long timeAllowedInMillis)
Sets how long a task is allowed to run before being terminated.

getDiagnosticReportingIntervalInMillis

public long getDiagnosticReportingIntervalInMillis()
Describes how often diagnostic information is logged.
Specified by:
getDiagnosticReportingIntervalInMillis in interface TaskManagerEnvironment

setDiagnosticReportingIntervalInMillis

public void setDiagnosticReportingIntervalInMillis(long diagnosticReportIntervalInMillis)
Sets how often diagnostic information is logged.

getThreadPriority

public int getThreadPriority()
Thread priority used for running tasks.
Specified by:
getThreadPriority in interface TaskManagerEnvironment

setThreadPriority

public void setThreadPriority(int priority)
Thread priority used for running tasks.

getLogLabel

public java.lang.String getLogLabel()
Label for Task Manager in Logs.
Specified by:
getLogLabel in interface TaskManagerEnvironment

setLogLabel

public void setLogLabel(java.lang.String label)
Label for Task Manager in Logs.


Copyright © 2001 Delta Vortex Technologies, Inc. All Rights Reserved.