Re: JournalDiskSyncStrategy?
Klaus Wuestefeld <[email protected]> Sun, 10 Aug 2014 10:49:53 -0300
| Newsgroups | gmane.comp.java.prevayler |
|---|---|
| Message-ID | <CAMAooZGXt-BS=-EiiiV7eMvrKAZe45Gi-9wrVJGnGLjUeR+K-g@mail.gmail.com> |
Maybe some design without the temporal coupling? On Aug 9, 2014 1:54 AM, "Karl Wettin" <[email protected]> wrote: > 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 > ------------------------------------------------------------------------------ _______________________________________________ To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion _______________________________________________ "Databases in Memoriam" -- http://www.prevayler.org