|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
com.sun.slamd.job.JobClass
com.sun.slamd.example.DSADMImportRateJobClass
public class DSADMImportRateJobClass
This class defines a SLAMD job that has the ability to perform a "dsadm import" operation in the Sun Java System Directory Server 6 and extract statistics from the progress of the import, including the total number of entries processed, the average and recent import rates, and the hit ratio.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static int |
READ_BUFFER_SIZE
The size to use for the read buffer. |
static java.lang.String |
STAT_TRACKER_AVERAGE_RATE
The display name of the stat tracker used to keep track of the average import rate. |
static java.lang.String |
STAT_TRACKER_ENTRIES_PROCESSED
The display name of the stat tracker used to keep track of the number of entries processed. |
static java.lang.String |
STAT_TRACKER_HIT_RATIO
The display name of the stat tracker used to keep track of the hit ratio. |
static java.lang.String |
STAT_TRACKER_RECENT_RATE
The display name of the stat tracker used to keep track of the recent import rate. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
DSADMImportRateJobClass()
The default constructor used to create a new instance of the job class. |
|
| Method Summary | |
|---|---|
java.lang.String |
getJobCategoryName()
Retrieves the name of the category in which this job class exists. |
java.lang.String |
getJobDescription()
Retrieves a description of the job performed by this job thread. |
java.lang.String |
getJobName()
Retrieves the name of the job performed by this job thread. |
ParameterList |
getParameterStubs()
Retrieve a parameter list that can be used to determine all of the customizable options that are available for this job. |
StatTracker[] |
getStatTrackers()
Retrieves the stat trackers that are maintained for this job thread. |
StatTracker[] |
getStatTrackerStubs(java.lang.String clientID,
java.lang.String threadID,
int collectionInterval)
Retrieves the set of stat trackers that will be maintained by this job class. |
void |
initializeClient(java.lang.String clientID,
ParameterList parameters)
Initializes all of the instance variables that correspond to job parameters. |
void |
initializeThread(java.lang.String clientID,
java.lang.String threadID,
int collectionInterval,
ParameterList parameters)
Initializes this job thread to be used to actually run the job on the client. |
int |
overrideNumClients()
Provides a means for job classes to have a level of control over the number of clients that will be used to run a job. |
int |
overrideThreadsPerClient()
Provides a means for job classes to have a level of control over the number of threads per client that will be used to run a job. |
void |
runJob()
Perform the work of this job thread by executing the specified command. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String STAT_TRACKER_AVERAGE_RATE
public static final java.lang.String STAT_TRACKER_RECENT_RATE
public static final java.lang.String STAT_TRACKER_ENTRIES_PROCESSED
public static final java.lang.String STAT_TRACKER_HIT_RATIO
public static final int READ_BUFFER_SIZE
| Constructor Detail |
|---|
public DSADMImportRateJobClass()
initialize
method.
| Method Detail |
|---|
public java.lang.String getJobName()
getJobName in class JobClasspublic java.lang.String getJobDescription()
getJobDescription in class JobClasspublic java.lang.String getJobCategoryName()
getJobCategoryName in class JobClasspublic int overrideNumClients()
overrideNumClients in class JobClasspublic int overrideThreadsPerClient()
overrideThreadsPerClient in class JobClasspublic ParameterList getParameterStubs()
getParameterStubs in class JobClass
public StatTracker[] getStatTrackerStubs(java.lang.String clientID,
java.lang.String threadID,
int collectionInterval)
getStatTrackerStubs in class JobClassclientID - The client ID that should be used for the
returned stat trackers.threadID - The thread ID that should be used for the
returned stat trackers.collectionInterval - The collection interval that should be used for
the returned stat trackers.
public StatTracker[] getStatTrackers()
getStatTrackers in class JobClass
public void initializeClient(java.lang.String clientID,
ParameterList parameters)
throws UnableToRunException
initializeClient in class JobClassclientID - The client ID for the current client.parameters - The set of parameters that have been defined for this
job.
UnableToRunException - If any part of the initialization fails.
public void initializeThread(java.lang.String clientID,
java.lang.String threadID,
int collectionInterval,
ParameterList parameters)
throws UnableToRunException
initializeThread in class JobClassclientID - The client ID for this job thread.threadID - The thread ID for this job thread.collectionInterval - The length of time in seconds to use as the
statistics collection interval.parameters - The set of parameters provided to this job that
can be used to customize its behavior.
UnableToRunException - If a problem occurs that prevents the thread
from being able to run properly.public void runJob()
runJob in class JobClass
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||