Class AwsContext
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.aws.AwsContext
-
public final class AwsContext extends Object
-
-
Field Summary
Fields Modifier and Type Field Description S3Directory
directory
DynamoDBClient
dynamoDBClient
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AwsContext
create(com.amazonaws.services.s3.AmazonS3 s3, String bucketName, String rootDirectory, com.amazonaws.services.dynamodbv2.AmazonDynamoDB ddb, String journalTableName, String lockTableName)
Creates the context used to interact with AWS services.static AwsContext
create(com.amazonaws.services.s3.AmazonS3 s3, String bucketName, String rootDirectory, com.amazonaws.services.dynamodbv2.AmazonDynamoDB ddb, String journalTableName, 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.String
getConfig()
String
getPath(String fileName)
void
setRemoteStoreMonitor(RemoteStoreMonitor monitor)
-
-
-
Field Detail
-
directory
public final S3Directory directory
-
dynamoDBClient
public final DynamoDBClient dynamoDBClient
-
-
Method Detail
-
create
public static AwsContext create(Configuration configuration) throws IOException
Creates the context used to interact with AWS services.- Parameters:
configuration
- The configuration used to initialize the context.- Returns:
- The context.
- Throws:
IOException
-
create
public static AwsContext create(com.amazonaws.services.s3.AmazonS3 s3, String bucketName, String rootDirectory, com.amazonaws.services.dynamodbv2.AmazonDynamoDB ddb, String journalTableName, String lockTableName) throws 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:
IOException
-
create
public static AwsContext create(com.amazonaws.services.s3.AmazonS3 s3, String bucketName, String rootDirectory, com.amazonaws.services.dynamodbv2.AmazonDynamoDB ddb, String journalTableName, String lockTableName, DynamoDBProvisioningData provisioningData) throws 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:
IOException
-
setRemoteStoreMonitor
public void setRemoteStoreMonitor(RemoteStoreMonitor monitor)
-
getConfig
public String getConfig()
-
-