|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--tppt.db.GlobalData
This class stores all the global variables, constants and methods that are needed for an experiment.
Field Summary | |
static java.lang.String |
accntName
The usre account. |
static java.lang.String |
accntPasswd
The user password. |
static java.util.Vector |
allParaFields
a Vector to store all the Parameter Names. |
static java.lang.String |
argDir
The path of argument files. |
static java.lang.String |
argFileExt
The extension of argument file. |
static java.util.Vector |
argumentFileNames
Deprecated. this variable is useless. |
static java.lang.String |
chosenDBMS
The chosen DBMS by user. |
static java.lang.String |
dbDriver
The jdbc driver string |
static java.lang.String |
dbInitFile
The path if user database initialization file. |
static java.util.Vector |
DBMS
For the multi-database support. |
static java.lang.String |
dbName
The name of DBMS |
static java.lang.String |
dbSchemaFile
The path of user database schema file. |
static java.util.HashMap |
dbSettingMap
Stored the DB setting reading from server.xml in the hastable. |
static java.lang.String |
dbURL
The jdbc url |
static java.util.Vector |
Deadlocknumoftrans
a array to store number of deadlocks for each transaction type |
static double |
DeadLockTime
the accumulated response time in of deadlock transactions. |
static int |
defaultIsoLevel
The defualt isolation level of all transactions, which is Connection.TRANSACTION_SERIALIZABLE. |
static int |
EachDeadLock
the counter of deadlocks for each transaction |
static int |
executeTime
The maximum time a experiemnt could last in seconds. |
static int |
expLengthLimit
the max execution time, which is 60 seconds. |
static javax.swing.JFileChooser |
globalFC
use a global filechooser to keep the current filepath need to find a better way to do this. |
static boolean |
isFromHome
Whether connected from home is checked. |
static boolean |
isMultiUserMode
This flag indeciate whether multi-user mode is provided. |
static double |
LogicFailTime
the accumulated response time in all logic fail transactions. |
static int |
maxrows
the number of max row per page |
static java.lang.String[] |
modes
The String array of the users modes. |
static java.lang.String |
MULIT_USER_MODE
|
static int |
MyFavoriteLineLength
default length limit for a line when displaying user query on the query result frame, see checkDBreportFrame.java |
static int |
NumOfDeadLock
The number of deadlock occurs in all transactions. |
static int |
NumOfLogicFail
The number of logic fails occurs in all transactions. |
static int |
numOfTerminals
The number of terminals user asks to run in a experiment. |
static java.lang.String |
protoFile
The path of prototype file. |
static java.lang.String |
proxy
Stored the proxy string |
static double |
responseTime
the total response time (in milliseconds ) of sucessful transactions in all the simulating terminals. |
static java.lang.String |
scriptDir
The path of script files. |
static java.lang.String |
scriptFileExt
The extension of script file. |
private static java.lang.String |
serverFileURL
Stored the url for the server.xml file. |
static java.lang.String |
serverNamesFile
The defination of name and jdbc url for multipal servers. |
static java.util.Vector |
sessKeys
a Vector to store the Session Keywords |
static java.lang.String |
SINGLE_USER_MODE
|
static java.lang.String |
singleAccntName
The user account for the single user mode. |
static java.lang.String |
singleAccntPasswd
The passward for the single user mode. |
static java.lang.String |
sourceDir
The path of source files. |
static java.lang.String |
sourceFileExt
The extension of the source files. |
static java.lang.String |
SyncSPFileName
The file coontains the stored procedure for synchronization |
static java.util.Vector |
termKeys
a Vectoe to store the Terminal Keywords |
static int |
thinkTime
The interval of each transaction in seconds. |
static java.util.Vector |
transactions
a Vector to store the Transactions . |
static java.lang.String |
transClassSuffix
The suffix of the transaction class -"Class" String. |
static int |
transCounter
the total number of sucessful transactions in all the simulating terminals. |
static long |
transEndTime
The most late transaction end time out of all transactions. |
static long |
transStartTime
The earliest transaction start time out of all transactions. |
static int |
TSLimit
Maximum execution Limit(in sec) an experiment could hold the lock of the Sync table in the sigle user mode. |
Constructor Summary | |
GlobalData()
|
Method Summary | |
static boolean |
argFilesExist()
Check whether the Argument Files Directory provided by user contains all the argument files needed. |
static void |
cleanRT()
Clean up performance measurement variables. |
static void |
clearInput()
The method will clear all the user input fields. |
static void |
discardAllData()
To discard all the user input data or system variables. |
static boolean |
enoughArgs()
Check if terminal keys' argument files have enough data for all terminals. |
private static void |
getElementValueByName(org.w3c.dom.Node parent,
int count)
Get the elemnt value by the name of element. |
static void |
main(java.lang.String[] arg)
|
private static void |
printGlobalData()
|
static boolean |
resourceFilesExist()
Checks whether all files or directories provided by user exist or not. |
static boolean |
scriptFilesExist()
Checks whether the Script Files Directory provided by user contains all the script files needed. |
static void |
serverFileParser()
This method is used to parse the server.xml file using the XML parser. |
static void |
setServerFilePath(java.lang.String uri)
Set up the file path for the server.xml file |
static void |
showError(java.lang.String msg)
Displays error messages in dialog box |
static void |
showInfo(java.lang.String msg)
Displays info messages in dialog box |
static boolean |
sourceFilesExist()
Check whether the Transaction Source File Directory provided by user contains all the transaction source files needed. |
static boolean |
transTableSetup()
Set up the transaction table and keywords by parsing the GlobalData.protoFile file. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static java.lang.String dbURL
public static java.lang.String dbDriver
public static java.lang.String dbName
public static final java.lang.String singleAccntName
public static final java.lang.String singleAccntPasswd
public static final java.lang.String SyncSPFileName
public static final java.lang.String serverNamesFile
public static final int MyFavoriteLineLength
public static boolean isMultiUserMode
public static java.lang.String accntName
public static java.lang.String accntPasswd
public static java.lang.String proxy
public static boolean isFromHome
public static java.lang.String dbSchemaFile
public static java.lang.String dbInitFile
public static int numOfTerminals
public static int thinkTime
public static int executeTime
public static int maxrows
public static java.lang.String protoFile
public static java.lang.String sourceDir
public static java.lang.String scriptDir
public static java.lang.String argDir
public static java.util.Vector sessKeys
public static java.util.Vector termKeys
public static java.util.Vector transactions
Transactions
.public static java.util.Vector allParaFields
public static java.util.Vector argumentFileNames
public static java.util.Vector Deadlocknumoftrans
public static double responseTime
public static int transCounter
public static long transStartTime
public static long transEndTime
public static int EachDeadLock
public static double DeadLockTime
public static double LogicFailTime
public static int NumOfDeadLock
public static int NumOfLogicFail
public static javax.swing.JFileChooser globalFC
.
public static final int expLengthLimit
public static final int TSLimit
public static final java.lang.String SINGLE_USER_MODE
public static final java.lang.String MULIT_USER_MODE
public static final java.lang.String[] modes
public static final java.util.Vector DBMS
public static java.util.HashMap dbSettingMap
public static java.lang.String chosenDBMS
public static final java.lang.String transClassSuffix
public static final java.lang.String sourceFileExt
public static final java.lang.String scriptFileExt
public static final java.lang.String argFileExt
public static final int defaultIsoLevel
private static java.lang.String serverFileURL
Constructor Detail |
public GlobalData()
Method Detail |
public static void showError(java.lang.String msg)
public static void showInfo(java.lang.String msg)
public static boolean resourceFilesExist()
public static boolean sourceFilesExist()
sourceFileExt
public static boolean scriptFilesExist()
"Terminal" + TerminalNumber + ".scp"For example, if user sets up 2 terminal are needed during the experiment, then Terminal1.scp , Terminal2.scp files must present in the Script Files Directory. Otherwise, the missing file error will be reported.
numOfTerminals
public static boolean argFilesExist()
int StudentLogin (Connection con, String sid, String spasswd );Then sid.scp and spasswd.scp should be present in the Argument Files Directory.
PrototypesAnaluzer.createTransactionTable
to initialize the allParaFields.public static boolean transTableSetup()
GlobalData.protoFile
file.PrototypesAnalyzer
public static boolean enoughArgs()
termKeys
,
numOfTerminals
public static void cleanRT()
public static void discardAllData()
DTFrame
duing the time
when a new experiment is created.private static void printGlobalData()
public static void clearInput()
public static void setServerFilePath(java.lang.String uri)
uri
- the url for server.xml filepublic static void serverFileParser()
getElementValueByName(org.w3c.dom.Node, int)
private static void getElementValueByName(org.w3c.dom.Node parent, int count)
DBSetting
object as the vaule.parent
- the parent node.count
- the counter to record the count of current DBMS.public static void main(java.lang.String[] arg)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |