package journal.reader; import java.util.Date; public class TransactionJournalEntry extends JournalEntry { private int pid; private Date timestamp; public TransactionJournalEntry(Token startToken, Token pidToken, Token timestampToken) { super(startToken); pid = Integer.parseInt(pidToken.getValue()); long value = Long.parseLong(timestampToken.getValue()) * 1000; timestamp = new Date(value); } public String toString() { StringBuffer buf = new StringBuffer(actionType.toString()); buf.append(" "); buf.append(pid); buf.append(" "); buf.append(timestamp); return buf.toString(); } public boolean equals(Object to) { if (!to.getClass().equals(getClass())) { return false; } TransactionJournalEntry toEntry = (TransactionJournalEntry) to; return (actionType.equals(toEntry.actionType)); } @Override public String toJournalString() { StringBuffer buf = new StringBuffer(super.toJournalString()); buf.append(" "); buf.append(pid); buf.append(" "); buf.append(timestamp.getTime()/1000); return buf.toString(); } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 24773 | Norman Morse |
Moving journalReader from sven's private branch to perforce_software. This is because journalReader is used in the perfsplit test harness, and should be updated over time. Merging //guest/sven_erik_knop/java/JournalReader/... to //guest/perforce_software/journalReader/... |
||
//guest/sven_erik_knop/java/JournalReader/src/journal/reader/TransactionJournalEntry.java | |||||
#1 | 7589 | Sven Erik Knop | Rescue attempt to recover missing files from the JournalReader | ||
//guest/sven_erik_knop/JournalReader/src/journal/reader/TransactionJournalEntry.java | |||||
#2 | 7375 | Sven Erik Knop |
Major update of the JournalReader. Complete rewrite of the command line parsing Change in the options parsing within the journal reader New SQLLoader action. Currently only against MySQL (needs MySQL JDBC driver) with fixed database and user name. This will be replaced by a config file at some stage. |
||
#1 | 7374 | Sven Erik Knop | Rename/move file(s) - correct location for Eclipse project | ||
//guest/sven_erik_knop/JournalReader/journal/reader/TransactionJournalEntry.java | |||||
#1 | 6467 | Sven Erik Knop |
Added JournalReader, a Java library of useful tools to read and process checkpoints and journals. Added are a readme.txt to explain some details, and a jar file that contains the compiled class files. The programs will need Java 1.6 to run. |