Page getNextPage()

in src/main/java/software/amazon/qldb/ResultRetriever.java [348:363]


        Page getNextPage() {
            try {
                final ResultHolder<Exception> result = results.take();
                if (null != result.getAssociatedValue()) {
                    if (result.getAssociatedValue() instanceof RuntimeException) {
                        throw (RuntimeException) result.getAssociatedValue();
                    }
                    throw new RuntimeException(result.getAssociatedValue());
                }

                return result.getResult();
            } catch (InterruptedException ie) {
                Thread.currentThread().interrupt();
                throw QldbDriverException.create(Errors.RETRIEVE_INTERRUPTED.get(), ie);
            }
        }