JournalDiskSyncStrategy?
Karl Wettin <[email protected]> Sat, 9 Aug 2014 06:31:52 +0200
| Newsgroups | gmane.comp.java.prevayler |
|---|---|
| Message-ID | <[email protected]> |
Wouldn't it be nice if it was possible to expose journal FD-sync as a public method somewhere in case of prevaylerFactory.configureJournalDiskSync(false)?
How about something like this:
+public interface JournalDiskSyncStrategy {
+ boolean isSyncOnNextExecuteTransaction();
+}
public class PrevaylerFactory<P>{
261:
- public void configureJournalDiskSync(boolean journalDiskSync) {
+ public void configureJournalDiskSync(JournalDiskSyncStrategy journalDiskSync) {
public class DurableOutputStream {
- public DurableOutputStream(File file, boolean journalDiskSync) throws IOException {
+ public DurableOutputStream(File file, JournalDiskSyncStrategy journalDiskSync) throws IOException {
152:
- if (_journalDiskSync) {
+ if (_ journalDiskSync.isSyncOnNextExecuteTransaction()) {
_fileDescriptor.sync();
}
karl
------------------------------------------------------------------------------
_______________________________________________
To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion
_______________________________________________
"Databases in Memoriam" -- http://www.prevayler.org