Class AwsContext


  • public final class AwsContext
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static AwsContext create​(com.amazonaws.services.s3.AmazonS3 s3, java.lang.String bucketName, java.lang.String rootDirectory, com.amazonaws.services.dynamodbv2.AmazonDynamoDB ddb, java.lang.String journalTableName, java.lang.String lockTableName)
      Creates the context used to interact with AWS services.
      static AwsContext create​(com.amazonaws.services.s3.AmazonS3 s3, java.lang.String bucketName, java.lang.String rootDirectory, com.amazonaws.services.dynamodbv2.AmazonDynamoDB ddb, java.lang.String journalTableName, java.lang.String lockTableName, DynamoDBProvisioningData provisioningData)
      Creates the context used to interact with AWS services.
      static AwsContext create​(Configuration configuration)
      Creates the context used to interact with AWS services.
      java.lang.String getConfig()  
      java.lang.String getPath​(java.lang.String fileName)  
      void setRemoteStoreMonitor​(RemoteStoreMonitor monitor)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        public static AwsContext create​(Configuration configuration)
                                 throws java.io.IOException
        Creates the context used to interact with AWS services.
        Parameters:
        configuration - The configuration used to initialize the context.
        Returns:
        The context.
        Throws:
        java.io.IOException
      • create

        public static AwsContext create​(com.amazonaws.services.s3.AmazonS3 s3,
                                        java.lang.String bucketName,
                                        java.lang.String rootDirectory,
                                        com.amazonaws.services.dynamodbv2.AmazonDynamoDB ddb,
                                        java.lang.String journalTableName,
                                        java.lang.String lockTableName)
                                 throws java.io.IOException
        Creates the context used to interact with AWS services.
        Parameters:
        s3 - Client for accessing Amazon S3.
        bucketName - Name for the bucket that will store segments.
        rootDirectory - The root directory under which the segment store is setup.
        ddb - Client for accessing Amazon DynamoDB.
        journalTableName - Name of table used for storing log entries for journal and gc. The table will be created if it doesn't already exist. It should have a partition key on "DynamoDBClient.TABLE_ATTR_FILENAME" and sort key on "DynamoDBClient.TABLE_ATTR_TIMESTAMP".
        lockTableName - Name of table used for managing the distributed lock. The table will be created if it doesn't already exist. It should have a partition key on "DynamoDBClient.LOCKTABLE_KEY".
        Returns:
        The context.
        Throws:
        java.io.IOException
      • create

        public static AwsContext create​(com.amazonaws.services.s3.AmazonS3 s3,
                                        java.lang.String bucketName,
                                        java.lang.String rootDirectory,
                                        com.amazonaws.services.dynamodbv2.AmazonDynamoDB ddb,
                                        java.lang.String journalTableName,
                                        java.lang.String lockTableName,
                                        DynamoDBProvisioningData provisioningData)
                                 throws java.io.IOException
        Creates the context used to interact with AWS services.
        Parameters:
        s3 - Client for accessing Amazon S3.
        bucketName - Name for the bucket that will store segments.
        rootDirectory - The root directory under which the segment store is setup.
        ddb - Client for accessing Amazon DynamoDB.
        journalTableName - Name of table used for storing log entries for journal and gc. The table will be created if it doesn't already exist. It should have a partition key on "DynamoDBClient.TABLE_ATTR_FILENAME" and sort key on "DynamoDBClient.TABLE_ATTR_TIMESTAMP".
        lockTableName - Name of table used for managing the distributed lock. The table will be created if it doesn't already exist. It should have a partition key on "DynamoDBClient.LOCKTABLE_KEY".
        provisioningData - DynamoDB provisioning data
        Returns:
        The context.
        Throws:
        java.io.IOException
      • setRemoteStoreMonitor

        public void setRemoteStoreMonitor​(RemoteStoreMonitor monitor)
      • getPath

        public java.lang.String getPath​(java.lang.String fileName)
      • getConfig

        public java.lang.String getConfig()