@Override public void commitAttemptOutput(OutputAttemptContext context) throws IOException, InterruptedException { core.commitAttemptOutput(context); }
@Override public void commitAttemptOutput(OutputAttemptContext context) throws IOException, InterruptedException { if (context == null) { throw new IllegalArgumentException("context must not be null"); //$NON-NLS-1$ } Counter counter = context.getCounter(); heartbeat.register(counter); try { entity.commitAttemptOutput(context); } finally { heartbeat.unregister(counter); } }
@Override public void close() throws IOException { output.close(); try { dataSource.commitAttemptOutput(outputContext); dataSource.cleanupAttemptOutput(outputContext); dataSource.commitTransactionOutput(outputContext.getTransactionContext()); dataSource.cleanupTransactionOutput(outputContext.getTransactionContext()); } catch (InterruptedException e) { throw (IOException) new InterruptedIOException("interrupted").initCause(e); //$NON-NLS-1$ } } };
try { DirectDataSource repo = repository.getRelatedDataSource(containerPath); repo.commitAttemptOutput(context); } catch (IOException e) { LOG.error(MessageFormat.format(
output.write(new StringBuilder("Hello, world!")); ds.commitAttemptOutput(aContext); ds.cleanupAttemptOutput(aContext);