Tabnine Logo
DeleteAllKeysInList.execute
Code IndexAdd Tabnine to your IDE (free)

How to use
execute
method
in
org.jclouds.blobstore.strategy.internal.DeleteAllKeysInList

Best Java code snippets using org.jclouds.blobstore.strategy.internal.DeleteAllKeysInList.execute (Showing top 20 results out of 315)

origin: jclouds/legacy-jclouds

public void execute(String containerName) {
 execute(containerName, recursive());
}
origin: org.apache.jclouds/jclouds-blobstore

public void execute(String containerName) {
 execute(containerName, recursive());
}
origin: Nextdoor/bender

public void execute(String containerName) {
 execute(containerName, recursive());
}
origin: org.jclouds/jclouds-blobstore

public void execute(String containerName) {
 execute(containerName, recursive());
}
origin: io.cloudsoft.jclouds/jclouds-blobstore

public void execute(String containerName) {
 execute(containerName, recursive());
}
origin: com.amysta.jclouds/jclouds-blobstore

public void execute(String containerName) {
 execute(containerName, recursive());
}
origin: apache/jclouds

public void execute(String containerName) {
 execute(containerName, recursive());
}
origin: jclouds/legacy-jclouds

public void testExecuteNonRecursive() {
 deleter.execute(containerName, ListContainerOptions.NONE);
 assertEquals(blobstore.countBlobs(containerName), 2222);
}
origin: jclouds/legacy-jclouds

public void testExecuteWithoutOptionsClearsRecursively() {
 deleter.execute(containerName);
 assertEquals(blobstore.countBlobs(containerName), 0);
}
origin: apache/jclouds

public void testExecuteWithoutOptionsClearsRecursively() {
 deleter.execute(containerName);
 assertEquals(blobstore.countBlobs(containerName), 0);
}
origin: apache/jclouds

public void testExecuteNonRecursive() {
 deleter.execute(containerName, ListContainerOptions.NONE);
 assertEquals(blobstore.countBlobs(containerName), 2222);
}
origin: jclouds/legacy-jclouds

public void testExecuteInDirectory() {
 deleter.execute(containerName, ListContainerOptions.Builder.inDirectory(directoryName));
 assertEquals(blobstore.countBlobs(containerName), 1111);
}
origin: jclouds/legacy-jclouds

public void testExecuteRecursive() {
 deleter.execute(containerName, ListContainerOptions.Builder.recursive());
 assertEquals(blobstore.countBlobs(containerName), 0);
}
origin: apache/jclouds

public void testExecuteRecursive() {
 deleter.execute(containerName, ListContainerOptions.Builder.recursive());
 assertEquals(blobstore.countBlobs(containerName), 0);
}
origin: apache/jclouds

public void testExecuteInDirectory() {
 deleter.execute(containerName, ListContainerOptions.Builder.inDirectory(directoryName));
 assertEquals(blobstore.countBlobs(containerName), 1111);
}
origin: jclouds/legacy-jclouds

public void testListTimeoutException() throws Exception {
 ListenableFuture<PageSet<? extends StorageMetadata>> future = createMock(ListenableFuture.class);
 expect(future.get(anyLong(), anyObject(TimeUnit.class))).andThrow(new RuntimeException(new TimeoutException()));
 expect(future.cancel(true)).andReturn(true);
 replay(future);
 AsyncBlobStore asyncBlobStore = createMock(AsyncBlobStore.class);
 expect(asyncBlobStore.list(anyObject(String.class), anyObject(ListContainerOptions.class))).andReturn(future);
 replay(asyncBlobStore);
 deleter = new DeleteAllKeysInList(null, asyncBlobStore, null);
 try {
   deleter.execute(containerName, ListContainerOptions.NONE);
   fail();
 } catch (Exception e) {
   if (Throwables2.getFirstThrowableOfType(e, TimeoutException.class) == null) {
    throw e;
   }
 }
}
origin: jclouds/legacy-jclouds

