|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.slamd.db.SLAMDDB
This class provides the main interface to the SLAMD database used for storing user accounts, configuration information, and job data.
| Constructor Summary | |
SLAMDDB(java.lang.String dbDirectory,
boolean readOnly,
boolean createIfNecessary)
Initializes the SLAMD database and opens the environment, creating a new one if necessary. |
|
| Method Summary | |
void |
closeDatabases(boolean abortTransactions)
Closes all databases in the environment. |
void |
closeEnvironment()
Closes the database environment. |
java.lang.String |
getConfigParameter(java.lang.String parameterName)
Retrieves the value of the specified configuration parameter from the configuration database. |
boolean |
getConfigParameter(java.lang.String parameterName,
boolean defaultValue)
Retrieves the value of the specified configuration parameter from the configuration database. |
int |
getConfigParameter(java.lang.String parameterName,
int defaultValue)
Retrieves the value of the specified configuration parameter from the configuration database. |
java.lang.String |
getConfigParameter(java.lang.String parameterName,
java.lang.String defaultValue)
Retrieves the value of the specified configuration parameter from the configuration database. |
JobFolder |
getFolder(java.lang.String folderName)
Retrieves the specified folder from the configuration database. |
JobFolder[] |
getFolders()
Retrieves a list of all job folders defined in the configuration database. |
Job |
getJob(SLAMDServer slamdServer,
java.lang.String jobID)
Retrieves the specified job from the configuration database. |
Job[] |
getJobs(SLAMDServer slamdServer,
java.lang.String folderName)
Retrieves the set of jobs contained in the specified folder of the configuration database. |
OptimizingJob |
getOptimizingJob(SLAMDServer slamdServer,
java.lang.String optimizingJobID)
Retrieves the specified optimizing job from the configuration database. |
OptimizingJob[] |
getOptimizingJobs(SLAMDServer slamdServer,
java.lang.String folderName)
Retrieves the set of optimizing jobs contained in the specified folder of the configuration database. |
Job |
getSummaryJob(SLAMDServer slamdServer,
java.lang.String jobID)
Retrieves summary information for the specified job from the configuration database. |
Job[] |
getSummaryJobs(SLAMDServer slamdServer,
java.lang.String folderName)
Retrieves summary information for the set of jobs contained in the specified folder of the configuration database. |
OptimizingJob |
getSummaryOptimizingJob(SLAMDServer slamdServer,
java.lang.String optimizingJobID)
Retrieves summary information for the specified optimizing job from the configuration database. |
OptimizingJob[] |
getSummaryOptimizingJobs(SLAMDServer slamdServer,
java.lang.String folderName)
Retrieves summary information for the set of optimizing jobs contained in the specified folder of the configuration database. |
UploadedFile |
getUploadedFile(java.lang.String folderName,
java.lang.String fileName)
Retrieves the specified uploaded file from the configuration database. |
UploadedFile[] |
getUploadedFiles(java.lang.String folderName)
Retrieves the set of uploaded files associated with the specified folder. |
UploadedFile |
getUploadedFileWithoutData(java.lang.String folderName,
java.lang.String fileName)
Retrieves the specified uploaded file from the configuration database. |
void |
moveJob(SLAMDServer slamdServer,
java.lang.String jobID,
java.lang.String folderName)
Moves the specified job from its current folder to the new folder. |
void |
moveOptimizingJob(SLAMDServer slamdServer,
java.lang.String optimizingJobID,
java.lang.String folderName)
Moves the specified optimizing job from its current folder to the new folder. |
void |
openDatabases(boolean createIfNecessary)
Opens all the databases used in the SLAMD database environment. |
void |
putConfigParameter(java.lang.String parameterName,
boolean parameterValue)
Sets the value of the specified parameter in the configuration database. |
void |
putConfigParameter(java.lang.String parameterName,
int parameterValue)
Sets the value of the specified parameter in the configuration database. |
void |
putConfigParameter(java.lang.String parameterName,
java.lang.String parameterValue)
Sets the value of the specified parameter in the configuration database. |
void |
removeConfigParameter(java.lang.String parameterName)
Removes information about the specified parameter from the configuration database. |
void |
removeFolder(java.lang.String folderName)
Removes information about the specified job folder from the configuration database. |
void |
removeJob(SLAMDServer slamdServer,
java.lang.String jobID)
Removes information about the specified job from the configuration database. |
void |
removeOptimizingJob(SLAMDServer slamdServer,
java.lang.String optimizingJobID)
Removes information about the specified optimizing job from the configuration database. |
void |
removeUploadedFile(java.lang.String folderName,
java.lang.String fileName)
Removes information about the specified uploaded file from the configuration database. |
void |
writeFolder(JobFolder jobFolder)
Writes information about the provided job folder into the configuration database. |
void |
writeJob(SLAMDServer slamdServer,
Job job)
Writes information about the provided job into the configuration database. |
void |
writeOptimizingJob(SLAMDServer slamdServer,
OptimizingJob optimizingJob)
Writes information about the provided optimizing job into the configuration database. |
void |
writeUploadedFile(UploadedFile uploadedFile,
java.lang.String folderName)
Writes information about the provided uploaded file into the configuration database. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SLAMDDB(java.lang.String dbDirectory,
boolean readOnly,
boolean createIfNecessary)
throws com.sleepycat.je.DatabaseException
dbDirectory - The path to the directory in which the database
files should be held.readOnly - Indicates whether the database should be opened
in read-only mode.createIfNecessary - Indicates whether a new database environment
should be created if one does not already
exist.
com.sleepycat.je.DatabaseException - If a problem occurs while initializing the
database environment.| Method Detail |
public void openDatabases(boolean createIfNecessary)
throws com.sleepycat.je.DatabaseException
createIfNecessary - Indicates whether any database(s) that do not
exist should be created.
com.sleepycat.je.DatabaseException
public void closeDatabases(boolean abortTransactions)
throws com.sleepycat.je.DatabaseException
abortTransactions - Indicates whether any transactions in progress
should be aborted. If not and there are active
transactions, then this method will fail.
com.sleepycat.je.DatabaseException - If there are active transactions and this
method is configured to not abort them.
public void closeEnvironment()
throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException - If the databases are still open.
public java.lang.String getConfigParameter(java.lang.String parameterName)
throws com.sleepycat.je.DatabaseException
parameterName - The name of the configuration parameter to
retrieve.
null if there is no such parameter.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
database.
public java.lang.String getConfigParameter(java.lang.String parameterName,
java.lang.String defaultValue)
throws com.sleepycat.je.DatabaseException
parameterName - The name of the configuration parameter to
retrieve.defaultValue - The value to use for the parameter if the specified
key is not present in the database.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
database.
public boolean getConfigParameter(java.lang.String parameterName,
boolean defaultValue)
throws com.sleepycat.je.DatabaseException
parameterName - The name of the configuration parameter to
retrieve.defaultValue - The value to use for the parameter if the specified
key is not present in the database.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
database.
public int getConfigParameter(java.lang.String parameterName,
int defaultValue)
throws com.sleepycat.je.DatabaseException
parameterName - The name of the configuration parameter to
retrieve.defaultValue - The value to use for the parameter if the specified
key is not present in the database.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
database.
public void putConfigParameter(java.lang.String parameterName,
java.lang.String parameterValue)
throws com.sleepycat.je.DatabaseException
parameterName - The name of the parameter to set.parameterValue - The value to use for the configuration parameter.
com.sleepycat.je.DatabaseException - If a problem occurs while attempting to store
the configuration parameter.
public void putConfigParameter(java.lang.String parameterName,
boolean parameterValue)
throws com.sleepycat.je.DatabaseException
parameterName - The name of the parameter to set.parameterValue - The value to use for the configuration parameter.
com.sleepycat.je.DatabaseException - If a problem occurs while attempting to store
the configuration parameter.
public void putConfigParameter(java.lang.String parameterName,
int parameterValue)
throws com.sleepycat.je.DatabaseException
parameterName - The name of the parameter to set.parameterValue - The value to use for the configuration parameter.
com.sleepycat.je.DatabaseException - If a problem occurs while attempting to store
the configuration parameter.
public void removeConfigParameter(java.lang.String parameterName)
throws com.sleepycat.je.DatabaseException
parameterName - The name of the configuration parameter to remove
from the configuration database.
com.sleepycat.je.DatabaseException - If problem occurs while interacting with the
configuration database.
public JobFolder getFolder(java.lang.String folderName)
throws com.sleepycat.je.DatabaseException,
DecodeException
folderName - The name of the folder to retrieve.
null if no such folder
exists.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
DecodeException - If a problem occurs while trying to decode the
folder from the configuration database.
public JobFolder[] getFolders()
throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
public void writeFolder(JobFolder jobFolder)
throws com.sleepycat.je.DatabaseException
jobFolder - The folder to write to the configuration database.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
public void removeFolder(java.lang.String folderName)
throws com.sleepycat.je.DatabaseException
folderName - The name of the job folder to remove from the
configuration database.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
public Job getJob(SLAMDServer slamdServer,
java.lang.String jobID)
throws com.sleepycat.je.DatabaseException,
DecodeException
slamdServer - The SLAMD server with which the job is associated.jobID - The job ID of the job to retrieve from the database.
null if no such job exists.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
DecodeException - If a problem occurs while decoding the job
information.
public Job getSummaryJob(SLAMDServer slamdServer,
java.lang.String jobID)
throws com.sleepycat.je.DatabaseException,
DecodeException
slamdServer - The SLAMD server with which the job is associated.jobID - The job ID of the job to retrieve from the database.
null if no such job exists.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
DecodeException - If a problem occurs while decoding the job
information.
public Job[] getJobs(SLAMDServer slamdServer,
java.lang.String folderName)
throws com.sleepycat.je.DatabaseException,
DecodeException
slamdServer - The SLAMD server with which the jobs are associated.folderName - The name of the folder for which to retrieve the
associated jobs.
null if there is no such
folder.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
DecodeException - If a problem occurs while attempting to decode
the specified folder.
public Job[] getSummaryJobs(SLAMDServer slamdServer,
java.lang.String folderName)
throws com.sleepycat.je.DatabaseException,
DecodeException
slamdServer - The SLAMD server with which the jobs are associated.folderName - The name of the folder for which to retrieve the
associated jobs.
null if there is no such folder.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
DecodeException - If a problem occurs while attempting to decode
the specified folder.
public void writeJob(SLAMDServer slamdServer,
Job job)
throws com.sleepycat.je.DatabaseException
slamdServer - The SLAMD server with which the job is associated.job - The job to write to the database.
com.sleepycat.je.DatabaseException - If a problem occurs while attempting to write
the job information.
public void removeJob(SLAMDServer slamdServer,
java.lang.String jobID)
throws com.sleepycat.je.DatabaseException
slamdServer - The SLAMD server with which the job is associated.jobID - The job ID of the job to remove from the configuration
database.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
public void moveJob(SLAMDServer slamdServer,
java.lang.String jobID,
java.lang.String folderName)
throws com.sleepycat.je.DatabaseException
slamdServer - The SLAMD server with which the job is assocaited.jobID - The job ID of the job to move.folderName - The name of the new folder in which to place the job.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
public OptimizingJob getOptimizingJob(SLAMDServer slamdServer,
java.lang.String optimizingJobID)
throws com.sleepycat.je.DatabaseException,
DecodeException
slamdServer - The SLAMD server with which the optimizing job is
associated.optimizingJobID - The ID of the optimizing job to retrieve from the
database.
null if no such job exists.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
DecodeException - If a problem occurs while decoding the optimizing
job information.
public OptimizingJob getSummaryOptimizingJob(SLAMDServer slamdServer,
java.lang.String optimizingJobID)
throws com.sleepycat.je.DatabaseException,
DecodeException
slamdServer - The SLAMD server with which the optimizing job is
associated.optimizingJobID - The ID of the optimizing job to retrieve from the
database.
null if no such job
exists.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
DecodeException - If a problem occurs while decoding the optimizing
job information.
public OptimizingJob[] getOptimizingJobs(SLAMDServer slamdServer,
java.lang.String folderName)
throws com.sleepycat.je.DatabaseException,
DecodeException
slamdServer - The SLAMD server with which the optimizing jobs are
associated.folderName - The name of the folder for which to retrieve the
associated optimizing jobs.
null if there is no
such folder.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
DecodeException - If a problem occurs while attempting to decode
the specified folder.
public OptimizingJob[] getSummaryOptimizingJobs(SLAMDServer slamdServer,
java.lang.String folderName)
throws com.sleepycat.je.DatabaseException,
DecodeException
slamdServer - The SLAMD server with which the optimizing jobs are
associated.folderName - The name of the folder for which to retrieve the
associated optimizing jobs.
null if there is no such folder.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
DecodeException - If a problem occurs while attempting to decode
the specified folder.
public void writeOptimizingJob(SLAMDServer slamdServer,
OptimizingJob optimizingJob)
throws com.sleepycat.je.DatabaseException
slamdServer - The SLAMD server with which the optimizing job is
associated.optimizingJob - The optimizing job to write to the database.
com.sleepycat.je.DatabaseException - If a problem occurs while attempting to write
the optimizing job information.
public void removeOptimizingJob(SLAMDServer slamdServer,
java.lang.String optimizingJobID)
throws com.sleepycat.je.DatabaseException
slamdServer - The SLAMD server with which the job is associated.optimizingJobID - The ID of the optimizing job to remove from the
configuration database.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
public void moveOptimizingJob(SLAMDServer slamdServer,
java.lang.String optimizingJobID,
java.lang.String folderName)
throws com.sleepycat.je.DatabaseException
slamdServer - The SLAMD server with which the optimizing job is
assocaited.optimizingJobID - The job ID of the job to move.folderName - The name of the new folder in which to place the
optimizing job.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
public UploadedFile getUploadedFile(java.lang.String folderName,
java.lang.String fileName)
throws com.sleepycat.je.DatabaseException,
DecodeException
folderName - The name of the folder in which the speified file is
located.fileName - The name of the uploaded file to retrieve.
null if no such file
exists.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
DecodeException - If the uploaded file cannot be decoded for some
reason.
public UploadedFile getUploadedFileWithoutData(java.lang.String folderName,
java.lang.String fileName)
throws com.sleepycat.je.DatabaseException,
DecodeException
folderName - The name of the folder in which the speified file is
located.fileName - The name of the uploaded file to retrieve.
null if no such file
exists.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
DecodeException - If the uploaded file cannot be decoded for some
reason.
public UploadedFile[] getUploadedFiles(java.lang.String folderName)
throws com.sleepycat.je.DatabaseException
folderName - The name of the folder for which to retrieve the
uploaded files.
null if there is no such folder.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
public void writeUploadedFile(UploadedFile uploadedFile,
java.lang.String folderName)
throws com.sleepycat.je.DatabaseException
uploadedFile - The uploaded file to be written to the configuration
database.folderName - The name of the folder in which the speicified file
should be placed.
com.sleepycat.je.DatabaseException - If a problem occurs while writing information
about the specified file to the configuration
database.
public void removeUploadedFile(java.lang.String folderName,
java.lang.String fileName)
throws com.sleepycat.je.DatabaseException
folderName - The name of the folder from which to remove the file.fileName - The name of the uploaded file to remove.
com.sleepycat.je.DatabaseException - If a problem occurs while interacting with the
configuration database.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||