Class S3Db

  • All Implemented Interfaces:
    java.lang.Comparable<S3Db>

    public class S3Db
    extends io.inversion.Db<S3Db>
    Bucket ~= Table Bucket Object field key value ~= Column Only mapping the key field since it is the only way to query anything within S3, since, as of now, you can't request files by size, or content-type, or some custom header.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class io.inversion.Rule

        io.inversion.Rule.RuleMatcher
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String awsAccessKey  
      protected java.lang.String awsRegion  
      protected java.lang.String awsSecretKey  
      protected java.util.Map<java.lang.String,​java.lang.String> bucketPrefixes  
      protected java.lang.String buckets
      bucketName,bucketName,bucketName|alias,bucketName,bucketName|alias|prefix
      • Fields inherited from class io.inversion.Db

        bootstrap, collections, dryRun, excludeColumns, includeColumns, includeTables, log, reservedParams, type
      • Fields inherited from class io.inversion.Rule

        ALL_METHODS, configMap, description, excludeMatchers, excludeOn, includeMatchers, includeOn, name, order, params
    • Constructor Summary

      Constructors 
      Constructor Description
      S3Db()  
      S3Db​(java.lang.String name, java.lang.String... includeOn)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void doDelete​(io.inversion.Collection table, java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> indexValues)  
      io.inversion.Results doSelect​(io.inversion.Collection collection, java.util.List<io.inversion.rql.Term> columnMappedTerms)  
      protected void doStartup​(io.inversion.Api api)  
      java.util.List<java.lang.String> doUpsert​(io.inversion.Collection table, java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> rows)  
      com.amazonaws.services.s3.AmazonS3 getS3Client()  
      com.amazonaws.services.s3.AmazonS3 getS3Client​(java.lang.String awsRegion, java.lang.String awsAccessKey, java.lang.String awsSecretKey)  
      S3Db withAwsAccessKey​(java.lang.String awsAccessKey)  
      S3Db withAwsRegion​(java.lang.String awsRegion)  
      S3Db withAwsSecretKey​(java.lang.String awsSecretKey)  
      • Methods inherited from class io.inversion.Db

        beautifyCollectionName, beautifyName, buildCollections, buildRelationships, castDbOutput, castJsonInput, castJsonInput, configApi, configDb, delete, doPatch, doShutdown, doShutdown, excludeTable, filterOutJsonProperty, getCollection, getCollectionByTableName, getCollections, getProperty, getType, isBootstrap, isDryRun, isRunning, isType, makeRelationshipName, mapToColumnNames, mapToColumnNames, mapToJsonNames, patch, removeCollection, select, shutdown, shutdown, startup, upsert, withBootstrap, withCollection, withCollections, withDryRun, withExcludeColumns, withIncludeColumns, withIncludeTable, withIncludeTables, withType
      • Methods inherited from class io.inversion.Rule

        afterWiringComplete, checkLazyConfig, compareTo, doLazyConfig, getAllExcludePaths, getAllIncludeMethods, getAllIncludePaths, getDefaultIncludeMatchers, getDescription, getExcludeMatchers, getIncludeMatchers, getName, getOrder, getParams, match, match, matches, matches, toString, withDescription, withExcludeOn, withExcludeOn, withIncludeOn, withIncludeOn, withName, withOrder, withParam, withParams
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • awsAccessKey

        protected java.lang.String awsAccessKey
      • awsSecretKey

        protected java.lang.String awsSecretKey
      • awsRegion

        protected java.lang.String awsRegion
      • buckets

        protected java.lang.String buckets
        bucketName,bucketName,bucketName|alias,bucketName,bucketName|alias|prefix
      • bucketPrefixes

        protected java.util.Map<java.lang.String,​java.lang.String> bucketPrefixes
    • Constructor Detail

      • S3Db

        public S3Db()
      • S3Db

        public S3Db​(java.lang.String name,
                    java.lang.String... includeOn)
    • Method Detail

      • doStartup

        protected void doStartup​(io.inversion.Api api)
        Overrides:
        doStartup in class io.inversion.Db<S3Db>
      • doSelect

        public io.inversion.Results doSelect​(io.inversion.Collection collection,
                                             java.util.List<io.inversion.rql.Term> columnMappedTerms)
                                      throws io.inversion.ApiException
        Overrides:
        doSelect in class io.inversion.Db<S3Db>
        Throws:
        io.inversion.ApiException
      • doUpsert

        public java.util.List<java.lang.String> doUpsert​(io.inversion.Collection table,
                                                         java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> rows)
                                                  throws io.inversion.ApiException
        Overrides:
        doUpsert in class io.inversion.Db<S3Db>
        Throws:
        io.inversion.ApiException
      • doDelete

        public void doDelete​(io.inversion.Collection table,
                             java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> indexValues)
                      throws io.inversion.ApiException
        Overrides:
        doDelete in class io.inversion.Db<S3Db>
        Throws:
        io.inversion.ApiException
      • getS3Client

        public com.amazonaws.services.s3.AmazonS3 getS3Client()
      • getS3Client

        public com.amazonaws.services.s3.AmazonS3 getS3Client​(java.lang.String awsRegion,
                                                              java.lang.String awsAccessKey,
                                                              java.lang.String awsSecretKey)
      • withAwsRegion

        public S3Db withAwsRegion​(java.lang.String awsRegion)
      • withAwsAccessKey

        public S3Db withAwsAccessKey​(java.lang.String awsAccessKey)
      • withAwsSecretKey

        public S3Db withAwsSecretKey​(java.lang.String awsSecretKey)