case RELATIVE_PATH:
  if (options.isRecursive() && !fullPath.equals(options.getDir())) {
   execute(containerName, options.clone().inDirectory(fullPath));
origin: apache/jclouds

@SuppressWarnings("unchecked")
public void testDeleteAfterFutureFailure() {
 IMocksControl mockControl = createControl();
 ListeningExecutorService executorService = mockControl
    .createMock(ListeningExecutorService.class);
 DeleteAllKeysInList testDeleter = createMockBuilder(
    DeleteAllKeysInList.class).withConstructor(executorService,
    blobstore, retryHandler, maxParallelDeletes).createMock();
 // Fail the first future that is created for deleting blobs.
 EasyMock.<ListenableFuture<?>> expect(
       executorService.submit(isA(Callable.class)))
    .andReturn(
       Futures.<Void> immediateFailedFuture(new RuntimeException()))
    .once();
 // There should be at least another 3333 calls to executorService.submit
 // since there are 3333 blobs.
 EasyMock.expectLastCall().andReturn(Futures.<Void> immediateFuture(null))
    .times(3333, Integer.MAX_VALUE);
 replay(executorService);
 testDeleter.execute(containerName,
    ListContainerOptions.Builder.recursive());
}
origin: apache/jclouds

@SuppressWarnings("unchecked")
public void testExceptionThrownAfterMaxRetries() {
 IMocksControl mockControl = createControl();
 ListeningExecutorService executorService = mockControl
    .createMock(ListeningExecutorService.class);
 DeleteAllKeysInList testDeleter = createMockBuilder(
    DeleteAllKeysInList.class).withConstructor(executorService,
    blobstore, retryHandler, maxParallelDeletes).createMock();
 // Fail the first future that is created for deleting blobs.
 EasyMock.<ListenableFuture<?>> expect(
       executorService.submit(isA(Callable.class)))
    .andReturn(
       Futures.<Void> immediateFailedFuture(new RuntimeException()))
    .once();
 EasyMock.expectLastCall().andReturn(Futures.<Void> immediateFuture(null))
    .anyTimes();
 replay(executorService);
 testDeleter.setMaxErrors(1);
 boolean blobRunTimeExceptionThrown = false;
 try {
 testDeleter.execute(containerName,
    ListContainerOptions.Builder.recursive());
 } catch (BlobRuntimeException be) {
   blobRunTimeExceptionThrown = true;
 }
 assertTrue(blobRunTimeExceptionThrown, "Expected a BlobRunTimeException");
}
origin: apache/jclouds

public void testContainerNotFound() {
 IMocksControl mockControl = createControl();
 BlobStore blobStore = mockControl.createMock(BlobStore.class);
 ListeningExecutorService executorService = mockControl
    .createMock(ListeningExecutorService.class);
 DeleteAllKeysInList testDeleter = createMockBuilder(
    DeleteAllKeysInList.class).withConstructor(executorService,
    blobStore, retryHandler, maxParallelDeletes).createMock();
 EasyMock.<PageSet<? extends StorageMetadata>> expect(blobStore.list(
       isA(String.class), isA(ListContainerOptions.class)))
    .andThrow(new ContainerNotFoundException()).once();
 replay(blobStore);
 testDeleter.execute(containerName,
    ListContainerOptions.Builder.recursive());
 // No blobs will be deleted since blobStore.list will throw a
 // ContainerNotFoundException.
 assertEquals(blobstore.countBlobs(containerName), 3333);
}
org.jclouds.blobstore.strategy.internalDeleteAllKeysInListexecute

Javadoc

This method goes through all the blobs from a container and attempts to create futures for deleting them. If there is a TimeoutException when doing this, sets the deleteFailure flag to true and returns. If there are more retries left, this will get called again.

Popular methods of DeleteAllKeysInList

  • parentIsFolder
  • executeOneIteration
    This method goes through all the blobs from a container and attempts to create futures for deleting
  • cancelOutstandingFutures
  • deleteBlobsAndEmptyDirs
    Delete the blobs from a given PageSet. The PageSet may contain blobs or directories. If there are di
  • deleteDirectory
  • getListing
    Get the object listing from a given container based on the options. For recursive listing of directo
  • getMessage
  • waitForCompletion
  • <init>
  • setMaxErrors

Popular in Java

  • Updating database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • onRequestPermissionsResult (Fragment)
  • setScale (BigDecimal)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • JPanel (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now