@SuppressWarnings("unchecked") @Override public ResultSegment<T> postProcessResponse(HttpURLConnection connection, TableQuery<T> queryRef, CloudTableClient client, OperationContext context, ResultSegment<T> storageObject) throws Exception { ODataPayload<T> clazzResponse = null; InputStream inStream = connection.getInputStream(); clazzResponse = (ODataPayload<T>) TableDeserializer.parseQueryResponse(inStream, options, queryToExecute.getClazzType(), null, context); final ResultContinuation nextToken = TableResponse.getTableContinuationFromResponse(connection); if (nextToken != null) { nextToken.setTargetLocation(this.getResult().getTargetLocation()); } // Note, setting the token on the SegmentedStorageRequest is // key, this is how the iterator will share the token across executions segmentedRequest.setToken(nextToken); return new ResultSegment<T>(clazzResponse.results, queryToExecute.getTakeCount() == null ? clazzResponse.results.size() : queryToExecute.getTakeCount(), nextToken); }
@SuppressWarnings("unchecked") @Override public ResultSegment<R> postProcessResponse(HttpURLConnection connection, TableQuery<T> queryRef, CloudTableClient client, OperationContext context, ResultSegment<R> storageObject) throws Exception { ODataPayload<R> resolvedResponse = null; InputStream inStream = connection.getInputStream(); resolvedResponse = (ODataPayload<R>) TableDeserializer.parseQueryResponse(inStream, options, queryToExecute.getClazzType(), resolver, context); final ResultContinuation nextToken = TableResponse.getTableContinuationFromResponse(connection); if (nextToken != null) { nextToken.setTargetLocation(this.getResult().getTargetLocation()); } // Note, setting the token on the SegmentedStorageRequest is // key, this is how the iterator will share the token across executions segmentedRequest.setToken(nextToken); return new ResultSegment<R>(resolvedResponse.results, queryToExecute.getTakeCount() == null ? resolvedResponse.results.size() : queryToExecute.getTakeCount(), nextToken); }
@SuppressWarnings("unchecked") @Override public ResultSegment<T> postProcessResponse(HttpURLConnection connection, TableQuery<T> queryRef, CloudTableClient client, OperationContext context, ResultSegment<T> storageObject) throws Exception { ODataPayload<T> clazzResponse = null; InputStream inStream = connection.getInputStream(); clazzResponse = (ODataPayload<T>) TableDeserializer.parseQueryResponse(inStream, options, queryToExecute.getClazzType(), null, context); final ResultContinuation nextToken = TableResponse.getTableContinuationFromResponse(connection); if (nextToken != null) { nextToken.setTargetLocation(this.getResult().getTargetLocation()); } // Note, setting the token on the SegmentedStorageRequest is // key, this is how the iterator will share the token across executions segmentedRequest.setToken(nextToken); return new ResultSegment<T>(clazzResponse.results, queryToExecute.getTakeCount() == null ? clazzResponse.results.size() : queryToExecute.getTakeCount(), nextToken); }
@SuppressWarnings("unchecked") @Override public ResultSegment<R> postProcessResponse(HttpURLConnection connection, TableQuery<T> queryRef, CloudTableClient client, OperationContext context, ResultSegment<R> storageObject) throws Exception { ODataPayload<R> resolvedResponse = null; InputStream inStream = connection.getInputStream(); resolvedResponse = (ODataPayload<R>) TableDeserializer.parseQueryResponse(inStream, options, queryToExecute.getClazzType(), resolver, context); final ResultContinuation nextToken = TableResponse.getTableContinuationFromResponse(connection); if (nextToken != null) { nextToken.setTargetLocation(this.getResult().getTargetLocation()); } // Note, setting the token on the SegmentedStorageRequest is // key, this is how the iterator will share the token across executions segmentedRequest.setToken(nextToken); return new ResultSegment<R>(resolvedResponse.results, queryToExecute.getTakeCount() == null ? resolvedResponse.results.size() : queryToExecute.getTakeCount(), nextToken); }
@Override public ResultSegment<ListBlobItem> postProcessResponse(HttpURLConnection connection, CloudBlobContainer container, CloudBlobClient client, OperationContext context, ResultSegment<ListBlobItem> storageObject) throws Exception { final ListBlobsResponse response = BlobListHandler.getBlobList(connection.getInputStream(), container); ResultContinuation newToken = null; if (response.getNextMarker() != null) { newToken = new ResultContinuation(); newToken.setNextMarker(response.getNextMarker()); newToken.setContinuationType(ResultContinuationType.BLOB); newToken.setTargetLocation(this.getResult().getTargetLocation()); } final ResultSegment<ListBlobItem> resSegment = new ResultSegment<ListBlobItem>(response.getResults(), response.getMaxResults(), newToken); // Important for listBlobs because this is required by the lazy iterator between executions. segmentedRequest.setToken(resSegment.getContinuationToken()); return resSegment; } };
@Override public ResultSegment<CloudQueue> postProcessResponse(HttpURLConnection connection, Void queue, CloudQueueClient client, OperationContext context, ResultSegment<CloudQueue> storageObject) throws Exception { final ListResponse<CloudQueue> response = QueueListHandler.getQueues(connection.getInputStream(), client); ResultContinuation newToken = null; if (response.getNextMarker() != null) { newToken = new ResultContinuation(); newToken.setNextMarker(response.getNextMarker()); newToken.setContinuationType(ResultContinuationType.QUEUE); newToken.setTargetLocation(this.getResult().getTargetLocation()); } final ResultSegment<CloudQueue> resSegment = new ResultSegment<CloudQueue>(response.getResults(), response.getMaxResults(), newToken); // Important for listQueues because this is required by the lazy iterator between executions. segmentedRequest.setToken(resSegment.getContinuationToken()); return resSegment; } };
@Override public ResultSegment<ListBlobItem> postProcessResponse(HttpURLConnection connection, CloudBlobContainer container, CloudBlobClient client, OperationContext context, ResultSegment<ListBlobItem> storageObject) throws Exception { final ListBlobsResponse response = BlobListHandler.getBlobList(connection.getInputStream(), container); ResultContinuation newToken = null; if (response.getNextMarker() != null) { newToken = new ResultContinuation(); newToken.setNextMarker(response.getNextMarker()); newToken.setContinuationType(ResultContinuationType.BLOB); newToken.setTargetLocation(this.getResult().getTargetLocation()); } final ResultSegment<ListBlobItem> resSegment = new ResultSegment<ListBlobItem>(response.getResults(), response.getMaxResults(), newToken); // Important for listBlobs because this is required by the lazy iterator between executions. segmentedRequest.setToken(resSegment.getContinuationToken()); return resSegment; } };
@Override public ResultSegment<CloudQueue> postProcessResponse(HttpURLConnection connection, Void queue, CloudQueueClient client, OperationContext context, ResultSegment<CloudQueue> storageObject) throws Exception { final ListResponse<CloudQueue> response = QueueListHandler.getQueues(connection.getInputStream(), client); ResultContinuation newToken = null; if (response.getNextMarker() != null) { newToken = new ResultContinuation(); newToken.setNextMarker(response.getNextMarker()); newToken.setContinuationType(ResultContinuationType.QUEUE); newToken.setTargetLocation(this.getResult().getTargetLocation()); } final ResultSegment<CloudQueue> resSegment = new ResultSegment<CloudQueue>(response.getResults(), response.getMaxResults(), newToken); // Important for listQueues because this is required by the lazy iterator between executions. segmentedRequest.setToken(resSegment.getContinuationToken()); return resSegment; } };
@Override public ResultSegment<ListFileItem> postProcessResponse(HttpURLConnection connection, CloudFileDirectory directory, CloudFileClient client, OperationContext context, ResultSegment<ListFileItem> storageObject) throws Exception { final ListResponse<ListFileItem> response = FileListHandler.getFileAndDirectoryList(this .getConnection().getInputStream(), directory); ResultContinuation newToken = null; if (response.getNextMarker() != null) { newToken = new ResultContinuation(); newToken.setNextMarker(response.getNextMarker()); newToken.setContinuationType(ResultContinuationType.FILE); newToken.setTargetLocation(this.getResult().getTargetLocation()); } final ResultSegment<ListFileItem> resSegment = new ResultSegment<ListFileItem>(response.getResults(), response.getMaxResults(), newToken); // Important for listFilesAndDirectories because this is required by the lazy iterator between executions. segmentedRequest.setToken(resSegment.getContinuationToken()); return resSegment; } };
segmentedRequest.setToken(continuationToken);
@Override public ResultSegment<CloudFileShare> postProcessResponse(HttpURLConnection connection, Void share, CloudFileClient client, OperationContext context, ResultSegment<CloudFileShare> storageObject) throws Exception { final ListResponse<CloudFileShare> response = ShareListHandler.getShareList(this.getConnection() .getInputStream(), client); ResultContinuation newToken = null; if (response.getNextMarker() != null) { newToken = new ResultContinuation(); newToken.setNextMarker(response.getNextMarker()); newToken.setContinuationType(ResultContinuationType.SHARE); newToken.setTargetLocation(this.getResult().getTargetLocation()); } final ResultSegment<CloudFileShare> resSegment = new ResultSegment<CloudFileShare>( response.getResults(), response.getMaxResults(), newToken); // Important for listShares because this is required by the lazy iterator between executions. segmentedRequest.setToken(resSegment.getContinuationToken()); return resSegment; } };
@Override public ResultSegment<ListFileItem> postProcessResponse(HttpURLConnection connection, CloudFileDirectory directory, CloudFileClient client, OperationContext context, ResultSegment<ListFileItem> storageObject) throws Exception { final ListResponse<ListFileItem> response = FileListHandler.getFileAndDirectoryList(this .getConnection().getInputStream(), directory); ResultContinuation newToken = null; if (response.getNextMarker() != null) { newToken = new ResultContinuation(); newToken.setNextMarker(response.getNextMarker()); newToken.setContinuationType(ResultContinuationType.FILE); newToken.setTargetLocation(this.getResult().getTargetLocation()); } final ResultSegment<ListFileItem> resSegment = new ResultSegment<ListFileItem>(response.getResults(), response.getMaxResults(), newToken); // Important for listFilesAndDirectories because this is required by the lazy iterator between executions. segmentedRequest.setToken(resSegment.getContinuationToken()); return resSegment; } };
@Override public ResultSegment<CloudBlobContainer> postProcessResponse(HttpURLConnection connection, Void container, CloudBlobClient client, OperationContext context, ResultSegment<CloudBlobContainer> storageObject) throws Exception { final ListResponse<CloudBlobContainer> response = ContainerListHandler.getContainerList(this .getConnection().getInputStream(), client); ResultContinuation newToken = null; if (response.getNextMarker() != null) { newToken = new ResultContinuation(); newToken.setNextMarker(response.getNextMarker()); newToken.setContinuationType(ResultContinuationType.CONTAINER); newToken.setTargetLocation(this.getResult().getTargetLocation()); } final ResultSegment<CloudBlobContainer> resSegment = new ResultSegment<CloudBlobContainer>( response.getResults(), response.getMaxResults(), newToken); // Important for listContainers because this is required by the lazy iterator between executions. segmentedRequest.setToken(resSegment.getContinuationToken()); return resSegment; } };
@Override public ResultSegment<CloudFileShare> postProcessResponse(HttpURLConnection connection, Void share, CloudFileClient client, OperationContext context, ResultSegment<CloudFileShare> storageObject) throws Exception { final ListResponse<CloudFileShare> response = ShareListHandler.getShareList(this.getConnection() .getInputStream(), client); ResultContinuation newToken = null; if (response.getNextMarker() != null) { newToken = new ResultContinuation(); newToken.setNextMarker(response.getNextMarker()); newToken.setContinuationType(ResultContinuationType.SHARE); newToken.setTargetLocation(this.getResult().getTargetLocation()); } final ResultSegment<CloudFileShare> resSegment = new ResultSegment<CloudFileShare>( response.getResults(), response.getMaxResults(), newToken); // Important for listShares because this is required by the lazy iterator between executions. segmentedRequest.setToken(resSegment.getContinuationToken()); return resSegment; } };
segmentedRequest.setToken(continuationToken);
@Override public ResultSegment<CloudBlobContainer> postProcessResponse(HttpURLConnection connection, Void container, CloudBlobClient client, OperationContext context, ResultSegment<CloudBlobContainer> storageObject) throws Exception { final ListResponse<CloudBlobContainer> response = ContainerListHandler.getContainerList(this .getConnection().getInputStream(), client); ResultContinuation newToken = null; if (response.getNextMarker() != null) { newToken = new ResultContinuation(); newToken.setNextMarker(response.getNextMarker()); newToken.setContinuationType(ResultContinuationType.CONTAINER); newToken.setTargetLocation(this.getResult().getTargetLocation()); } final ResultSegment<CloudBlobContainer> resSegment = new ResultSegment<CloudBlobContainer>( response.getResults(), response.getMaxResults(), newToken); // Important for listContainers because this is required by the lazy iterator between executions. segmentedRequest.setToken(resSegment.getContinuationToken()); return resSegment; } };
segmentedRequest.setToken(continuationToken);
segmentedRequest.setToken(continuationToken);
segmentedRequest.setToken(continuationToken);
segmentedRequest.setToken(continuationToken);