private void basicClose(boolean forceDelete) { flushAll(); synchronized (this.lock/*crf*/) { unpreblow(this.crf, getMaxCrfSize());
/** * Creates the crf oplog file * * @throws IOException */ private void createCrf(OplogFile prevOlf) throws IOException { File f = new File(this.diskFile.getPath() + CRF_FILE_EXT); if (logger.isDebugEnabled()) { logger.debug("Creating operation log file {}", f); } this.crf.f = f; preblow(this.crf, getMaxCrfSize()); this.crf.raf = new UninterruptibleRandomAccessFile(f, SYNC_WRITES ? "rwd" : "rw"); this.crf.RAFClosed = false; oplogSet.crfCreate(this.oplogId); this.crf.writeBuf = allocateWriteBuf(prevOlf); logger.info(LocalizedMessage.create(LocalizedStrings.Oplog_CREATE_0_1_2, new Object[] { toString(), getFileType(this.crf), getParent().getName() })); this.crf.channel = this.crf.raf.getChannel(); this.stats.incOpenOplogs(); writeDiskStoreRecord(this.crf, OPLOG_TYPE.CRF); writeGemfireVersionRecord(this.crf); writeRVVRecord(this.crf, false); // Fix for bug 41654 - don't count the header // size against the size of the oplog. This ensures that // even if we have a large RVV, we can still write up to // max-oplog-size bytes to this oplog. this.maxCrfSize += this.crf.currSize; }
this.crf.RAFClosed = false; this.crf.channel = this.crf.raf.getChannel(); unpreblow(this.crf, getMaxCrfSize()); this.crf.raf.close();
preblow(this.crf, getMaxCrfSize()); this.crf.raf = new RandomAccessFile(f, getParent().getSyncWrites() ? "rwd" : "rw");
private void basicClose(boolean forceDelete) { flushAll(); synchronized (this.lock/* crf */) { unpreblow(this.crf, getMaxCrfSize()); if (!this.crf.RAFClosed) { try {
this.crf.RAFClosed = false; this.crf.channel = this.crf.raf.getChannel(); unpreblow(this.crf, getMaxCrfSize()); this.crf.raf.close();
assert adjustment > 0; long temp = (this.crf.currSize + adjustment); if (temp > getMaxCrfSize() && !isFirstRecord()) { switchOpLog(dr, adjustment, null);
assert adjustment > 0; long temp = (this.crf.currSize + adjustment); if (temp > getMaxCrfSize() && !isFirstRecord()) { switchOpLog(null, adjustment, null);
} else if (temp > getMaxCrfSize() && !isFirstRecord()) { switchOpLog(dr, getOpStateSize(), entry); useNextOplog = true;
assert adjustment > 0; long temp = (this.crf.currSize + adjustment); if (temp > getMaxCrfSize() && !isFirstRecord()) { switchOpLog(dr, adjustment, null, false);
assert adjustment > 0; long temp = (this.crf.currSize + adjustment); if (temp > getMaxCrfSize() && !isFirstRecord()) { switchOpLog(null, adjustment, null, false);
assert adjustment > 0; long temp = (this.crf.currSize + adjustment); if (temp > getMaxCrfSize() && !isFirstRecord()) { switchOpLog(dr, adjustment, entry);
useNextOplog = true; else if (temp > getMaxCrfSize() && !isFirstRecord()) { switchOpLog(dr, getOpStateSize(), entry, false);
assert adjustment > 0; long temp = (this.crf.currSize + adjustment); if (temp > getMaxCrfSize() && !isFirstRecord()) { switchOpLog(dr, adjustment, entry, false);