public void run() { try { List allObjects = new ArrayList(); List allCommonPrefixes = new ArrayList(); do { StorageObjectsChunk chunk = storageService.listObjectsChunked( bucketName, prefix, delimiter, maxListingLength, priorLastKey); priorLastKey = chunk.getPriorLastKey(); allObjects.addAll(Arrays.asList(chunk.getObjects())); allCommonPrefixes.addAll(Arrays.asList(chunk.getCommonPrefixes())); } while (!halted && priorLastKey != null); result = new StorageObjectsChunk( prefix, delimiter, (StorageObject[]) allObjects.toArray(new StorageObject[allObjects.size()]), (String[]) allCommonPrefixes.toArray(new String[allCommonPrefixes.size()]), null); } catch (ServiceException e) { result = e; } }
public void run() { try { List allObjects = new ArrayList(); List allCommonPrefixes = new ArrayList(); do { StorageObjectsChunk chunk = storageService.listObjectsChunked( bucketName, prefix, delimiter, maxListingLength, priorLastKey); priorLastKey = chunk.getPriorLastKey(); allObjects.addAll(Arrays.asList(chunk.getObjects())); allCommonPrefixes.addAll(Arrays.asList(chunk.getCommonPrefixes())); } while (!halted && priorLastKey != null); result = new StorageObjectsChunk( prefix, delimiter, (StorageObject[]) allObjects.toArray(new StorageObject[allObjects.size()]), (String[]) allCommonPrefixes.toArray(new String[allCommonPrefixes.size()]), null); } catch (ServiceException e) { result = e; } }
log.debug("Found " + objects.size() + " objects in total"); return new StorageObjectsChunk( prefix, delimiter, objects.toArray(new StorageObject[objects.size()]), return new StorageObjectsChunk( prefix, delimiter, objects.toArray(new StorageObject[objects.size()]),
log.debug("Found " + objects.size() + " objects in total"); return new StorageObjectsChunk( prefix, delimiter, objects.toArray(new StorageObject[objects.size()]), return new StorageObjectsChunk( prefix, delimiter, objects.toArray(new StorageObject[objects.size()]),