Package org.jclouds.blobstore

Examples of org.jclouds.blobstore.InputStreamMap$Factory


        String provider = getProvider(config);
        String blobName = System.nanoTime() + "/" + file.getName();
        BlobStoreContext context = getContext(config, spec);
        try
        {
            InputStreamMap map = context.createInputStreamMap(container);
            map.putFile(blobName, file);
            // TODO: magic! in order to expose the blob as public, we need to dive into provider specific APIs
            // the hope is that permissions are encapsulated in jclouds in the future
            if (provider.equals("s3"))
            {
                S3Client sss = context.<S3Client,S3AsyncClient>getProviderSpecificContext().getApi();
View Full Code Here


   @Test(groups = { "integration", "live" })
   public void testPutMoreThanSingleListing() throws InterruptedException, ExecutionException, TimeoutException {
      String containerName = getContainerName();
      try {
         InputStreamMap map = createMap(view, containerName);
         Set<String> keySet = Sets.newLinkedHashSet();
         for (int i = 0; i < maxResultsForTestListings() + 1; i++) {
            keySet.add(i + "");
         }

         Map<String, String> newMap = Maps.newHashMap();
         for (String key : keySet) {
            newMap.put(key, key);
         }
         map.putAllStrings(newMap);
         newMap.clear();

         assertConsistencyAwareMapSize(map, maxResultsForTestListings() + 1);
         assertConsistencyAwareKeySetEquals(map, keySet);
         map.clear();
         assertConsistencyAwareMapSize(map, 0);
      } finally {
         returnContainer(containerName);
      }
   }
View Full Code Here

   @Test(groups = { "integration", "live" })
   public void testPutMoreThanSingleListing() throws InterruptedException, ExecutionException, TimeoutException {
      String containerName = getContainerName();
      try {
         InputStreamMap map = createMap(view, containerName);
         Set<String> keySet = Sets.newLinkedHashSet();
         for (int i = 0; i < maxResultsForTestListings() + 1; i++) {
            keySet.add(i + "");
         }

         Map<String, String> newMap = Maps.newHashMap();
         for (String key : keySet) {
            newMap.put(key, key);
         }
         map.putAllStrings(newMap);
         newMap.clear();

         assertConsistencyAwareMapSize(map, maxResultsForTestListings() + 1);
         assertConsistencyAwareKeySetEquals(map, keySet);
         map.clear();
         assertConsistencyAwareMapSize(map, 0);
      } finally {
         returnContainer(containerName);
      }
   }
View Full Code Here

            throw new RuntimeException(e.getMessage());
        }

        try
        {
            InputStreamMap map = context.createInputStreamMap(container);

            map.putFile(blobName, file);
            map.putFile(blobNameChecksum, checksumFile);

            // TODO: magic! in order to expose the blob as public, we need to dive into provider specific APIs
            // the hope is that permissions are encapsulated in jclouds in the future
            if (provider.contains("s3"))
            {
View Full Code Here

TOP

Related Classes of org.jclouds.blobstore.InputStreamMap$Factory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.