public abstract class BaseStreamingTaskRunner extends Object implements TaskRunner
Modifier and Type | Class and Description |
---|---|
static class |
BaseStreamingTaskRunner.STREAMING_TYPE |
Modifier and Type | Field and Description |
---|---|
protected String |
cfAccountId |
protected com.amazonaws.services.cloudfront.AmazonCloudFrontClient |
cfClient |
protected String |
cfKeyId |
protected String |
cfKeyPath |
protected static int |
maxRetries |
static String |
S3_ORIGIN_OAI_PREFIX |
static String |
S3_ORIGIN_SUFFIX |
protected com.amazonaws.services.s3.AmazonS3Client |
s3Client |
protected StorageProvider |
s3Provider |
static String |
STREAMING_HOST_PROP |
static String |
STREAMING_TYPE_PROP |
protected S3StorageProvider |
unwrappedS3Provider |
Constructor and Description |
---|
BaseStreamingTaskRunner() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkThatStreamingServiceIsEnabled(StorageProvider s3Provider,
String spaceId,
String taskName) |
protected List<com.amazonaws.services.cloudfront.model.StreamingDistributionSummary> |
getAllExistingDistributions(String bucketName) |
protected com.amazonaws.services.cloudfront.model.StreamingDistributionSummary |
getExistingDistribution(String bucketName) |
abstract String |
getName() |
protected Iterator<String> |
getSpaceContents(String spaceId) |
abstract String |
performTask(String taskParameters) |
protected void |
removeStreamingHostFromSpaceProps(String spaceId) |
protected void |
setDistributionState(String distId,
boolean enabled)
Enables or disables an existing distribution
|
protected void |
wait(int index) |
public static final String STREAMING_HOST_PROP
public static final String STREAMING_TYPE_PROP
public static final String S3_ORIGIN_SUFFIX
public static final String S3_ORIGIN_OAI_PREFIX
protected static final int maxRetries
protected StorageProvider s3Provider
protected S3StorageProvider unwrappedS3Provider
protected com.amazonaws.services.s3.AmazonS3Client s3Client
protected com.amazonaws.services.cloudfront.AmazonCloudFrontClient cfClient
protected String cfAccountId
protected String cfKeyId
protected String cfKeyPath
public abstract String getName()
getName
in interface TaskRunner
public abstract String performTask(String taskParameters)
performTask
in interface TaskRunner
protected com.amazonaws.services.cloudfront.model.StreamingDistributionSummary getExistingDistribution(String bucketName)
protected List<com.amazonaws.services.cloudfront.model.StreamingDistributionSummary> getAllExistingDistributions(String bucketName)
protected void setDistributionState(String distId, boolean enabled)
distId
- the ID of the distributionenabled
- true to enable, false to disableprotected void removeStreamingHostFromSpaceProps(String spaceId)
protected void wait(int index)
protected void checkThatStreamingServiceIsEnabled(StorageProvider s3Provider, String spaceId, String taskName)
Copyright © 2009–2016 DuraSpace. All rights reserved.