func (pw *pageWriter) SaveAll(ents []*core.LogEntry, state *core.PersistentState) error {
	if len(ents) > 0 {
		for _, ent := range ents {
			if err := pw.SaveLogEntry(ent); err != nil {
				return err
			}
		}
	}
	if err := pw.SaveState(state); err != nil {
		return err
	}
	return pw.sync()
}
// SaveAll persist all stuff to disk
SaveAll persist all stuff to disk
// SaveAll persist all stuff to disk
func (pw *pageWriter) SaveAll(ents []*core.LogEntry, state *core.PersistentState) error {
	if len(ents) > 0 {
		for _, ent := range ents {
			if err := pw.SaveLogEntry(ent); err != nil {
				return err
			}
		}
	}
	if err := pw.SaveState(state); err != nil {
		return err
	}
	return pw.sync()
}
func ( pw * pageWriter ) SaveAll ( ents [ ] * core . LogEntry , state * core . PersistentState ) error { if len ( ents ) > 0 { for _ , ent := range ents { if err := pw . SaveLogEntry ( ent ) ; err != nil { return err } } } if err := pw . SaveState ( state ) ; err != nil { return err } return pw . sync ( ) }
SaveAll persist all stuff to disk
SaveAll persist all stuff to disk