@Override public CancelCriterion getCancelCriterion() { return getDiskStore().getCancelCriterion(); }
/** * A check to confirm that the oplog has been closed because of the cache being closed * */ private void checkClosed() { this.parent.getCancelCriterion().checkCancelInProgress(null); if (!this.closed) { return; } throw new OplogCancelledException("This Oplog has been closed."); }
/** * A check to confirm that the oplog has been closed because of the cache being closed * */ private void checkClosed() { getParent().getCancelCriterion().checkCancelInProgress(null); if (!this.closed) { return; } throw new OplogCancelledException("This Oplog has been closed."); }
private void copyForwardForOfflineCompact(long oplogKeyId, byte[] keyBytes, byte[] valueBytes, byte userBits, long drId, VersionTag tag) { try { basicCopyForwardForOfflineCompact(oplogKeyId, keyBytes, valueBytes, userBits, drId, tag); } catch (IOException ex) { getParent().getCancelCriterion().checkCancelInProgress(ex); throw new DiskAccessException( String.format("Failed writing key to %s", this.diskFile.getPath()), ex, getParent()); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); getParent().getCancelCriterion().checkCancelInProgress(ie); throw new DiskAccessException( String.format( "Failed writing key to %s due to failure in acquiring read lock for asynch writing", this.diskFile.getPath()), ie, getParent()); } }
@Before public void setup() { DiskStoreImpl diskStoreImpl = mock(DiskStoreImpl.class); when(diskStoreImpl.getDiskInitFile()).thenReturn(mock(DiskInitFile.class)); when(diskStoreImpl.getCancelCriterion()).thenReturn(mock(CancelCriterion.class)); diskRegion = spy(new DiskRegion(diskStoreImpl, "testRegion", false, true, false, false, mock(DiskRegionStats.class), mock(CancelCriterion.class), mock(DiskExceptionHandler.class), null, mock(EnumSet.class), null, 0, null, false)); }
public void flushAll(boolean skipDrf, boolean doSync) { try { // TODO: if skipDrf then only need to do drf if crf has flushable data flush(this.drf, doSync); flush(this.crf, doSync); } catch (IOException ex) { getParent().getCancelCriterion().checkCancelInProgress(ex); throw new DiskAccessException( String.format("Failed writing key to %s", this.diskFile.getPath()), ex, getParent()); } }
public boolean copyForwardForOverflowCompact(DiskEntry entry, byte[] value, int length, byte userBits) { try { ValueWrapper vw = new DiskEntry.Helper.CompactorValueWrapper(value, length); return basicModify(entry, vw, userBits, true); } catch (IOException ex) { throw new DiskAccessException( String.format("Failed writing key to %s", this.diskFile.getPath()), ex, getParent().getName()); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); getParent().getCancelCriterion().checkCancelInProgress(ie); throw new DiskAccessException( String.format( "Failed writing key to %s due to failure in acquiring read lock for asynch writing", this.diskFile.getPath()), ie, getParent().getName()); } }
} catch (IOException ex) { exceptionOccurred = true; getParent().getCancelCriterion().checkCancelInProgress(ex); throw new DiskAccessException(String.format("Failed writing key to %s", this.diskFile.getPath()), ex, dr.getName());
getParent().getCancelCriterion().checkCancelInProgress(ex); throw new DiskAccessException( String.format(
} catch (IOException ex) { exceptionOccurred = true; getParent().getCancelCriterion().checkCancelInProgress(ex); throw new DiskAccessException(String.format("Failed writing key to %s", this.diskFile.getPath()), ex, getParent()); exceptionOccurred = true; Thread.currentThread().interrupt(); getParent().getCancelCriterion().checkCancelInProgress(ie); throw new DiskAccessException( String.format(
getParent().getCancelCriterion().checkCancelInProgress(ex); throw new DiskAccessException( String.format("Failed to read file during recovery from %s",
close(); getParent().getCancelCriterion().checkCancelInProgress(ex); if (ex instanceof DiskAccessException) { throw (DiskAccessException) ex;
close(); getParent().getCancelCriterion().checkCancelInProgress(ex); if (ex instanceof DiskAccessException) { throw (DiskAccessException) ex;
getParent().getCancelCriterion().checkCancelInProgress(ex); throw new DiskAccessException( String.format("Failed to read file during recovery from %s",
getParent().getCancelCriterion().checkCancelInProgress(ex); throw new DiskAccessException( String.format(
getParent().getCancelCriterion().checkCancelInProgress(ex); throw new DiskAccessException( String.format("Failed creating operation log because: %s", ex),
this.exceptionHandler = exceptionHandler; this.rwLock = new StoppableReentrantReadWriteLock(ds.getCancelCriterion());
getOplogSet().getChild().basicRemove(dr, entry, false, false); } catch (IOException ex) { getParent().getCancelCriterion().checkCancelInProgress(ex); throw new DiskAccessException(String.format("Failed writing key to %s", this.diskFile.getPath()), ex, dr.getName());