public ContentClaim getContentClaim() throws IOException { final ContentClaim contentClaim = queue.poll(); if (contentClaim != null) { contentRepo.incrementClaimaintCount(contentClaim); return contentClaim; } final ContentClaim claim = contentRepo.create(false); registerStream(claim); return claim; }
private void redirect() throws IOException { final ContentRepository backupRepo = getBackupRepository(); if (backupRepo == null) { throw new IOException("Content Repository is out of space"); } final ContentClaim backupClaim = backupRepo.create(true); backupRepoClaimMap.put(claim, backupClaim); out = backupRepo.write(backupClaim); amos.writeTo(out); amos.destroy(); amos = null; }
@Override public ContentClaim create(boolean lossTolerant) throws IOException { if (lossTolerant) { return createLossTolerant(); } else { final ContentRepository backupRepo = getBackupRepository(); if (backupRepo == null) { // TODO: Loss Tolerance is not yet configurable. // Therefore, since this is an in-memory content repository, assume that this claim is loss-tolerant if there // is not a backup repository return createLossTolerant(); } final ContentClaim backupClaim = backupRepo.create(lossTolerant); backupRepoClaimMap.put(backupClaim, backupClaim); return backupClaim; } }
newClaim = context.getContentRepository().create(context.getConnectable().isLossTolerant()); claimLog.debug("Creating ContentClaim {} for 'importFrom' for {}", newClaim, destination); } catch (final IOException e) {
while (isMoreFlowFiles(dataIn, protocolVersion)) { if (contentClaim == null) { contentClaim = contentRepository.create(false); contentClaimOut = contentRepository.write(contentClaim);
final ContentClaim newClaim; try { newClaim = contentRepo.create(context.getConnectable().isLossTolerant()); claimLog.debug("Creating ContentClaim {} for 'merge' for {}", newClaim, destinationRecord.getCurrent()); } catch (final IOException e) {
try { try { newClaim = context.getContentRepository().create(context.getConnectable().isLossTolerant()); claimLog.debug("Creating ContentClaim {} for 'importFrom' for {}", newClaim, destination);
newClaim = context.getContentRepository().create(context.getConnectable().isLossTolerant()); claimLog.debug("Creating ContentClaim {} for 'append' for {}", newClaim, source);