Package org.infinispan.loaders.s3

Examples of org.infinispan.loaders.s3.S3CacheStoreIntegrationTest


         Module loggingModule = org.infinispan.util.logging.LogFactory.IS_LOG4J_AVAILABLE ? new Log4JLoggingModule()
               : new JDKLoggingModule();
         this.context = S3ContextFactory.createContext(config.getAwsAccessKey(),config.getAwsSecretKey()).withModules(new HttpNioConnectionPoolClientModule(), loggingModule).build();
         this.s3Service = context.getConnection();
         if (this.s3Service == null) {
            throw new S3ConnectionException("Could not connect");
         }

      } catch (Exception ex) {
         throw convertToS3ConnectionException("Exception connecting to s3",
                                              ex);
View Full Code Here


   }

   S3ConnectionException convertToS3ConnectionException(String message,
                                                        Exception caught) {
      return (caught instanceof S3ConnectionException) ? (S3ConnectionException) caught
            : new S3ConnectionException(message, caught);
   }
View Full Code Here

               : new JDKLoggingModule();
         this.context = S3ContextFactory.createS3Context(properties,
                                                         new HttpNioConnectionPoolClientModule(), loggingModule);
         this.s3Service = context.getConnection();
         if (this.s3Service == null) {
            throw new S3ConnectionException("Could not connect");
         }

      } catch (Exception ex) {
         throw convertToS3ConnectionException("Exception connecting to s3",
                                              ex);
View Full Code Here

   }

   S3ConnectionException convertToS3ConnectionException(String message,
                                                        Exception caught) {
      return (caught instanceof S3ConnectionException) ? (S3ConnectionException) caught
            : new S3ConnectionException(message, caught);
   }
View Full Code Here

      if (stream == null)
         return;
      try {
         stream.close();
      } catch (Exception e) {
         throw new S3ConnectionException("Problems closing input stream", e);
      }
   }
View Full Code Here

      this.config = (S3CacheStoreConfig) cfg;
      S3Bucket cloudsBucket;
      S3Connection cloudsConnection;
      try {
         cloudsConnection = config.getConnectionClass() != null ? (S3Connection) Util.getInstance(config.getConnectionClass()) : new JCloudsConnection();
         cloudsBucket = config.getBucketClass()!=null ? (S3Bucket) Util.getInstance(config.getBucketClass()) : new JCloudsBucket();
      } catch (Exception e) {
         throw new CacheLoaderException(e);
      }
      init(cfg, cache, m, cloudsConnection, cloudsBucket);
   }
View Full Code Here

   /**
    * {@inheritDoc} This initializes the internal <tt>s3Connection</tt> to a default implementation
    */
   public void init(CacheLoaderConfig config, Cache cache, Marshaller m) {
      init(config, cache, m, new JCloudsConnection(), new JCloudsBucket());
   }
View Full Code Here

   public void init(CacheLoaderConfig cfg, Cache cache, Marshaller m) throws CacheLoaderException {
      this.config = (S3CacheStoreConfig) cfg;
      S3Bucket cloudsBucket;
      S3Connection cloudsConnection;
      try {
         cloudsConnection = config.getConnectionClass() != null ? (S3Connection) Util.getInstance(config.getConnectionClass()) : new JCloudsConnection();
         cloudsBucket = config.getBucketClass()!=null ? (S3Bucket) Util.getInstance(config.getBucketClass()) : new JCloudsBucket();
      } catch (Exception e) {
         throw new CacheLoaderException(e);
      }
      init(cfg, cache, m, cloudsConnection, cloudsBucket);
View Full Code Here

   /**
    * {@inheritDoc} This initializes the internal <tt>s3Connection</tt> to a default implementation
    */
   public void init(CacheLoaderConfig config, Cache cache, Marshaller m) {
      init(config, cache, m, new JCloudsConnection(), new JCloudsBucket());
   }
View Full Code Here

TOP

Related Classes of org.infinispan.loaders.s3.S3CacheStoreIntegrationTest

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.