Пример #1
0
 public ScanSegmentWorker(final DynamoDBDelegate delegate, final ScanRequest request) {
   this.delegate = delegate;
   this.request = DynamoDBDelegate.copyScanRequest(request);
   this.hasNext = true;
   this.lastConsumedCapacity =
       delegate.estimateCapacityUnits(DynamoDBDelegate.SCAN, request.getTableName());
 }
Пример #2
0
 @Override
 public ScanContext call() throws Exception {
   try {
     ScanRequest originalRequest = DynamoDBDelegate.copyScanRequest(request);
     ScanResult result = next();
     return new ScanContext(originalRequest, result);
   } catch (BackendRuntimeException e) {
     throw e.getBackendException();
   }
 }