|
Prevayler™
The Free Software Prevalence Layer |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.prevayler.implementation.logging.PersistentLogger
A TransactionLogger that will write all transactions to .transactionLog files.
Constructor Summary | |
PersistentLogger(java.lang.String directory,
long logSizeThresholdInBytes,
long logAgeThresholdInMillis)
|
Method Summary | |
boolean |
accept(java.io.File file)
Implementing FileFilter. 0000000000000000000.transactionLog is the format of the transaction log filename. |
void |
close()
|
protected void |
handleExceptionWhileCreating(java.io.IOException iox,
java.io.File logFile)
|
protected void |
handleExceptionWhileWriting(java.io.IOException iox,
java.io.File logFile)
|
void |
log(Transaction transaction,
java.util.Date executionTime,
org.prevayler.foundation.Turn myTurn)
|
void |
update(TransactionSubscriber subscriber,
long initialTransactionWanted)
IMPORTANT: This method cannot be called while the log() method is being called in another thread. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PersistentLogger(java.lang.String directory, long logSizeThresholdInBytes, long logAgeThresholdInMillis) throws java.io.IOException
directory
- Where transactionLog files will be read and written.logSizeThresholdInBytes
- Size of the current transactionLog file beyond which it is closed and a new one started. Zero indicates no size threshold. This is useful transactionLog backup purposes.logAgeThresholdInMillis
- Age of the current transactionLog file beyond which it is closed and a new one started. Zero indicates no age threshold. This is useful transactionLog backup purposes.Method Detail |
public void log(Transaction transaction, java.util.Date executionTime, org.prevayler.foundation.Turn myTurn)
log
in interface TransactionLogger
public void update(TransactionSubscriber subscriber, long initialTransactionWanted) throws java.io.IOException, java.lang.ClassNotFoundException
update
in interface TransactionLogger
java.io.IOException
java.lang.ClassNotFoundException
public boolean accept(java.io.File file)
accept
in interface java.io.FileFilter
protected void handleExceptionWhileCreating(java.io.IOException iox, java.io.File logFile)
protected void handleExceptionWhileWriting(java.io.IOException iox, java.io.File logFile)
public void close() throws java.io.IOException
close
in interface TransactionLogger
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |