Re: JournalDiskSyncStrategy?
Klaus Wuestefeld <[email protected]> Mon, 11 Aug 2014 13:27:35 -0300
| Newsgroups | gmane.comp.java.prevayler |
|---|---|
| Message-ID | <CAMAooZEfraw2qVhKsGRqmjUGu6OGPe_5prDZwNDVYkR28pPSPQ@mail.gmail.com> |
Karl, do you have a specific need for this currently? Could you describe your use case? On Sun, Aug 10, 2014 at 3:55 PM, Karl Wettin <[email protected]> wrote: > It's simply the least invasive solution I could come up with as the > FileDescriptor is rather protected in DurableOutputStream. Would you prefer > JournalDiskSyncStrategy#sync() as a compliment to below or as the only > method? > > On 10 Aug 2014, at 15:49, Klaus Wuestefeld <[email protected]> wrote: > > 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 > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > To unsubscribe go to the end of this page: > http://lists.sourceforge.net/lists/listinfo/prevayler-discussion > _______________________________________________ > "Databases in Memoriam" -- http://www.prevayler.org > -- Valeu, Klaus. ------------------------------------------------------------------------------ _______________________________________________ To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion _______________________________________________ "Databases in Memoriam" -- http://www.prevayler.org