Tabnine Logo
org.jclouds.blobstore.integration.internal
Code IndexAdd Tabnine to your IDE (free)

How to use org.jclouds.blobstore.integration.internal

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

origin: jclouds/legacy-jclouds

protected void assertConsistencyAwareRemoveEquals(final Map<String, V> map, final String key, final Object equals)
   throws InterruptedException {
 assertConsistencyAware(new Runnable() {
   public void run() {
    assertEquals(map.remove(key), equals);
   }
 });
}
origin: jclouds/legacy-jclouds

protected void assertNotExists(final String containerName) throws InterruptedException {
 assertConsistencyAware(new Runnable() {
   public void run() {
    try {
      assert !view.getBlobStore().containerExists(containerName) : "container " + containerName
         + " still exists";
    } catch (Exception e) {
      propagateIfPossible(e);
    }
   }
 });
}
origin: jclouds/legacy-jclouds

@Override
protected void checkContentDisposition(Blob blob, String contentDisposition) {
 // This works for Swift Server 1.4.4/SWauth 1.0.3 but was null in previous versions.
 // TODO: Better testing for the different versions.
 super.checkContentDisposition(blob,contentDisposition);
}
origin: jclouds/legacy-jclouds

private void checkContentMetadata(Blob blob) {
 checkContentType(blob, "text/csv");
 checkContentDisposition(blob, "attachment; filename=photo.jpg");
 checkContentEncoding(blob, "gzip");
 checkContentLanguage(blob, "en");
}
origin: jclouds/legacy-jclouds

/**
* requestor will create a container using the name returned from this. This method will take
* care not to exceed the maximum containers permitted by a provider by deleting an existing
* container first.
* 
* @throws InterruptedException
*/
public String getScratchContainerName() throws InterruptedException {
 return allocateNewContainerName(getContainerName());
}
origin: jclouds/legacy-jclouds

private String addObjectAndValidateContent(String sourcecontainer, String sourceKey) throws InterruptedException {
 String eTag = addBlobToContainer(sourcecontainer, sourceKey);
 validateContent(sourcecontainer, sourceKey);
 return eTag;
}
origin: jclouds/legacy-jclouds

protected String recycleContainer(final String container) throws InterruptedException {
 String newScratchContainer = allocateNewContainerName(container);
 createContainerAndEnsureEmpty(newScratchContainer);
 return newScratchContainer;
}
origin: jclouds/legacy-jclouds

@BeforeClass(groups = { "integration", "live" }, dependsOnMethods = "setupContext")
@Override
public void setUpResourcesOnThisThread(ITestContext testContext) throws Exception {
 super.setUpResourcesOnThisThread(testContext);
 oneHundredOneConstitutions = getTestDataSupplier();
 oneHundredOneConstitutionsMD5 = md5Supplier(oneHundredOneConstitutions);
}
origin: jclouds/legacy-jclouds

protected void assertContainerSize(final String containerName, final int size) throws InterruptedException {
 assertConsistencyAware(new Runnable() {
   public void run() {
    try {
      assertEquals(view.getBlobStore().countBlobs(containerName), size);
    } catch (Exception e) {
      propagateIfPossible(e);
    }
   }
 });
}
origin: jclouds/legacy-jclouds

/**
* abandon old container name instead of waiting for the container to be created.
* 
* @throws InterruptedException
*/
public void destroyContainer(String scratchContainer) throws InterruptedException {
 if (scratchContainer != null) {
   recycleContainerAndAddToPool(scratchContainer);
 }
}
origin: jclouds/legacy-jclouds

protected void assertConsistencyAwareDoesntContainKey(final Map<String, V> map) throws InterruptedException {
 assertConsistencyAware(new Runnable() {
   public void run() {
    assert !map.containsKey("one");
   }
 });
}
origin: jclouds/legacy-jclouds

protected void assertConsistencyAwareContainerExists(final String containerName) throws InterruptedException {
 assertConsistencyAware(new Runnable() {
   public void run() {
    try {
      assert view.getBlobStore().containerExists(containerName) : String.format("container %s doesn't exist", containerName);
    } catch (Exception e) {
      Throwables.propagate(e);
    }
   }
 });
}
origin: jclouds/legacy-jclouds

protected void assertConsistencyAwareMapSize(final Map<String, V> map, final int size) throws InterruptedException {
 assertConsistencyAware(new Runnable() {
   public void run() {
    assertEquals(map.size(), size);
   }
 });
}
origin: jclouds/legacy-jclouds

protected void assertConsistencyAwareGetEquals(final Map<String, V> map, final String key, final Object equals)
   throws InterruptedException {
 assertConsistencyAware(new Runnable() {
   public void run() {
    assertEquals(map.get(key), equals);
   }
 });
}
origin: jclouds/legacy-jclouds

/**
* containsValue() uses eTag comparison to containerName contents, so this can be subject to
* eventual consistency problems.
*/
protected void assertConsistencyAwareContainsValue(final Map<String, V> map, final Object value)
   throws InterruptedException {
 assertConsistencyAware(new Runnable() {
   public void run() {
    assert map.containsValue(value);
   }
 });
}
origin: jclouds/legacy-jclouds

protected void assertConsistencyAwareKeySize(final Map<String, V> map, final int size) throws InterruptedException {
 assertConsistencyAware(new Runnable() {
   public void run() {
    assertEquals(map.keySet().size(), size);
   }
 });
}
origin: jclouds/legacy-jclouds

protected void assertConsistencyAwareListContainer(final ListableMap<?, ?> map, final String containerNameName)
   throws InterruptedException {
 assertConsistencyAware(new Runnable() {
   public void run() {
    assertTrue(Iterables.size(map.list()) >= 0);
   }
 });
}
origin: jclouds/legacy-jclouds

protected void assertConsistencyAwareContainsKey(final Map<String, V> map) throws InterruptedException {
 assertConsistencyAware(new Runnable() {
   public void run() {
    assert map.containsKey("one");
   }
 });
}
origin: jclouds/legacy-jclouds

protected void assertConsistencyAwareNotEmpty(final Map<String, V> map) throws InterruptedException {
 assertConsistencyAware(new Runnable() {
   public void run() {
    assert !map.isEmpty();
   }
 });
}
origin: jclouds/legacy-jclouds

protected void assertConsistencyAwareEmpty(final Map<String, V> map) throws InterruptedException {
 assertConsistencyAware(new Runnable() {
   public void run() {
    assert map.isEmpty();
   }
 });
}
org.jclouds.blobstore.integration.internal

Most used classes

  • BaseBlobIntegrationTest
  • BaseBlobSignerLiveTest
    Tests integrated functionality of all signature commands. Each test uses a different container name,
  • BaseContainerIntegrationTest
  • BaseBlobLiveTest
    Tests integrated functionality of all PutObject commands. Each test uses a different container name,
  • BaseContainerLiveTest
  • BaseServiceIntegrationTest,
  • BaseBlobMapIntegrationTest,
  • BaseInputStreamMapIntegrationTest,
  • BaseBlobMapIntegrationTest$StringToBlob,
  • BaseMapIntegrationTest
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