class AsyncOperationCollection implements IAsyncOperationCollection {

    @Override
    public void complete(final IObject document) throws CompleteAsyncOperationException {

        try (IPoolGuard poolGuard = new PoolGuard(connectionPool)) {

            ITask updateTask = IOC.resolve(Keys.getOrAdd("db.async_ops_collection.complete"),
                    poolGuard.getObject(),
                    collectionName,
                    document
            );
            updateTask.execute();

        } catch (TaskExecutionException e) {
            throw new CompleteAsyncOperationException("Error during execution complete.", e);
        } catch (PoolGuardException e) {
            throw new CompleteAsyncOperationException("Can't get connection from pool.", e);
        } catch (ResolutionException e) {
            throw new CompleteAsyncOperationException("Can't resolve async operation object.", e);
        }
    }

    public  AsyncOperationCollection(final IPool connectionPool, final String collectionName);

}