void commit(){
  if (_mods.isEmpty() && _dirtyList.isEmpty()) {
    return;
  }
  UpdateRequest update=_dao.prepareUpdate(_name);
  List<UUID> uuidsToRecycle=Lists.newArrayList();
  for (  SegmentMod mod : _mods) {
    mod.persist(update);
  }
  for (  Runnable extra : _extras) {
    extra.run();
  }
  for (  Segment seg : _dirtyList) {
    persist(seg,update,uuidsToRecycle);
  }
  checkWritesAllowed();
  update.execute();
  _uuidsToRecycle.addAll(uuidsToRecycle);
  _dirtyList.clear();
  _mods.clear();
}

void commit ( ) { if ( _mods . isEmpty ( ) && _dirtyList . isEmpty ( ) ) { return ; } UpdateRequest update = _dao . prepareUpdate ( _name ) ; List < UUID > uuidsToRecycle = Lists . newArrayList ( ) ; for ( SegmentMod mod : _mods ) { mod . persist ( update ) ; } for ( Runnable extra : _extras ) { extra . run ( ) ; } for ( Segment seg : _dirtyList ) { persist ( seg , update , uuidsToRecycle ) ; } checkWritesAllowed ( ) ; update . execute ( ) ; _uuidsToRecycle . addAll ( uuidsToRecycle ) ; _dirtyList . clear ( ) ; _mods . clear ( ) ; }
write changes to disk .
