|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--Pr_log
| Field Summary | |
protected java.lang.String |
hcg_logfile
|
protected static java.io.BufferedWriter |
hcg_logfileptr
|
protected Database |
theSchema
|
| Constructor Summary | |
Pr_log(Database newSchema)
Constructor |
|
| Method Summary | |
boolean |
log_do_add(java.lang.String line)
This method adds a record into a table in the database. |
boolean |
log_do_delete(java.lang.String pkey)
This method deletes a row in the table. |
void |
log_do_set_float(java.lang.String pkey,
java.lang.String fieldname,
float newVal)
This method sets a float field in any row of a table |
void |
log_do_set_int(java.lang.String pkey,
java.lang.String fieldname,
int newVal)
This method sets an integer field in any row of a table |
void |
log_do_set_str(java.lang.String pkey,
java.lang.String fieldname,
java.lang.String newVal)
This method sets a String field in any row of a table |
void |
log_sleep(long msecs)
This method pauses the execution of the program for the specified amount of time |
static void |
logstr(java.lang.String text)
This method writes the given string into the log file |
static void |
logwait()
This method computes the wait time between the log events, updates the wait time and posts the wait log entry to the log file |
boolean |
pr_replay(java.lang.String logfile,
int near_realtime,
int take_endsnapshot)
Function: pr_replay This method is used to replay a logsession based on a log file. |
boolean |
pr_startlog(java.lang.String file_name)
This method is used to start a logging session. |
boolean |
pr_stoplog(boolean dump_flag)
This method is used to stop a logging session. |
boolean |
replay_log(java.lang.String logfile,
int near_realtime)
This method is used to parse the logfile and execute the action of the log entry. |
static void |
time_initialize()
Sets the timestamp global with the current time and clear the time_flag |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static java.io.BufferedWriter hcg_logfileptr
protected java.lang.String hcg_logfile
protected Database theSchema
| Constructor Detail |
public Pr_log(Database newSchema)
| Method Detail |
public static void logstr(java.lang.String text)
text - - contains the string to be printed
to the log file.
This function writes the text string to the logfile
if logging is activepublic static void time_initialize()
public static void logwait()
public void log_sleep(long msecs)
msecs - - the time to sleep in millisecondspublic boolean pr_startlog(java.lang.String file_name)
public boolean pr_stoplog(boolean dump_flag)
public boolean log_do_add(java.lang.String line)
line - - A String which contains the data to be added to the table.
- It should be a space seperated string of field values.
Returns boolean - true if successful
false if unsuccessfulpublic boolean log_do_delete(java.lang.String pkey)
pkey - - the primary key of the row to be deleted
Returns boolean - true if successful
- False if unsuccessful
public void log_do_set_int(java.lang.String pkey,
java.lang.String fieldname,
int newVal)
pkey - - the Primary key of the row in which the field value is to be changedfieldname - - The name of the field whose value is to be changednewVal - - The new value to be changed to
public void log_do_set_float(java.lang.String pkey,
java.lang.String fieldname,
float newVal)
pkey - - the Primary key of the row in which the field value is to be changedfieldname - - The name of the field whose value is to be changednewVal - - The new value to be changed to
public void log_do_set_str(java.lang.String pkey,
java.lang.String fieldname,
java.lang.String newVal)
pkey - - the Primary key of the row in which the field value is to be changedfieldname - - The name of the field whose value is to be changednewVal - - The new value to be changed to
public boolean replay_log(java.lang.String logfile,
int near_realtime)
logfile - - logfile to replaynear_realtime - - flag indicates to
replay in near realtime
0 = not real time
1 = real time
Returns True if successful, false if any error
public boolean pr_replay(java.lang.String logfile,
int near_realtime,
int take_endsnapshot)
logfile - - the name of the logfile to replaynear_realtime - - a boolean flag indicating if
the replay should approx realtime
0 - no near_realtime playback
1 - playback in near-realtimetake_endsnapshot - - a boolean flag indicating if the
database should be dumped at the
end of the replay.
0 - do not take the end DB snapshot
1 - take the end DB snapshot
Return true if successful, false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||