From: bruce m. <tr...@us...> - 2004-07-30 01:33:43
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/journal/simple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7955/modules/core/src/com/babeldoc/core/journal/simple Modified Files: SimpleJournal.java Log Message: javadoc and formatting here. Index: SimpleJournal.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/journal/simple/SimpleJournal.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** SimpleJournal.java 24 Jul 2004 00:18:50 -0000 1.12 --- SimpleJournal.java 30 Jul 2004 01:33:01 -0000 1.13 *************** *** 115,157 **** */ public class SimpleJournal extends Journal { ! /** constants: configuration name */ public static final String CONFIG_NAME = "journal/simple/config"; ! /** constants: journal directory */ public static final String JOURNAL_DIR = "simpleJournalDir"; ! /** constants: journal log file */ public static final String JOURNAL_LOGFILE = "simpleJournalLog"; ! /** constants: max log file before it is rolled */ public static final String JOURNAL_MAXSIZE = "logMaxSize"; ! /** constants: configuration name */ public static final String JOURNAL_DUMMY = "dummy"; ! /** constants: default max log size */ public static final int DEFAULT_LOGSIZE = 1024 * 1024; ! /** constants: configuration name */ public static final String NULL = "null"; ! /** Message for the log */ public static final String LOG_SEP = ","; public static final String EOL = System.getProperty("line.separator"); public static final String DELTA_SUFFIX = ".delta"; public static final String ATTR_SUFFIX = ".attr"; ! /** Configuration stuff */ private FileWriter logWriter; private CSVWriter logPrinter; private String logFile; private int logMaxSize; ! /** Locals */ private String trackerDir; private static long lastTicketVal; private IConfigInfo info; ! /** log setup */ private LogService log = LogService.getInstance(SimpleJournal.class.getName()); --- 115,165 ---- */ public class SimpleJournal extends Journal { ! /** constants: configuration name. */ public static final String CONFIG_NAME = "journal/simple/config"; ! /** constants: journal directory. */ public static final String JOURNAL_DIR = "simpleJournalDir"; ! /** constants: journal log file. */ public static final String JOURNAL_LOGFILE = "simpleJournalLog"; ! /** constants: max log file before it is rolled. */ public static final String JOURNAL_MAXSIZE = "logMaxSize"; ! /** constants: configuration name. */ public static final String JOURNAL_DUMMY = "dummy"; ! /** constants: default max log size. */ public static final int DEFAULT_LOGSIZE = 1024 * 1024; ! /** constants: configuration name. */ public static final String NULL = "null"; ! /** Column separator. */ public static final String LOG_SEP = ","; + /** line separator. */ public static final String EOL = System.getProperty("line.separator"); + /** delta file marker. */ public static final String DELTA_SUFFIX = ".delta"; + /** attribute file marker. */ public static final String ATTR_SUFFIX = ".attr"; ! /** file writer for logging. */ private FileWriter logWriter; + /** csv writer for logging (built from logWriter). */ private CSVWriter logPrinter; + /** name of the log file. */ private String logFile; + /** max size of the log file. */ private int logMaxSize; ! /** directory of the journal files. */ private String trackerDir; + /** the last ticket value. */ private static long lastTicketVal; + /** stored configuration information. */ private IConfigInfo info; ! /** log setup. */ private LogService log = LogService.getInstance(SimpleJournal.class.getName()); *************** *** 161,168 **** * * @param parent - * * @return array of child tickets. ! * ! * @throws JournalException DOCUMENT ME! */ public synchronized IJournalTicket[] getAllChildTickets(IJournalTicket parent) --- 169,174 ---- * * @param parent * @return array of child tickets. ! * @throws JournalException */ public synchronized IJournalTicket[] getAllChildTickets(IJournalTicket parent) *************** *** 194,201 **** * * @param ticket number - * * @return array of querytickets ! * ! * @throws JournalException DOCUMENT ME! */ public synchronized QueryTicket[] getAllTicketSteps(IJournalTicket ticket) --- 200,205 ---- * * @param ticket number * @return array of querytickets ! * @throws JournalException */ public synchronized QueryTicket[] getAllTicketSteps(IJournalTicket ticket) *************** *** 238,242 **** * @param step - the step to replay from * ! * @return * * @throws JournalException --- 242,246 ---- * @param step - the step to replay from * ! * @return pipeline document * * @throws JournalException *************** *** 286,293 **** * * @param ticketId the ticket identifier - * * @return IJournalTicket for this string ! * ! * @throws JournalException DOCUMENT ME! */ public synchronized IJournalTicket getTicket(String ticketId) --- 290,295 ---- * * @param ticketId the ticket identifier * @return IJournalTicket for this string ! * @throws JournalException */ public synchronized IJournalTicket getTicket(String ticketId) *************** *** 377,381 **** * Make a dummy ticket. * ! * @return * * @throws JournalException --- 379,383 ---- * Make a dummy ticket. * ! * @return dummy ticket * * @throws JournalException *************** *** 391,398 **** * * @param parentTicket the ticket to be forked - * * @return the forked child ticket ! * ! * @throws JournalException DOCUMENT ME! */ public synchronized IJournalTicket forkTicket(IJournalTicket parentTicket) --- 393,398 ---- * * @param parentTicket the ticket to be forked * @return the forked child ticket ! * @throws JournalException */ public synchronized IJournalTicket forkTicket(IJournalTicket parentTicket) *************** *** 421,426 **** * * @return the journal ticket ! * ! * @throws JournalException DOCUMENT ME! */ public synchronized IJournalTicket newTicket() throws JournalException { --- 421,425 ---- * * @return the journal ticket ! * @throws JournalException */ public synchronized IJournalTicket newTicket() throws JournalException { *************** *** 438,450 **** /** ! * Log string to the log file * ! * @param ticket ! * @param operation ! * @param other ! * @param stage ! * @param data * ! * @throws JournalException DOCUMENT ME! */ protected synchronized void log(IJournalTicket ticket, --- 437,449 ---- /** ! * Log string to the log file. * ! * @param ticket ticket to log ! * @param operation operation to log ! * @param other other data to log ! * @param stage stage name to log ! * @param data additional data to log * ! * @throws JournalException journal exception */ protected synchronized void log(IJournalTicket ticket, *************** *** 492,498 **** /** ! * Roll the log file if necessary * ! * @throws IOException DOCUMENT ME! */ protected void rollLogFile() throws IOException { --- 491,497 ---- /** ! * Roll the log file if necessary. * ! * @throws IOException exception */ protected void rollLogFile() throws IOException { *************** *** 512,519 **** /** ! * Make a file object for the ticket ! * ! * @param ticket * * @return the log director for the ticket */ --- 511,517 ---- /** ! * Make a file object for the ticket. * + * @param ticket ticket object. * @return the log director for the ticket */ *************** *** 545,549 **** /** ! * Make a file name for the attributes at the step * * @param ticket - the ticket file --- 543,547 ---- /** ! * Make a file name for the attributes at the step. * * @param ticket - the ticket file *************** *** 558,562 **** /** ! * Make a file name for the ticket at the step * * @param ticket - the ticket file --- 556,560 ---- /** ! * Make a file name for the ticket at the step. * * @param ticket - the ticket file *************** *** 591,602 **** /** ! * write a new logged operation ! * ! * @param ticket ! * @param data * * @return the ticket step ! * ! * @throws JournalException DOCUMENT ME! */ private int writeNewLoggedOperation(IJournalTicket ticket, Object data) --- 589,598 ---- /** ! * write a new logged operation. * + * @param ticket ticket to write + * @param data data to write * @return the ticket step ! * @throws JournalException */ private int writeNewLoggedOperation(IJournalTicket ticket, Object data) *************** *** 628,632 **** /** ! * Get the configuration iformation for this class * * @return IConfigInfo object --- 624,628 ---- /** ! * Get the configuration iformation for this class. * * @return IConfigInfo object *************** *** 677,683 **** /** ! * Setup the log printer * ! * @return */ protected CSVWriter getLogPrinter() { --- 673,679 ---- /** ! * Setup the log printer. * ! * @return printer object. */ protected CSVWriter getLogPrinter() { *************** *** 689,695 **** /** ! * Get the log writer * ! * @return */ protected FileWriter getLogWriter() { --- 685,691 ---- /** ! * Get the log writer. * ! * @return log writer */ protected FileWriter getLogWriter() { *************** *** 705,711 **** /** ! * Get the log file configuration * ! * @return */ protected String getLogFile() { --- 701,707 ---- /** ! * Get the log file configuration. * ! * @return log file name */ protected String getLogFile() { *************** *** 722,726 **** * Get the maximum size of the log file before it is rolled. * ! * @return */ protected int getLogMaxSize() { --- 718,722 ---- * Get the maximum size of the log file before it is rolled. * ! * @return max log size. */ protected int getLogMaxSize() { *************** *** 734,740 **** /** ! * Get the tracker dir * ! * @return */ protected String getTrackerDir() { --- 730,736 ---- /** ! * Get the tracker directory. * ! * @return tracker directory. */ protected String getTrackerDir() { *************** *** 751,754 **** --- 747,755 ---- } + /** + * get the last ticket value. + * + * @return last ticket value. + */ protected static long getLastTicketVal() { return lastTicketVal; |