Closes the previous epoch. Journal entries in a closed epoch will not
be replayed on a journal restore.
507149
public void checkpointEnd()
  {
    if (! _isWhileCheckpoint) {
      throw new IllegalStateException();
    }
    
    _isWhileCheckpoint = false;
    
    byte []headerBuffer = _headerBuffer;
    BitsUtil.writeInt16(headerBuffer, 0, CHECKPOINT_END);
    writeImpl(headerBuffer, 0, 2);
    
    flush();
    
    _lastCheckpointEnd = _index - _startAddress;
    
    writeTail(_os);
  }
1030345
public void close() {
	   entry.close();
	   getBlockCounter().clear();
	   getSkipTagCounter().clear();
	   getCache().resetOrganismCache();
	   getCache().resetReferenceCache();
	}
632364
@Override
    public void close()
    {
        try {
            flush();
            indexWriter.close();
        }
        catch (MutationsRejectedException e) {
            throw new PrestoException(UNEXPECTED_ACCUMULO_ERROR, "Mutation was rejected by server on close", e);
        }
    }
388079
def on_epoch_end(self, n_epochs:int, last_metrics:MetricsList, **kwargs)->bool:
        ""
        if last_metrics is not None and np.any(last_metrics):
            rec = self.learn.recorder
            iters = range_of(rec.losses)
            val_iter = np.array(rec.nb_batches).cumsum()
            x_bounds = (0, (n_epochs - len(rec.nb_batches)) * rec.nb_batches[-1] + len(rec.losses))
            y_bounds = (0, max((max(Tensor(rec.losses)), max(Tensor(rec.val_losses)))))
            rec.pbar.update_graph([(iters, rec.losses), (val_iter, rec.val_losses)], x_bounds, y_bounds)
        return {}
268530
@Override
    public void close() {
        if (!this.closed.getAndSet(true)) {
            this.conditionalUpdateProcessor.close();
            this.cacheManager.unregister(this.cache);
            this.cache.close();
            this.recoveryTracker.close();
        }
    }
25344
public void close() {

        if (csvReader != null) {
            try {
                csvReader.close();
            } catch (IOException e) {
                // Ignore.
            }
        }

        if (csvWriter != null) {
            try {
                csvWriter.close();
            } catch (IOException e) {
                // Ignore.
            }
        }
    }
1021453
def close(self):
        """"""
        try:
            self.payload.close()
        except:
            pass
        try:
            self.model.close()
        except:
            pass
        try:
            self.fresh_index.close()
        except:
            pass
        try:
            self.opt_index.close()
        except:
            pass
        try:
            self.fresh_docs.terminate()
        except:
            pass
624325
async def close(self) -> None:
        

        LOGGER.debug('HolderProver.close >>>')

        if self.config.get('archive-holder-prover-caches-on-close', False):
            await self.load_cache_for_proof(True)
            ArchivableCaches.purge_archives(self.dir_cache, True)

        await BaseAnchor.close(self)
        for path_rr_id in Tails.links(self._dir_tails):
            rr_id = basename(path_rr_id)
            try:
                await self._sync_revoc_for_proof(rr_id)
            except ClosedPool:
                LOGGER.warning('HolderProver sync-revoc on close required ledger for %s but pool was closed', rr_id)

        LOGGER.debug('HolderProver.close <<<')
977713
def close(self):
        
        # Check if any of the files have already been closed
        shp_open = self.shp and not (hasattr(self.shp, 'closed') and self.shp.closed)
        shx_open = self.shx and not (hasattr(self.shx, 'closed') and self.shx.closed)
        dbf_open = self.dbf and not (hasattr(self.dbf, 'closed') and self.dbf.closed)
            
        # Balance if already not balanced
        if self.shp and shp_open and self.dbf and dbf_open:
            if self.autoBalance:
                self.balance()
            if self.recNum != self.shpNum:
                raise ShapefileException("When saving both the dbf and shp file, "
                                         "the number of records (%s) must correspond "
                                         "with the number of shapes (%s)" % (self.recNum, self.shpNum))
        # Fill in the blank headers
        if self.shp and shp_open:
            self.__shapefileHeader(self.shp, headerType='shp')
        if self.shx and shx_open:
            self.__shapefileHeader(self.shx, headerType='shx')

        # Update the dbf header with final length etc
        if self.dbf and dbf_open:
            self.__dbfHeader()

        # Close files, if target is a filepath
        if self.target:
            for attribute in (self.shp, self.shx, self.dbf):
                if hasattr(attribute, 'close'):
                    try:
                        attribute.close()
                    except IOError:
                        pass
691155
def stop_batch_learning(self):
        """"""
        self._learning = False

        self.graph.commit()
        self.graph.cursor().execute("PRAGMA journal_mode=truncate")
        self.graph.ensure_indexes()
347534
def close(self, suppress_logging=False):
        
        for publisher in self.publishers:
            try:
                publisher.close()
            except Exception as e:
                self.logger.error('Exception on closing Flopsy Publisher {0}: {1}'.format(self.name, e),
                                  exc_info=not suppress_logging)
        self.publishers.clear()
90343
public File closeAndRecycle() throws JournalException
    {
    	File recycledFile = new File(file.getAbsolutePath()+RECYCLED_SUFFIX);
    	if (!file.renameTo(recycledFile))
    		throw new JournalException("Cannot rename journal file "+file.getAbsolutePath()+" to "+recycledFile.getAbsolutePath());
    	
    	try
    	{
    		fillWithZeroes(recycledFile.length(), writeBuffer.length);
    	}
        catch (IOException e)
        {
            throw new JournalException("Cannot clear journal file : "+recycledFile.getAbsolutePath(),e);
        }
        
        sync();
        close();
        
        return recycledFile;
    }
902617
public void close() throws IOException {
		if (!closed) {
			if (usesDefaultInflater)
				inf.end();
			in.close();
			closed = true;
		}
	}
487247
def closed(self) -> bool:
        ''''''
        return not self.writer or not self.reader or self.reader.at_eof()
907388
public void closeArchive() throws IOException {
        if (this.tarIn != null) {
            this.tarIn.close();
        } else if (this.tarOut != null) {
            this.tarOut.close();
        }
    }
610741
public synchronized void compact() throws ClosedJournalException, IOException {
        if (opened) {
            for (DataFile file : dataFiles.values()) {
                // Can't compact the data file (or subsequent files) that is currently being written to:
                if (file.getDataFileId() >= lastAppendLocation.getDataFileId()) {
                    continue;
                } else {
                    Location firstUserLocation = goToFirstLocation(file, Location.USER_RECORD_TYPE, false);
                    if (firstUserLocation == null) {
                        removeDataFile(file);
                    } else {
                        Location firstDeletedLocation = goToFirstLocation(file, Location.DELETED_RECORD_TYPE, false);
                        if (firstDeletedLocation != null) {
                            compactDataFile(file);
                        }
                    }
                }
            }
        } else {
            throw new ClosedJournalException("The journal is closed!");
        }
    }
1122080
def close(self):
        
        if not self._closed:
            try:
                self._cursor.close()
            except Exception:
                pass
            self._closed = True