id
int32 0
165k
| repo
stringlengths 7
58
| path
stringlengths 12
218
| func_name
stringlengths 3
140
| original_string
stringlengths 73
34.1k
| language
stringclasses 1
value | code
stringlengths 73
34.1k
| code_tokens
list | docstring
stringlengths 3
16k
| docstring_tokens
list | sha
stringlengths 40
40
| url
stringlengths 105
339
|
|---|---|---|---|---|---|---|---|---|---|---|---|
19,700
|
aws/aws-sdk-java
|
aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/ListResourceDefinitionsResult.java
|
ListResourceDefinitionsResult.setDefinitions
|
public void setDefinitions(java.util.Collection<DefinitionInformation> definitions) {
if (definitions == null) {
this.definitions = null;
return;
}
this.definitions = new java.util.ArrayList<DefinitionInformation>(definitions);
}
|
java
|
public void setDefinitions(java.util.Collection<DefinitionInformation> definitions) {
if (definitions == null) {
this.definitions = null;
return;
}
this.definitions = new java.util.ArrayList<DefinitionInformation>(definitions);
}
|
[
"public",
"void",
"setDefinitions",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"DefinitionInformation",
">",
"definitions",
")",
"{",
"if",
"(",
"definitions",
"==",
"null",
")",
"{",
"this",
".",
"definitions",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"definitions",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"DefinitionInformation",
">",
"(",
"definitions",
")",
";",
"}"
] |
Information about a definition.
@param definitions
Information about a definition.
|
[
"Information",
"about",
"a",
"definition",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/ListResourceDefinitionsResult.java#L48-L55
|
19,701
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/http/AmazonHttpClient.java
|
AmazonHttpClient.shutdown
|
public void shutdown() {
clientExecutionTimer.shutdown();
httpRequestTimer.shutdown();
IdleConnectionReaper.removeConnectionManager(httpClient.getHttpClientConnectionManager());
httpClient.getHttpClientConnectionManager().shutdown();
}
|
java
|
public void shutdown() {
clientExecutionTimer.shutdown();
httpRequestTimer.shutdown();
IdleConnectionReaper.removeConnectionManager(httpClient.getHttpClientConnectionManager());
httpClient.getHttpClientConnectionManager().shutdown();
}
|
[
"public",
"void",
"shutdown",
"(",
")",
"{",
"clientExecutionTimer",
".",
"shutdown",
"(",
")",
";",
"httpRequestTimer",
".",
"shutdown",
"(",
")",
";",
"IdleConnectionReaper",
".",
"removeConnectionManager",
"(",
"httpClient",
".",
"getHttpClientConnectionManager",
"(",
")",
")",
";",
"httpClient",
".",
"getHttpClientConnectionManager",
"(",
")",
".",
"shutdown",
"(",
")",
";",
"}"
] |
Shuts down this HTTP client object, releasing any resources that might be held open. This is
an optional method, and callers are not expected to call it, but can if they want to
explicitly release any open resources. Once a client has been shutdown, it cannot be used to
make more requests.
|
[
"Shuts",
"down",
"this",
"HTTP",
"client",
"object",
"releasing",
"any",
"resources",
"that",
"might",
"be",
"held",
"open",
".",
"This",
"is",
"an",
"optional",
"method",
"and",
"callers",
"are",
"not",
"expected",
"to",
"call",
"it",
"but",
"can",
"if",
"they",
"want",
"to",
"explicitly",
"release",
"any",
"open",
"resources",
".",
"Once",
"a",
"client",
"has",
"been",
"shutdown",
"it",
"cannot",
"be",
"used",
"to",
"make",
"more",
"requests",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/http/AmazonHttpClient.java#L431-L436
|
19,702
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/http/AmazonHttpClient.java
|
AmazonHttpClient.getNonNullResponseHandler
|
private <T> HttpResponseHandler<T> getNonNullResponseHandler(
HttpResponseHandler<T> responseHandler) {
if (responseHandler != null) {
return responseHandler;
} else {
// Return a Dummy, No-Op handler
return new HttpResponseHandler<T>() {
@Override
public T handle(HttpResponse response) throws Exception {
return null;
}
@Override
public boolean needsConnectionLeftOpen() {
return false;
}
};
}
}
|
java
|
private <T> HttpResponseHandler<T> getNonNullResponseHandler(
HttpResponseHandler<T> responseHandler) {
if (responseHandler != null) {
return responseHandler;
} else {
// Return a Dummy, No-Op handler
return new HttpResponseHandler<T>() {
@Override
public T handle(HttpResponse response) throws Exception {
return null;
}
@Override
public boolean needsConnectionLeftOpen() {
return false;
}
};
}
}
|
[
"private",
"<",
"T",
">",
"HttpResponseHandler",
"<",
"T",
">",
"getNonNullResponseHandler",
"(",
"HttpResponseHandler",
"<",
"T",
">",
"responseHandler",
")",
"{",
"if",
"(",
"responseHandler",
"!=",
"null",
")",
"{",
"return",
"responseHandler",
";",
"}",
"else",
"{",
"// Return a Dummy, No-Op handler",
"return",
"new",
"HttpResponseHandler",
"<",
"T",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"T",
"handle",
"(",
"HttpResponse",
"response",
")",
"throws",
"Exception",
"{",
"return",
"null",
";",
"}",
"@",
"Override",
"public",
"boolean",
"needsConnectionLeftOpen",
"(",
")",
"{",
"return",
"false",
";",
"}",
"}",
";",
"}",
"}"
] |
Ensures the response handler is not null. If it is this method returns a dummy response
handler.
@return Either original response handler or dummy response handler.
|
[
"Ensures",
"the",
"response",
"handler",
"is",
"not",
"null",
".",
"If",
"it",
"is",
"this",
"method",
"returns",
"a",
"dummy",
"response",
"handler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/http/AmazonHttpClient.java#L541-L560
|
19,703
|
aws/aws-sdk-java
|
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/AddOperations.java
|
AddOperations.getHttpStatusCode
|
private Integer getHttpStatusCode(ErrorMap error, Shape shape) {
final Integer httpStatusCode = getHttpStatusCode(error.getErrorTrait());
return httpStatusCode == null ? getHttpStatusCode(shape.getErrorTrait()) : httpStatusCode;
}
|
java
|
private Integer getHttpStatusCode(ErrorMap error, Shape shape) {
final Integer httpStatusCode = getHttpStatusCode(error.getErrorTrait());
return httpStatusCode == null ? getHttpStatusCode(shape.getErrorTrait()) : httpStatusCode;
}
|
[
"private",
"Integer",
"getHttpStatusCode",
"(",
"ErrorMap",
"error",
",",
"Shape",
"shape",
")",
"{",
"final",
"Integer",
"httpStatusCode",
"=",
"getHttpStatusCode",
"(",
"error",
".",
"getErrorTrait",
"(",
")",
")",
";",
"return",
"httpStatusCode",
"==",
"null",
"?",
"getHttpStatusCode",
"(",
"shape",
".",
"getErrorTrait",
"(",
")",
")",
":",
"httpStatusCode",
";",
"}"
] |
Get HTTP status code either from error trait on the operation reference or the error trait on the shape.
@param error ErrorMap on operation reference.
@param shape Error shape.
@return HTTP status code or null if not present.
|
[
"Get",
"HTTP",
"status",
"code",
"either",
"from",
"error",
"trait",
"on",
"the",
"operation",
"reference",
"or",
"the",
"error",
"trait",
"on",
"the",
"shape",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/AddOperations.java#L130-L133
|
19,704
|
aws/aws-sdk-java
|
aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/model/ResourceTags.java
|
ResourceTags.withTags
|
public ResourceTags withTags(java.util.Map<String, String> tags) {
setTags(tags);
return this;
}
|
java
|
public ResourceTags withTags(java.util.Map<String, String> tags) {
setTags(tags);
return this;
}
|
[
"public",
"ResourceTags",
"withTags",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"tags",
")",
"{",
"setTags",
"(",
"tags",
")",
";",
"return",
"this",
";",
"}"
] |
The tags for the resource.
@param tags
The tags for the resource.
@return Returns a reference to this object so that method calls can be chained together.
|
[
"The",
"tags",
"for",
"the",
"resource",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/model/ResourceTags.java#L97-L100
|
19,705
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/BucketConfigurationXmlFactory.java
|
BucketConfigurationXmlFactory.convertToXmlByteArray
|
public byte[] convertToXmlByteArray(BucketVersioningConfiguration versioningConfiguration) {
XmlWriter xml = new XmlWriter();
xml.start("VersioningConfiguration", "xmlns", Constants.XML_NAMESPACE);
xml.start("Status").value(versioningConfiguration.getStatus()).end();
Boolean mfaDeleteEnabled = versioningConfiguration.isMfaDeleteEnabled();
if (mfaDeleteEnabled != null) {
if (mfaDeleteEnabled) {
xml.start("MfaDelete").value("Enabled").end();
} else {
xml.start("MfaDelete").value("Disabled").end();
}
}
xml.end();
return xml.getBytes();
}
|
java
|
public byte[] convertToXmlByteArray(BucketVersioningConfiguration versioningConfiguration) {
XmlWriter xml = new XmlWriter();
xml.start("VersioningConfiguration", "xmlns", Constants.XML_NAMESPACE);
xml.start("Status").value(versioningConfiguration.getStatus()).end();
Boolean mfaDeleteEnabled = versioningConfiguration.isMfaDeleteEnabled();
if (mfaDeleteEnabled != null) {
if (mfaDeleteEnabled) {
xml.start("MfaDelete").value("Enabled").end();
} else {
xml.start("MfaDelete").value("Disabled").end();
}
}
xml.end();
return xml.getBytes();
}
|
[
"public",
"byte",
"[",
"]",
"convertToXmlByteArray",
"(",
"BucketVersioningConfiguration",
"versioningConfiguration",
")",
"{",
"XmlWriter",
"xml",
"=",
"new",
"XmlWriter",
"(",
")",
";",
"xml",
".",
"start",
"(",
"\"VersioningConfiguration\"",
",",
"\"xmlns\"",
",",
"Constants",
".",
"XML_NAMESPACE",
")",
";",
"xml",
".",
"start",
"(",
"\"Status\"",
")",
".",
"value",
"(",
"versioningConfiguration",
".",
"getStatus",
"(",
")",
")",
".",
"end",
"(",
")",
";",
"Boolean",
"mfaDeleteEnabled",
"=",
"versioningConfiguration",
".",
"isMfaDeleteEnabled",
"(",
")",
";",
"if",
"(",
"mfaDeleteEnabled",
"!=",
"null",
")",
"{",
"if",
"(",
"mfaDeleteEnabled",
")",
"{",
"xml",
".",
"start",
"(",
"\"MfaDelete\"",
")",
".",
"value",
"(",
"\"Enabled\"",
")",
".",
"end",
"(",
")",
";",
"}",
"else",
"{",
"xml",
".",
"start",
"(",
"\"MfaDelete\"",
")",
".",
"value",
"(",
"\"Disabled\"",
")",
".",
"end",
"(",
")",
";",
"}",
"}",
"xml",
".",
"end",
"(",
")",
";",
"return",
"xml",
".",
"getBytes",
"(",
")",
";",
"}"
] |
Converts the specified versioning configuration into an XML byte array.
@param versioningConfiguration
The configuration to convert.
@return The XML byte array representation.
|
[
"Converts",
"the",
"specified",
"versioning",
"configuration",
"into",
"an",
"XML",
"byte",
"array",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/BucketConfigurationXmlFactory.java#L109-L126
|
19,706
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/BucketConfigurationXmlFactory.java
|
BucketConfigurationXmlFactory.convertToXmlByteArray
|
public byte[] convertToXmlByteArray(BucketAccelerateConfiguration accelerateConfiguration) {
XmlWriter xml = new XmlWriter();
xml.start("AccelerateConfiguration", "xmlns", Constants.XML_NAMESPACE);
xml.start("Status").value(accelerateConfiguration.getStatus()).end();
xml.end();
return xml.getBytes();
}
|
java
|
public byte[] convertToXmlByteArray(BucketAccelerateConfiguration accelerateConfiguration) {
XmlWriter xml = new XmlWriter();
xml.start("AccelerateConfiguration", "xmlns", Constants.XML_NAMESPACE);
xml.start("Status").value(accelerateConfiguration.getStatus()).end();
xml.end();
return xml.getBytes();
}
|
[
"public",
"byte",
"[",
"]",
"convertToXmlByteArray",
"(",
"BucketAccelerateConfiguration",
"accelerateConfiguration",
")",
"{",
"XmlWriter",
"xml",
"=",
"new",
"XmlWriter",
"(",
")",
";",
"xml",
".",
"start",
"(",
"\"AccelerateConfiguration\"",
",",
"\"xmlns\"",
",",
"Constants",
".",
"XML_NAMESPACE",
")",
";",
"xml",
".",
"start",
"(",
"\"Status\"",
")",
".",
"value",
"(",
"accelerateConfiguration",
".",
"getStatus",
"(",
")",
")",
".",
"end",
"(",
")",
";",
"xml",
".",
"end",
"(",
")",
";",
"return",
"xml",
".",
"getBytes",
"(",
")",
";",
"}"
] |
Converts the specified accelerate configuration into an XML byte array.
@param accelerateConfiguration
The configuration to convert.
@return The XML byte array representation.
|
[
"Converts",
"the",
"specified",
"accelerate",
"configuration",
"into",
"an",
"XML",
"byte",
"array",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/BucketConfigurationXmlFactory.java#L136-L142
|
19,707
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/BucketConfigurationXmlFactory.java
|
BucketConfigurationXmlFactory.convertToXmlByteArray
|
public byte[] convertToXmlByteArray(BucketLoggingConfiguration loggingConfiguration) {
// Default log file prefix to the empty string if none is specified
String logFilePrefix = loggingConfiguration.getLogFilePrefix();
if (logFilePrefix == null)
logFilePrefix = "";
XmlWriter xml = new XmlWriter();
xml.start("BucketLoggingStatus", "xmlns", Constants.XML_NAMESPACE);
if (loggingConfiguration.isLoggingEnabled()) {
xml.start("LoggingEnabled");
xml.start("TargetBucket").value(loggingConfiguration.getDestinationBucketName()).end();
xml.start("TargetPrefix").value(loggingConfiguration.getLogFilePrefix()).end();
xml.end();
}
xml.end();
return xml.getBytes();
}
|
java
|
public byte[] convertToXmlByteArray(BucketLoggingConfiguration loggingConfiguration) {
// Default log file prefix to the empty string if none is specified
String logFilePrefix = loggingConfiguration.getLogFilePrefix();
if (logFilePrefix == null)
logFilePrefix = "";
XmlWriter xml = new XmlWriter();
xml.start("BucketLoggingStatus", "xmlns", Constants.XML_NAMESPACE);
if (loggingConfiguration.isLoggingEnabled()) {
xml.start("LoggingEnabled");
xml.start("TargetBucket").value(loggingConfiguration.getDestinationBucketName()).end();
xml.start("TargetPrefix").value(loggingConfiguration.getLogFilePrefix()).end();
xml.end();
}
xml.end();
return xml.getBytes();
}
|
[
"public",
"byte",
"[",
"]",
"convertToXmlByteArray",
"(",
"BucketLoggingConfiguration",
"loggingConfiguration",
")",
"{",
"// Default log file prefix to the empty string if none is specified",
"String",
"logFilePrefix",
"=",
"loggingConfiguration",
".",
"getLogFilePrefix",
"(",
")",
";",
"if",
"(",
"logFilePrefix",
"==",
"null",
")",
"logFilePrefix",
"=",
"\"\"",
";",
"XmlWriter",
"xml",
"=",
"new",
"XmlWriter",
"(",
")",
";",
"xml",
".",
"start",
"(",
"\"BucketLoggingStatus\"",
",",
"\"xmlns\"",
",",
"Constants",
".",
"XML_NAMESPACE",
")",
";",
"if",
"(",
"loggingConfiguration",
".",
"isLoggingEnabled",
"(",
")",
")",
"{",
"xml",
".",
"start",
"(",
"\"LoggingEnabled\"",
")",
";",
"xml",
".",
"start",
"(",
"\"TargetBucket\"",
")",
".",
"value",
"(",
"loggingConfiguration",
".",
"getDestinationBucketName",
"(",
")",
")",
".",
"end",
"(",
")",
";",
"xml",
".",
"start",
"(",
"\"TargetPrefix\"",
")",
".",
"value",
"(",
"loggingConfiguration",
".",
"getLogFilePrefix",
"(",
")",
")",
".",
"end",
"(",
")",
";",
"xml",
".",
"end",
"(",
")",
";",
"}",
"xml",
".",
"end",
"(",
")",
";",
"return",
"xml",
".",
"getBytes",
"(",
")",
";",
"}"
] |
Converts the specified logging configuration into an XML byte array.
@param loggingConfiguration
The configuration to convert.
@return The XML byte array representation.
|
[
"Converts",
"the",
"specified",
"logging",
"configuration",
"into",
"an",
"XML",
"byte",
"array",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/BucketConfigurationXmlFactory.java#L152-L169
|
19,708
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/BucketConfigurationXmlFactory.java
|
BucketConfigurationXmlFactory.convertToXmlByteArray
|
public byte[] convertToXmlByteArray(
BucketNotificationConfiguration notificationConfiguration) {
XmlWriter xml = new XmlWriter();
xml.start("NotificationConfiguration", "xmlns", Constants.XML_NAMESPACE);
Map<String, NotificationConfiguration> configurations = notificationConfiguration
.getConfigurations();
for (Map.Entry<String, NotificationConfiguration> entry : configurations
.entrySet()) {
String configName = entry.getKey();
NotificationConfiguration config = entry.getValue();
if (config instanceof TopicConfiguration) {
xml.start("TopicConfiguration");
xml.start("Id").value(configName).end();
xml.start("Topic")
.value(((TopicConfiguration) config).getTopicARN())
.end();
addEventsAndFilterCriteria(xml, config);
xml.end();
} else if (config instanceof QueueConfiguration) {
xml.start("QueueConfiguration");
xml.start("Id").value(configName).end();
xml.start("Queue")
.value(((QueueConfiguration) config).getQueueARN())
.end();
addEventsAndFilterCriteria(xml, config);
xml.end();
} else if (config instanceof CloudFunctionConfiguration) {
xml.start("CloudFunctionConfiguration");
xml.start("Id").value(configName).end();
xml.start("InvocationRole")
.value(((CloudFunctionConfiguration) config)
.getInvocationRoleARN()).end();
xml.start("CloudFunction")
.value(((CloudFunctionConfiguration) config).getCloudFunctionARN())
.end();
addEventsAndFilterCriteria(xml, config);
xml.end();
} else if (config instanceof LambdaConfiguration) {
xml.start("CloudFunctionConfiguration");
xml.start("Id").value(configName).end();
xml.start("CloudFunction")
.value(((LambdaConfiguration) config).getFunctionARN())
.end();
addEventsAndFilterCriteria(xml, config);
xml.end();
}
}
xml.end();
return xml.getBytes();
}
|
java
|
public byte[] convertToXmlByteArray(
BucketNotificationConfiguration notificationConfiguration) {
XmlWriter xml = new XmlWriter();
xml.start("NotificationConfiguration", "xmlns", Constants.XML_NAMESPACE);
Map<String, NotificationConfiguration> configurations = notificationConfiguration
.getConfigurations();
for (Map.Entry<String, NotificationConfiguration> entry : configurations
.entrySet()) {
String configName = entry.getKey();
NotificationConfiguration config = entry.getValue();
if (config instanceof TopicConfiguration) {
xml.start("TopicConfiguration");
xml.start("Id").value(configName).end();
xml.start("Topic")
.value(((TopicConfiguration) config).getTopicARN())
.end();
addEventsAndFilterCriteria(xml, config);
xml.end();
} else if (config instanceof QueueConfiguration) {
xml.start("QueueConfiguration");
xml.start("Id").value(configName).end();
xml.start("Queue")
.value(((QueueConfiguration) config).getQueueARN())
.end();
addEventsAndFilterCriteria(xml, config);
xml.end();
} else if (config instanceof CloudFunctionConfiguration) {
xml.start("CloudFunctionConfiguration");
xml.start("Id").value(configName).end();
xml.start("InvocationRole")
.value(((CloudFunctionConfiguration) config)
.getInvocationRoleARN()).end();
xml.start("CloudFunction")
.value(((CloudFunctionConfiguration) config).getCloudFunctionARN())
.end();
addEventsAndFilterCriteria(xml, config);
xml.end();
} else if (config instanceof LambdaConfiguration) {
xml.start("CloudFunctionConfiguration");
xml.start("Id").value(configName).end();
xml.start("CloudFunction")
.value(((LambdaConfiguration) config).getFunctionARN())
.end();
addEventsAndFilterCriteria(xml, config);
xml.end();
}
}
xml.end();
return xml.getBytes();
}
|
[
"public",
"byte",
"[",
"]",
"convertToXmlByteArray",
"(",
"BucketNotificationConfiguration",
"notificationConfiguration",
")",
"{",
"XmlWriter",
"xml",
"=",
"new",
"XmlWriter",
"(",
")",
";",
"xml",
".",
"start",
"(",
"\"NotificationConfiguration\"",
",",
"\"xmlns\"",
",",
"Constants",
".",
"XML_NAMESPACE",
")",
";",
"Map",
"<",
"String",
",",
"NotificationConfiguration",
">",
"configurations",
"=",
"notificationConfiguration",
".",
"getConfigurations",
"(",
")",
";",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"NotificationConfiguration",
">",
"entry",
":",
"configurations",
".",
"entrySet",
"(",
")",
")",
"{",
"String",
"configName",
"=",
"entry",
".",
"getKey",
"(",
")",
";",
"NotificationConfiguration",
"config",
"=",
"entry",
".",
"getValue",
"(",
")",
";",
"if",
"(",
"config",
"instanceof",
"TopicConfiguration",
")",
"{",
"xml",
".",
"start",
"(",
"\"TopicConfiguration\"",
")",
";",
"xml",
".",
"start",
"(",
"\"Id\"",
")",
".",
"value",
"(",
"configName",
")",
".",
"end",
"(",
")",
";",
"xml",
".",
"start",
"(",
"\"Topic\"",
")",
".",
"value",
"(",
"(",
"(",
"TopicConfiguration",
")",
"config",
")",
".",
"getTopicARN",
"(",
")",
")",
".",
"end",
"(",
")",
";",
"addEventsAndFilterCriteria",
"(",
"xml",
",",
"config",
")",
";",
"xml",
".",
"end",
"(",
")",
";",
"}",
"else",
"if",
"(",
"config",
"instanceof",
"QueueConfiguration",
")",
"{",
"xml",
".",
"start",
"(",
"\"QueueConfiguration\"",
")",
";",
"xml",
".",
"start",
"(",
"\"Id\"",
")",
".",
"value",
"(",
"configName",
")",
".",
"end",
"(",
")",
";",
"xml",
".",
"start",
"(",
"\"Queue\"",
")",
".",
"value",
"(",
"(",
"(",
"QueueConfiguration",
")",
"config",
")",
".",
"getQueueARN",
"(",
")",
")",
".",
"end",
"(",
")",
";",
"addEventsAndFilterCriteria",
"(",
"xml",
",",
"config",
")",
";",
"xml",
".",
"end",
"(",
")",
";",
"}",
"else",
"if",
"(",
"config",
"instanceof",
"CloudFunctionConfiguration",
")",
"{",
"xml",
".",
"start",
"(",
"\"CloudFunctionConfiguration\"",
")",
";",
"xml",
".",
"start",
"(",
"\"Id\"",
")",
".",
"value",
"(",
"configName",
")",
".",
"end",
"(",
")",
";",
"xml",
".",
"start",
"(",
"\"InvocationRole\"",
")",
".",
"value",
"(",
"(",
"(",
"CloudFunctionConfiguration",
")",
"config",
")",
".",
"getInvocationRoleARN",
"(",
")",
")",
".",
"end",
"(",
")",
";",
"xml",
".",
"start",
"(",
"\"CloudFunction\"",
")",
".",
"value",
"(",
"(",
"(",
"CloudFunctionConfiguration",
")",
"config",
")",
".",
"getCloudFunctionARN",
"(",
")",
")",
".",
"end",
"(",
")",
";",
"addEventsAndFilterCriteria",
"(",
"xml",
",",
"config",
")",
";",
"xml",
".",
"end",
"(",
")",
";",
"}",
"else",
"if",
"(",
"config",
"instanceof",
"LambdaConfiguration",
")",
"{",
"xml",
".",
"start",
"(",
"\"CloudFunctionConfiguration\"",
")",
";",
"xml",
".",
"start",
"(",
"\"Id\"",
")",
".",
"value",
"(",
"configName",
")",
".",
"end",
"(",
")",
";",
"xml",
".",
"start",
"(",
"\"CloudFunction\"",
")",
".",
"value",
"(",
"(",
"(",
"LambdaConfiguration",
")",
"config",
")",
".",
"getFunctionARN",
"(",
")",
")",
".",
"end",
"(",
")",
";",
"addEventsAndFilterCriteria",
"(",
"xml",
",",
"config",
")",
";",
"xml",
".",
"end",
"(",
")",
";",
"}",
"}",
"xml",
".",
"end",
"(",
")",
";",
"return",
"xml",
".",
"getBytes",
"(",
")",
";",
"}"
] |
Converts the specified notification configuration into an XML byte array.
@param notificationConfiguration
The configuration to convert.
@return The XML byte array representation.
|
[
"Converts",
"the",
"specified",
"notification",
"configuration",
"into",
"an",
"XML",
"byte",
"array",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/BucketConfigurationXmlFactory.java#L179-L229
|
19,709
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/BucketConfigurationXmlFactory.java
|
BucketConfigurationXmlFactory.convertToXmlByteArray
|
public byte[] convertToXmlByteArray(BucketWebsiteConfiguration websiteConfiguration) {
XmlWriter xml = new XmlWriter();
xml.start("WebsiteConfiguration", "xmlns", Constants.XML_NAMESPACE);
if (websiteConfiguration.getIndexDocumentSuffix() != null) {
XmlWriter indexDocumentElement = xml.start("IndexDocument");
indexDocumentElement.start("Suffix").value(websiteConfiguration.getIndexDocumentSuffix()).end();
indexDocumentElement.end();
}
if (websiteConfiguration.getErrorDocument() != null) {
XmlWriter errorDocumentElement = xml.start("ErrorDocument");
errorDocumentElement.start("Key").value(websiteConfiguration.getErrorDocument()).end();
errorDocumentElement.end();
}
RedirectRule redirectAllRequestsTo = websiteConfiguration.getRedirectAllRequestsTo();
if (redirectAllRequestsTo != null) {
XmlWriter redirectAllRequestsElement = xml.start("RedirectAllRequestsTo");
if (redirectAllRequestsTo.getprotocol() != null) {
xml.start("Protocol").value(redirectAllRequestsTo.getprotocol()).end();
}
if (redirectAllRequestsTo.getHostName() != null) {
xml.start("HostName").value(redirectAllRequestsTo.getHostName()).end();
}
if (redirectAllRequestsTo.getReplaceKeyPrefixWith() != null) {
xml.start("ReplaceKeyPrefixWith").value(redirectAllRequestsTo.getReplaceKeyPrefixWith()).end();
}
if (redirectAllRequestsTo.getReplaceKeyWith() != null) {
xml.start("ReplaceKeyWith").value(redirectAllRequestsTo.getReplaceKeyWith()).end();
}
redirectAllRequestsElement.end();
}
if (websiteConfiguration.getRoutingRules() != null && websiteConfiguration.getRoutingRules().size() > 0) {
XmlWriter routingRules = xml.start("RoutingRules");
for (RoutingRule rule : websiteConfiguration.getRoutingRules()) {
writeRule(routingRules, rule);
}
routingRules.end();
}
xml.end();
return xml.getBytes();
}
|
java
|
public byte[] convertToXmlByteArray(BucketWebsiteConfiguration websiteConfiguration) {
XmlWriter xml = new XmlWriter();
xml.start("WebsiteConfiguration", "xmlns", Constants.XML_NAMESPACE);
if (websiteConfiguration.getIndexDocumentSuffix() != null) {
XmlWriter indexDocumentElement = xml.start("IndexDocument");
indexDocumentElement.start("Suffix").value(websiteConfiguration.getIndexDocumentSuffix()).end();
indexDocumentElement.end();
}
if (websiteConfiguration.getErrorDocument() != null) {
XmlWriter errorDocumentElement = xml.start("ErrorDocument");
errorDocumentElement.start("Key").value(websiteConfiguration.getErrorDocument()).end();
errorDocumentElement.end();
}
RedirectRule redirectAllRequestsTo = websiteConfiguration.getRedirectAllRequestsTo();
if (redirectAllRequestsTo != null) {
XmlWriter redirectAllRequestsElement = xml.start("RedirectAllRequestsTo");
if (redirectAllRequestsTo.getprotocol() != null) {
xml.start("Protocol").value(redirectAllRequestsTo.getprotocol()).end();
}
if (redirectAllRequestsTo.getHostName() != null) {
xml.start("HostName").value(redirectAllRequestsTo.getHostName()).end();
}
if (redirectAllRequestsTo.getReplaceKeyPrefixWith() != null) {
xml.start("ReplaceKeyPrefixWith").value(redirectAllRequestsTo.getReplaceKeyPrefixWith()).end();
}
if (redirectAllRequestsTo.getReplaceKeyWith() != null) {
xml.start("ReplaceKeyWith").value(redirectAllRequestsTo.getReplaceKeyWith()).end();
}
redirectAllRequestsElement.end();
}
if (websiteConfiguration.getRoutingRules() != null && websiteConfiguration.getRoutingRules().size() > 0) {
XmlWriter routingRules = xml.start("RoutingRules");
for (RoutingRule rule : websiteConfiguration.getRoutingRules()) {
writeRule(routingRules, rule);
}
routingRules.end();
}
xml.end();
return xml.getBytes();
}
|
[
"public",
"byte",
"[",
"]",
"convertToXmlByteArray",
"(",
"BucketWebsiteConfiguration",
"websiteConfiguration",
")",
"{",
"XmlWriter",
"xml",
"=",
"new",
"XmlWriter",
"(",
")",
";",
"xml",
".",
"start",
"(",
"\"WebsiteConfiguration\"",
",",
"\"xmlns\"",
",",
"Constants",
".",
"XML_NAMESPACE",
")",
";",
"if",
"(",
"websiteConfiguration",
".",
"getIndexDocumentSuffix",
"(",
")",
"!=",
"null",
")",
"{",
"XmlWriter",
"indexDocumentElement",
"=",
"xml",
".",
"start",
"(",
"\"IndexDocument\"",
")",
";",
"indexDocumentElement",
".",
"start",
"(",
"\"Suffix\"",
")",
".",
"value",
"(",
"websiteConfiguration",
".",
"getIndexDocumentSuffix",
"(",
")",
")",
".",
"end",
"(",
")",
";",
"indexDocumentElement",
".",
"end",
"(",
")",
";",
"}",
"if",
"(",
"websiteConfiguration",
".",
"getErrorDocument",
"(",
")",
"!=",
"null",
")",
"{",
"XmlWriter",
"errorDocumentElement",
"=",
"xml",
".",
"start",
"(",
"\"ErrorDocument\"",
")",
";",
"errorDocumentElement",
".",
"start",
"(",
"\"Key\"",
")",
".",
"value",
"(",
"websiteConfiguration",
".",
"getErrorDocument",
"(",
")",
")",
".",
"end",
"(",
")",
";",
"errorDocumentElement",
".",
"end",
"(",
")",
";",
"}",
"RedirectRule",
"redirectAllRequestsTo",
"=",
"websiteConfiguration",
".",
"getRedirectAllRequestsTo",
"(",
")",
";",
"if",
"(",
"redirectAllRequestsTo",
"!=",
"null",
")",
"{",
"XmlWriter",
"redirectAllRequestsElement",
"=",
"xml",
".",
"start",
"(",
"\"RedirectAllRequestsTo\"",
")",
";",
"if",
"(",
"redirectAllRequestsTo",
".",
"getprotocol",
"(",
")",
"!=",
"null",
")",
"{",
"xml",
".",
"start",
"(",
"\"Protocol\"",
")",
".",
"value",
"(",
"redirectAllRequestsTo",
".",
"getprotocol",
"(",
")",
")",
".",
"end",
"(",
")",
";",
"}",
"if",
"(",
"redirectAllRequestsTo",
".",
"getHostName",
"(",
")",
"!=",
"null",
")",
"{",
"xml",
".",
"start",
"(",
"\"HostName\"",
")",
".",
"value",
"(",
"redirectAllRequestsTo",
".",
"getHostName",
"(",
")",
")",
".",
"end",
"(",
")",
";",
"}",
"if",
"(",
"redirectAllRequestsTo",
".",
"getReplaceKeyPrefixWith",
"(",
")",
"!=",
"null",
")",
"{",
"xml",
".",
"start",
"(",
"\"ReplaceKeyPrefixWith\"",
")",
".",
"value",
"(",
"redirectAllRequestsTo",
".",
"getReplaceKeyPrefixWith",
"(",
")",
")",
".",
"end",
"(",
")",
";",
"}",
"if",
"(",
"redirectAllRequestsTo",
".",
"getReplaceKeyWith",
"(",
")",
"!=",
"null",
")",
"{",
"xml",
".",
"start",
"(",
"\"ReplaceKeyWith\"",
")",
".",
"value",
"(",
"redirectAllRequestsTo",
".",
"getReplaceKeyWith",
"(",
")",
")",
".",
"end",
"(",
")",
";",
"}",
"redirectAllRequestsElement",
".",
"end",
"(",
")",
";",
"}",
"if",
"(",
"websiteConfiguration",
".",
"getRoutingRules",
"(",
")",
"!=",
"null",
"&&",
"websiteConfiguration",
".",
"getRoutingRules",
"(",
")",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"XmlWriter",
"routingRules",
"=",
"xml",
".",
"start",
"(",
"\"RoutingRules\"",
")",
";",
"for",
"(",
"RoutingRule",
"rule",
":",
"websiteConfiguration",
".",
"getRoutingRules",
"(",
")",
")",
"{",
"writeRule",
"(",
"routingRules",
",",
"rule",
")",
";",
"}",
"routingRules",
".",
"end",
"(",
")",
";",
"}",
"xml",
".",
"end",
"(",
")",
";",
"return",
"xml",
".",
"getBytes",
"(",
")",
";",
"}"
] |
Converts the specified website configuration into an XML byte array to
send to S3.
Sample XML:
<WebsiteConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<IndexDocument>
<Suffix>index.html</Suffix>
</IndexDocument>
<ErrorDocument>
<Key>404.html</Key>
</ErrorDocument>
</WebsiteConfiguration>
@param websiteConfiguration
The configuration to convert.
@return The XML byte array representation.
|
[
"Converts",
"the",
"specified",
"website",
"configuration",
"into",
"an",
"XML",
"byte",
"array",
"to",
"send",
"to",
"S3",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/BucketConfigurationXmlFactory.java#L367-L416
|
19,710
|
aws/aws-sdk-java
|
aws-java-sdk-elasticache/src/main/java/com/amazonaws/services/elasticache/AmazonElastiCacheAsyncClient.java
|
AmazonElastiCacheAsyncClient.describeCacheEngineVersionsAsync
|
@Override
public java.util.concurrent.Future<DescribeCacheEngineVersionsResult> describeCacheEngineVersionsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeCacheEngineVersionsRequest, DescribeCacheEngineVersionsResult> asyncHandler) {
return describeCacheEngineVersionsAsync(new DescribeCacheEngineVersionsRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<DescribeCacheEngineVersionsResult> describeCacheEngineVersionsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeCacheEngineVersionsRequest, DescribeCacheEngineVersionsResult> asyncHandler) {
return describeCacheEngineVersionsAsync(new DescribeCacheEngineVersionsRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DescribeCacheEngineVersionsResult",
">",
"describeCacheEngineVersionsAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"DescribeCacheEngineVersionsRequest",
",",
"DescribeCacheEngineVersionsResult",
">",
"asyncHandler",
")",
"{",
"return",
"describeCacheEngineVersionsAsync",
"(",
"new",
"DescribeCacheEngineVersionsRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the DescribeCacheEngineVersions operation with an AsyncHandler.
@see #describeCacheEngineVersionsAsync(DescribeCacheEngineVersionsRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"DescribeCacheEngineVersions",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-elasticache/src/main/java/com/amazonaws/services/elasticache/AmazonElastiCacheAsyncClient.java#L891-L896
|
19,711
|
aws/aws-sdk-java
|
aws-java-sdk-elasticache/src/main/java/com/amazonaws/services/elasticache/AmazonElastiCacheAsyncClient.java
|
AmazonElastiCacheAsyncClient.describeCacheSecurityGroupsAsync
|
@Override
public java.util.concurrent.Future<DescribeCacheSecurityGroupsResult> describeCacheSecurityGroupsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeCacheSecurityGroupsRequest, DescribeCacheSecurityGroupsResult> asyncHandler) {
return describeCacheSecurityGroupsAsync(new DescribeCacheSecurityGroupsRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<DescribeCacheSecurityGroupsResult> describeCacheSecurityGroupsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeCacheSecurityGroupsRequest, DescribeCacheSecurityGroupsResult> asyncHandler) {
return describeCacheSecurityGroupsAsync(new DescribeCacheSecurityGroupsRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DescribeCacheSecurityGroupsResult",
">",
"describeCacheSecurityGroupsAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"DescribeCacheSecurityGroupsRequest",
",",
"DescribeCacheSecurityGroupsResult",
">",
"asyncHandler",
")",
"{",
"return",
"describeCacheSecurityGroupsAsync",
"(",
"new",
"DescribeCacheSecurityGroupsRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the DescribeCacheSecurityGroups operation with an AsyncHandler.
@see #describeCacheSecurityGroupsAsync(DescribeCacheSecurityGroupsRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"DescribeCacheSecurityGroups",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-elasticache/src/main/java/com/amazonaws/services/elasticache/AmazonElastiCacheAsyncClient.java#L1036-L1041
|
19,712
|
aws/aws-sdk-java
|
aws-java-sdk-elasticache/src/main/java/com/amazonaws/services/elasticache/AmazonElastiCacheAsyncClient.java
|
AmazonElastiCacheAsyncClient.describeReplicationGroupsAsync
|
@Override
public java.util.concurrent.Future<DescribeReplicationGroupsResult> describeReplicationGroupsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeReplicationGroupsRequest, DescribeReplicationGroupsResult> asyncHandler) {
return describeReplicationGroupsAsync(new DescribeReplicationGroupsRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<DescribeReplicationGroupsResult> describeReplicationGroupsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeReplicationGroupsRequest, DescribeReplicationGroupsResult> asyncHandler) {
return describeReplicationGroupsAsync(new DescribeReplicationGroupsRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DescribeReplicationGroupsResult",
">",
"describeReplicationGroupsAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"DescribeReplicationGroupsRequest",
",",
"DescribeReplicationGroupsResult",
">",
"asyncHandler",
")",
"{",
"return",
"describeReplicationGroupsAsync",
"(",
"new",
"DescribeReplicationGroupsRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the DescribeReplicationGroups operation with an AsyncHandler.
@see #describeReplicationGroupsAsync(DescribeReplicationGroupsRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"DescribeReplicationGroups",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-elasticache/src/main/java/com/amazonaws/services/elasticache/AmazonElastiCacheAsyncClient.java#L1237-L1242
|
19,713
|
aws/aws-sdk-java
|
aws-java-sdk-elasticache/src/main/java/com/amazonaws/services/elasticache/AmazonElastiCacheAsyncClient.java
|
AmazonElastiCacheAsyncClient.describeReservedCacheNodesOfferingsAsync
|
@Override
public java.util.concurrent.Future<DescribeReservedCacheNodesOfferingsResult> describeReservedCacheNodesOfferingsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeReservedCacheNodesOfferingsRequest, DescribeReservedCacheNodesOfferingsResult> asyncHandler) {
return describeReservedCacheNodesOfferingsAsync(new DescribeReservedCacheNodesOfferingsRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<DescribeReservedCacheNodesOfferingsResult> describeReservedCacheNodesOfferingsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeReservedCacheNodesOfferingsRequest, DescribeReservedCacheNodesOfferingsResult> asyncHandler) {
return describeReservedCacheNodesOfferingsAsync(new DescribeReservedCacheNodesOfferingsRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DescribeReservedCacheNodesOfferingsResult",
">",
"describeReservedCacheNodesOfferingsAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"DescribeReservedCacheNodesOfferingsRequest",
",",
"DescribeReservedCacheNodesOfferingsResult",
">",
"asyncHandler",
")",
"{",
"return",
"describeReservedCacheNodesOfferingsAsync",
"(",
"new",
"DescribeReservedCacheNodesOfferingsRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the DescribeReservedCacheNodesOfferings operation with an AsyncHandler.
@see #describeReservedCacheNodesOfferingsAsync(DescribeReservedCacheNodesOfferingsRequest,
com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"DescribeReservedCacheNodesOfferings",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-elasticache/src/main/java/com/amazonaws/services/elasticache/AmazonElastiCacheAsyncClient.java#L1352-L1357
|
19,714
|
aws/aws-sdk-java
|
aws-java-sdk-elasticache/src/main/java/com/amazonaws/services/elasticache/AmazonElastiCacheAsyncClient.java
|
AmazonElastiCacheAsyncClient.listAllowedNodeTypeModificationsAsync
|
@Override
public java.util.concurrent.Future<ListAllowedNodeTypeModificationsResult> listAllowedNodeTypeModificationsAsync(
com.amazonaws.handlers.AsyncHandler<ListAllowedNodeTypeModificationsRequest, ListAllowedNodeTypeModificationsResult> asyncHandler) {
return listAllowedNodeTypeModificationsAsync(new ListAllowedNodeTypeModificationsRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<ListAllowedNodeTypeModificationsResult> listAllowedNodeTypeModificationsAsync(
com.amazonaws.handlers.AsyncHandler<ListAllowedNodeTypeModificationsRequest, ListAllowedNodeTypeModificationsResult> asyncHandler) {
return listAllowedNodeTypeModificationsAsync(new ListAllowedNodeTypeModificationsRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"ListAllowedNodeTypeModificationsResult",
">",
"listAllowedNodeTypeModificationsAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"ListAllowedNodeTypeModificationsRequest",
",",
"ListAllowedNodeTypeModificationsResult",
">",
"asyncHandler",
")",
"{",
"return",
"listAllowedNodeTypeModificationsAsync",
"(",
"new",
"ListAllowedNodeTypeModificationsRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the ListAllowedNodeTypeModifications operation with an AsyncHandler.
@see #listAllowedNodeTypeModificationsAsync(ListAllowedNodeTypeModificationsRequest,
com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"ListAllowedNodeTypeModifications",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-elasticache/src/main/java/com/amazonaws/services/elasticache/AmazonElastiCacheAsyncClient.java#L1500-L1505
|
19,715
|
aws/aws-sdk-java
|
aws-java-sdk-dms/src/main/java/com/amazonaws/services/databasemigrationservice/waiters/AWSDatabaseMigrationServiceWaiters.java
|
AWSDatabaseMigrationServiceWaiters.replicationInstanceAvailable
|
public Waiter<DescribeReplicationInstancesRequest> replicationInstanceAvailable() {
return new WaiterBuilder<DescribeReplicationInstancesRequest, DescribeReplicationInstancesResult>()
.withSdkFunction(new DescribeReplicationInstancesFunction(client))
.withAcceptors(new ReplicationInstanceAvailable.IsAvailableMatcher(), new ReplicationInstanceAvailable.IsDeletingMatcher(),
new ReplicationInstanceAvailable.IsIncompatiblecredentialsMatcher(), new ReplicationInstanceAvailable.IsIncompatiblenetworkMatcher(),
new ReplicationInstanceAvailable.IsInaccessibleencryptioncredentialsMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(60)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<DescribeReplicationInstancesRequest> replicationInstanceAvailable() {
return new WaiterBuilder<DescribeReplicationInstancesRequest, DescribeReplicationInstancesResult>()
.withSdkFunction(new DescribeReplicationInstancesFunction(client))
.withAcceptors(new ReplicationInstanceAvailable.IsAvailableMatcher(), new ReplicationInstanceAvailable.IsDeletingMatcher(),
new ReplicationInstanceAvailable.IsIncompatiblecredentialsMatcher(), new ReplicationInstanceAvailable.IsIncompatiblenetworkMatcher(),
new ReplicationInstanceAvailable.IsInaccessibleencryptioncredentialsMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(60)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"DescribeReplicationInstancesRequest",
">",
"replicationInstanceAvailable",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"DescribeReplicationInstancesRequest",
",",
"DescribeReplicationInstancesResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"DescribeReplicationInstancesFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"ReplicationInstanceAvailable",
".",
"IsAvailableMatcher",
"(",
")",
",",
"new",
"ReplicationInstanceAvailable",
".",
"IsDeletingMatcher",
"(",
")",
",",
"new",
"ReplicationInstanceAvailable",
".",
"IsIncompatiblecredentialsMatcher",
"(",
")",
",",
"new",
"ReplicationInstanceAvailable",
".",
"IsIncompatiblenetworkMatcher",
"(",
")",
",",
"new",
"ReplicationInstanceAvailable",
".",
"IsInaccessibleencryptioncredentialsMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"60",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"60",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a ReplicationInstanceAvailable waiter by using custom parameters waiterParameters and other parameters
defined in the waiters specification, and then polls until it determines whether the resource entered the desired
state or not, where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"ReplicationInstanceAvailable",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dms/src/main/java/com/amazonaws/services/databasemigrationservice/waiters/AWSDatabaseMigrationServiceWaiters.java#L64-L73
|
19,716
|
aws/aws-sdk-java
|
aws-java-sdk-dms/src/main/java/com/amazonaws/services/databasemigrationservice/waiters/AWSDatabaseMigrationServiceWaiters.java
|
AWSDatabaseMigrationServiceWaiters.replicationTaskReady
|
public Waiter<DescribeReplicationTasksRequest> replicationTaskReady() {
return new WaiterBuilder<DescribeReplicationTasksRequest, DescribeReplicationTasksResult>()
.withSdkFunction(new DescribeReplicationTasksFunction(client))
.withAcceptors(new ReplicationTaskReady.IsReadyMatcher(), new ReplicationTaskReady.IsStartingMatcher(),
new ReplicationTaskReady.IsRunningMatcher(), new ReplicationTaskReady.IsStoppingMatcher(), new ReplicationTaskReady.IsStoppedMatcher(),
new ReplicationTaskReady.IsFailedMatcher(), new ReplicationTaskReady.IsModifyingMatcher(), new ReplicationTaskReady.IsTestingMatcher(),
new ReplicationTaskReady.IsDeletingMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(15)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<DescribeReplicationTasksRequest> replicationTaskReady() {
return new WaiterBuilder<DescribeReplicationTasksRequest, DescribeReplicationTasksResult>()
.withSdkFunction(new DescribeReplicationTasksFunction(client))
.withAcceptors(new ReplicationTaskReady.IsReadyMatcher(), new ReplicationTaskReady.IsStartingMatcher(),
new ReplicationTaskReady.IsRunningMatcher(), new ReplicationTaskReady.IsStoppingMatcher(), new ReplicationTaskReady.IsStoppedMatcher(),
new ReplicationTaskReady.IsFailedMatcher(), new ReplicationTaskReady.IsModifyingMatcher(), new ReplicationTaskReady.IsTestingMatcher(),
new ReplicationTaskReady.IsDeletingMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(15)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"DescribeReplicationTasksRequest",
">",
"replicationTaskReady",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"DescribeReplicationTasksRequest",
",",
"DescribeReplicationTasksResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"DescribeReplicationTasksFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"ReplicationTaskReady",
".",
"IsReadyMatcher",
"(",
")",
",",
"new",
"ReplicationTaskReady",
".",
"IsStartingMatcher",
"(",
")",
",",
"new",
"ReplicationTaskReady",
".",
"IsRunningMatcher",
"(",
")",
",",
"new",
"ReplicationTaskReady",
".",
"IsStoppingMatcher",
"(",
")",
",",
"new",
"ReplicationTaskReady",
".",
"IsStoppedMatcher",
"(",
")",
",",
"new",
"ReplicationTaskReady",
".",
"IsFailedMatcher",
"(",
")",
",",
"new",
"ReplicationTaskReady",
".",
"IsModifyingMatcher",
"(",
")",
",",
"new",
"ReplicationTaskReady",
".",
"IsTestingMatcher",
"(",
")",
",",
"new",
"ReplicationTaskReady",
".",
"IsDeletingMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"60",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"15",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a ReplicationTaskReady waiter by using custom parameters waiterParameters and other parameters defined in
the waiters specification, and then polls until it determines whether the resource entered the desired state or
not, where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"ReplicationTaskReady",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dms/src/main/java/com/amazonaws/services/databasemigrationservice/waiters/AWSDatabaseMigrationServiceWaiters.java#L80-L90
|
19,717
|
aws/aws-sdk-java
|
aws-java-sdk-dms/src/main/java/com/amazonaws/services/databasemigrationservice/waiters/AWSDatabaseMigrationServiceWaiters.java
|
AWSDatabaseMigrationServiceWaiters.replicationTaskDeleted
|
public Waiter<DescribeReplicationTasksRequest> replicationTaskDeleted() {
return new WaiterBuilder<DescribeReplicationTasksRequest, DescribeReplicationTasksResult>()
.withSdkFunction(new DescribeReplicationTasksFunction(client))
.withAcceptors(new ReplicationTaskDeleted.IsReadyMatcher(), new ReplicationTaskDeleted.IsCreatingMatcher(),
new ReplicationTaskDeleted.IsStoppedMatcher(), new ReplicationTaskDeleted.IsRunningMatcher(),
new ReplicationTaskDeleted.IsFailedMatcher(), new ReplicationTaskDeleted.IsResourceNotFoundFaultMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(15)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<DescribeReplicationTasksRequest> replicationTaskDeleted() {
return new WaiterBuilder<DescribeReplicationTasksRequest, DescribeReplicationTasksResult>()
.withSdkFunction(new DescribeReplicationTasksFunction(client))
.withAcceptors(new ReplicationTaskDeleted.IsReadyMatcher(), new ReplicationTaskDeleted.IsCreatingMatcher(),
new ReplicationTaskDeleted.IsStoppedMatcher(), new ReplicationTaskDeleted.IsRunningMatcher(),
new ReplicationTaskDeleted.IsFailedMatcher(), new ReplicationTaskDeleted.IsResourceNotFoundFaultMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(15)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"DescribeReplicationTasksRequest",
">",
"replicationTaskDeleted",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"DescribeReplicationTasksRequest",
",",
"DescribeReplicationTasksResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"DescribeReplicationTasksFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"ReplicationTaskDeleted",
".",
"IsReadyMatcher",
"(",
")",
",",
"new",
"ReplicationTaskDeleted",
".",
"IsCreatingMatcher",
"(",
")",
",",
"new",
"ReplicationTaskDeleted",
".",
"IsStoppedMatcher",
"(",
")",
",",
"new",
"ReplicationTaskDeleted",
".",
"IsRunningMatcher",
"(",
")",
",",
"new",
"ReplicationTaskDeleted",
".",
"IsFailedMatcher",
"(",
")",
",",
"new",
"ReplicationTaskDeleted",
".",
"IsResourceNotFoundFaultMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"60",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"15",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a ReplicationTaskDeleted waiter by using custom parameters waiterParameters and other parameters defined
in the waiters specification, and then polls until it determines whether the resource entered the desired state
or not, where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"ReplicationTaskDeleted",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dms/src/main/java/com/amazonaws/services/databasemigrationservice/waiters/AWSDatabaseMigrationServiceWaiters.java#L112-L121
|
19,718
|
aws/aws-sdk-java
|
aws-java-sdk-dms/src/main/java/com/amazonaws/services/databasemigrationservice/waiters/AWSDatabaseMigrationServiceWaiters.java
|
AWSDatabaseMigrationServiceWaiters.replicationTaskStopped
|
public Waiter<DescribeReplicationTasksRequest> replicationTaskStopped() {
return new WaiterBuilder<DescribeReplicationTasksRequest, DescribeReplicationTasksResult>()
.withSdkFunction(new DescribeReplicationTasksFunction(client))
.withAcceptors(new ReplicationTaskStopped.IsStoppedMatcher(), new ReplicationTaskStopped.IsReadyMatcher(),
new ReplicationTaskStopped.IsCreatingMatcher(), new ReplicationTaskStopped.IsStartingMatcher(),
new ReplicationTaskStopped.IsRunningMatcher(), new ReplicationTaskStopped.IsFailedMatcher(),
new ReplicationTaskStopped.IsModifyingMatcher(), new ReplicationTaskStopped.IsTestingMatcher(),
new ReplicationTaskStopped.IsDeletingMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(15)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<DescribeReplicationTasksRequest> replicationTaskStopped() {
return new WaiterBuilder<DescribeReplicationTasksRequest, DescribeReplicationTasksResult>()
.withSdkFunction(new DescribeReplicationTasksFunction(client))
.withAcceptors(new ReplicationTaskStopped.IsStoppedMatcher(), new ReplicationTaskStopped.IsReadyMatcher(),
new ReplicationTaskStopped.IsCreatingMatcher(), new ReplicationTaskStopped.IsStartingMatcher(),
new ReplicationTaskStopped.IsRunningMatcher(), new ReplicationTaskStopped.IsFailedMatcher(),
new ReplicationTaskStopped.IsModifyingMatcher(), new ReplicationTaskStopped.IsTestingMatcher(),
new ReplicationTaskStopped.IsDeletingMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(15)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"DescribeReplicationTasksRequest",
">",
"replicationTaskStopped",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"DescribeReplicationTasksRequest",
",",
"DescribeReplicationTasksResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"DescribeReplicationTasksFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"ReplicationTaskStopped",
".",
"IsStoppedMatcher",
"(",
")",
",",
"new",
"ReplicationTaskStopped",
".",
"IsReadyMatcher",
"(",
")",
",",
"new",
"ReplicationTaskStopped",
".",
"IsCreatingMatcher",
"(",
")",
",",
"new",
"ReplicationTaskStopped",
".",
"IsStartingMatcher",
"(",
")",
",",
"new",
"ReplicationTaskStopped",
".",
"IsRunningMatcher",
"(",
")",
",",
"new",
"ReplicationTaskStopped",
".",
"IsFailedMatcher",
"(",
")",
",",
"new",
"ReplicationTaskStopped",
".",
"IsModifyingMatcher",
"(",
")",
",",
"new",
"ReplicationTaskStopped",
".",
"IsTestingMatcher",
"(",
")",
",",
"new",
"ReplicationTaskStopped",
".",
"IsDeletingMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"60",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"15",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a ReplicationTaskStopped waiter by using custom parameters waiterParameters and other parameters defined
in the waiters specification, and then polls until it determines whether the resource entered the desired state
or not, where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"ReplicationTaskStopped",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dms/src/main/java/com/amazonaws/services/databasemigrationservice/waiters/AWSDatabaseMigrationServiceWaiters.java#L128-L139
|
19,719
|
aws/aws-sdk-java
|
aws-java-sdk-dms/src/main/java/com/amazonaws/services/databasemigrationservice/waiters/AWSDatabaseMigrationServiceWaiters.java
|
AWSDatabaseMigrationServiceWaiters.replicationTaskRunning
|
public Waiter<DescribeReplicationTasksRequest> replicationTaskRunning() {
return new WaiterBuilder<DescribeReplicationTasksRequest, DescribeReplicationTasksResult>()
.withSdkFunction(new DescribeReplicationTasksFunction(client))
.withAcceptors(new ReplicationTaskRunning.IsRunningMatcher(), new ReplicationTaskRunning.IsReadyMatcher(),
new ReplicationTaskRunning.IsCreatingMatcher(), new ReplicationTaskRunning.IsStoppingMatcher(),
new ReplicationTaskRunning.IsStoppedMatcher(), new ReplicationTaskRunning.IsFailedMatcher(),
new ReplicationTaskRunning.IsModifyingMatcher(), new ReplicationTaskRunning.IsTestingMatcher(),
new ReplicationTaskRunning.IsDeletingMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(15)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<DescribeReplicationTasksRequest> replicationTaskRunning() {
return new WaiterBuilder<DescribeReplicationTasksRequest, DescribeReplicationTasksResult>()
.withSdkFunction(new DescribeReplicationTasksFunction(client))
.withAcceptors(new ReplicationTaskRunning.IsRunningMatcher(), new ReplicationTaskRunning.IsReadyMatcher(),
new ReplicationTaskRunning.IsCreatingMatcher(), new ReplicationTaskRunning.IsStoppingMatcher(),
new ReplicationTaskRunning.IsStoppedMatcher(), new ReplicationTaskRunning.IsFailedMatcher(),
new ReplicationTaskRunning.IsModifyingMatcher(), new ReplicationTaskRunning.IsTestingMatcher(),
new ReplicationTaskRunning.IsDeletingMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(15)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"DescribeReplicationTasksRequest",
">",
"replicationTaskRunning",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"DescribeReplicationTasksRequest",
",",
"DescribeReplicationTasksResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"DescribeReplicationTasksFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"ReplicationTaskRunning",
".",
"IsRunningMatcher",
"(",
")",
",",
"new",
"ReplicationTaskRunning",
".",
"IsReadyMatcher",
"(",
")",
",",
"new",
"ReplicationTaskRunning",
".",
"IsCreatingMatcher",
"(",
")",
",",
"new",
"ReplicationTaskRunning",
".",
"IsStoppingMatcher",
"(",
")",
",",
"new",
"ReplicationTaskRunning",
".",
"IsStoppedMatcher",
"(",
")",
",",
"new",
"ReplicationTaskRunning",
".",
"IsFailedMatcher",
"(",
")",
",",
"new",
"ReplicationTaskRunning",
".",
"IsModifyingMatcher",
"(",
")",
",",
"new",
"ReplicationTaskRunning",
".",
"IsTestingMatcher",
"(",
")",
",",
"new",
"ReplicationTaskRunning",
".",
"IsDeletingMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"60",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"15",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a ReplicationTaskRunning waiter by using custom parameters waiterParameters and other parameters defined
in the waiters specification, and then polls until it determines whether the resource entered the desired state
or not, where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"ReplicationTaskRunning",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dms/src/main/java/com/amazonaws/services/databasemigrationservice/waiters/AWSDatabaseMigrationServiceWaiters.java#L146-L157
|
19,720
|
aws/aws-sdk-java
|
aws-java-sdk-dms/src/main/java/com/amazonaws/services/databasemigrationservice/waiters/AWSDatabaseMigrationServiceWaiters.java
|
AWSDatabaseMigrationServiceWaiters.replicationInstanceDeleted
|
public Waiter<DescribeReplicationInstancesRequest> replicationInstanceDeleted() {
return new WaiterBuilder<DescribeReplicationInstancesRequest, DescribeReplicationInstancesResult>()
.withSdkFunction(new DescribeReplicationInstancesFunction(client))
.withAcceptors(new ReplicationInstanceDeleted.IsAvailableMatcher(), new ReplicationInstanceDeleted.IsResourceNotFoundFaultMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(15)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<DescribeReplicationInstancesRequest> replicationInstanceDeleted() {
return new WaiterBuilder<DescribeReplicationInstancesRequest, DescribeReplicationInstancesResult>()
.withSdkFunction(new DescribeReplicationInstancesFunction(client))
.withAcceptors(new ReplicationInstanceDeleted.IsAvailableMatcher(), new ReplicationInstanceDeleted.IsResourceNotFoundFaultMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(15)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"DescribeReplicationInstancesRequest",
">",
"replicationInstanceDeleted",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"DescribeReplicationInstancesRequest",
",",
"DescribeReplicationInstancesResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"DescribeReplicationInstancesFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"ReplicationInstanceDeleted",
".",
"IsAvailableMatcher",
"(",
")",
",",
"new",
"ReplicationInstanceDeleted",
".",
"IsResourceNotFoundFaultMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"60",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"15",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a ReplicationInstanceDeleted waiter by using custom parameters waiterParameters and other parameters
defined in the waiters specification, and then polls until it determines whether the resource entered the desired
state or not, where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"ReplicationInstanceDeleted",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dms/src/main/java/com/amazonaws/services/databasemigrationservice/waiters/AWSDatabaseMigrationServiceWaiters.java#L164-L171
|
19,721
|
aws/aws-sdk-java
|
aws-java-sdk-guardduty/src/main/java/com/amazonaws/services/guardduty/model/CreateMembersRequest.java
|
CreateMembersRequest.setAccountDetails
|
public void setAccountDetails(java.util.Collection<AccountDetail> accountDetails) {
if (accountDetails == null) {
this.accountDetails = null;
return;
}
this.accountDetails = new java.util.ArrayList<AccountDetail>(accountDetails);
}
|
java
|
public void setAccountDetails(java.util.Collection<AccountDetail> accountDetails) {
if (accountDetails == null) {
this.accountDetails = null;
return;
}
this.accountDetails = new java.util.ArrayList<AccountDetail>(accountDetails);
}
|
[
"public",
"void",
"setAccountDetails",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"AccountDetail",
">",
"accountDetails",
")",
"{",
"if",
"(",
"accountDetails",
"==",
"null",
")",
"{",
"this",
".",
"accountDetails",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"accountDetails",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"AccountDetail",
">",
"(",
"accountDetails",
")",
";",
"}"
] |
A list of account ID and email address pairs of the accounts that you want to associate with the master GuardDuty
account.
@param accountDetails
A list of account ID and email address pairs of the accounts that you want to associate with the master
GuardDuty account.
|
[
"A",
"list",
"of",
"account",
"ID",
"and",
"email",
"address",
"pairs",
"of",
"the",
"accounts",
"that",
"you",
"want",
"to",
"associate",
"with",
"the",
"master",
"GuardDuty",
"account",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-guardduty/src/main/java/com/amazonaws/services/guardduty/model/CreateMembersRequest.java#L58-L65
|
19,722
|
aws/aws-sdk-java
|
aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/model/CreateConfigurationRequest.java
|
CreateConfigurationRequest.withTags
|
public CreateConfigurationRequest withTags(java.util.Map<String, String> tags) {
setTags(tags);
return this;
}
|
java
|
public CreateConfigurationRequest withTags(java.util.Map<String, String> tags) {
setTags(tags);
return this;
}
|
[
"public",
"CreateConfigurationRequest",
"withTags",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"tags",
")",
"{",
"setTags",
"(",
"tags",
")",
";",
"return",
"this",
";",
"}"
] |
Create tags when creating the configuration.
@param tags
Create tags when creating the configuration.
@return Returns a reference to this object so that method calls can be chained together.
|
[
"Create",
"tags",
"when",
"creating",
"the",
"configuration",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/model/CreateConfigurationRequest.java#L205-L208
|
19,723
|
aws/aws-sdk-java
|
aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java
|
AmazonKinesisAsyncClient.createStreamAsync
|
@Override
public java.util.concurrent.Future<CreateStreamResult> createStreamAsync(String streamName, Integer shardCount) {
return createStreamAsync(new CreateStreamRequest().withStreamName(streamName).withShardCount(shardCount));
}
|
java
|
@Override
public java.util.concurrent.Future<CreateStreamResult> createStreamAsync(String streamName, Integer shardCount) {
return createStreamAsync(new CreateStreamRequest().withStreamName(streamName).withShardCount(shardCount));
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"CreateStreamResult",
">",
"createStreamAsync",
"(",
"String",
"streamName",
",",
"Integer",
"shardCount",
")",
"{",
"return",
"createStreamAsync",
"(",
"new",
"CreateStreamRequest",
"(",
")",
".",
"withStreamName",
"(",
"streamName",
")",
".",
"withShardCount",
"(",
"shardCount",
")",
")",
";",
"}"
] |
Simplified method form for invoking the CreateStream operation.
@see #createStreamAsync(CreateStreamRequest)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"CreateStream",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java#L319-L323
|
19,724
|
aws/aws-sdk-java
|
aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java
|
AmazonKinesisAsyncClient.createStreamAsync
|
@Override
public java.util.concurrent.Future<CreateStreamResult> createStreamAsync(String streamName, Integer shardCount,
com.amazonaws.handlers.AsyncHandler<CreateStreamRequest, CreateStreamResult> asyncHandler) {
return createStreamAsync(new CreateStreamRequest().withStreamName(streamName).withShardCount(shardCount), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<CreateStreamResult> createStreamAsync(String streamName, Integer shardCount,
com.amazonaws.handlers.AsyncHandler<CreateStreamRequest, CreateStreamResult> asyncHandler) {
return createStreamAsync(new CreateStreamRequest().withStreamName(streamName).withShardCount(shardCount), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"CreateStreamResult",
">",
"createStreamAsync",
"(",
"String",
"streamName",
",",
"Integer",
"shardCount",
",",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"CreateStreamRequest",
",",
"CreateStreamResult",
">",
"asyncHandler",
")",
"{",
"return",
"createStreamAsync",
"(",
"new",
"CreateStreamRequest",
"(",
")",
".",
"withStreamName",
"(",
"streamName",
")",
".",
"withShardCount",
"(",
"shardCount",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the CreateStream operation with an AsyncHandler.
@see #createStreamAsync(CreateStreamRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"CreateStream",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java#L330-L335
|
19,725
|
aws/aws-sdk-java
|
aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java
|
AmazonKinesisAsyncClient.deleteStreamAsync
|
@Override
public java.util.concurrent.Future<DeleteStreamResult> deleteStreamAsync(String streamName) {
return deleteStreamAsync(new DeleteStreamRequest().withStreamName(streamName));
}
|
java
|
@Override
public java.util.concurrent.Future<DeleteStreamResult> deleteStreamAsync(String streamName) {
return deleteStreamAsync(new DeleteStreamRequest().withStreamName(streamName));
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DeleteStreamResult",
">",
"deleteStreamAsync",
"(",
"String",
"streamName",
")",
"{",
"return",
"deleteStreamAsync",
"(",
"new",
"DeleteStreamRequest",
"(",
")",
".",
"withStreamName",
"(",
"streamName",
")",
")",
";",
"}"
] |
Simplified method form for invoking the DeleteStream operation.
@see #deleteStreamAsync(DeleteStreamRequest)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"DeleteStream",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java#L409-L413
|
19,726
|
aws/aws-sdk-java
|
aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java
|
AmazonKinesisAsyncClient.deleteStreamAsync
|
@Override
public java.util.concurrent.Future<DeleteStreamResult> deleteStreamAsync(String streamName,
com.amazonaws.handlers.AsyncHandler<DeleteStreamRequest, DeleteStreamResult> asyncHandler) {
return deleteStreamAsync(new DeleteStreamRequest().withStreamName(streamName), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<DeleteStreamResult> deleteStreamAsync(String streamName,
com.amazonaws.handlers.AsyncHandler<DeleteStreamRequest, DeleteStreamResult> asyncHandler) {
return deleteStreamAsync(new DeleteStreamRequest().withStreamName(streamName), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DeleteStreamResult",
">",
"deleteStreamAsync",
"(",
"String",
"streamName",
",",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"DeleteStreamRequest",
",",
"DeleteStreamResult",
">",
"asyncHandler",
")",
"{",
"return",
"deleteStreamAsync",
"(",
"new",
"DeleteStreamRequest",
"(",
")",
".",
"withStreamName",
"(",
"streamName",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the DeleteStream operation with an AsyncHandler.
@see #deleteStreamAsync(DeleteStreamRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"DeleteStream",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java#L420-L425
|
19,727
|
aws/aws-sdk-java
|
aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java
|
AmazonKinesisAsyncClient.describeStreamAsync
|
@Override
public java.util.concurrent.Future<DescribeStreamResult> describeStreamAsync(String streamName, Integer limit, String exclusiveStartShardId) {
return describeStreamAsync(new DescribeStreamRequest().withStreamName(streamName).withLimit(limit).withExclusiveStartShardId(exclusiveStartShardId));
}
|
java
|
@Override
public java.util.concurrent.Future<DescribeStreamResult> describeStreamAsync(String streamName, Integer limit, String exclusiveStartShardId) {
return describeStreamAsync(new DescribeStreamRequest().withStreamName(streamName).withLimit(limit).withExclusiveStartShardId(exclusiveStartShardId));
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DescribeStreamResult",
">",
"describeStreamAsync",
"(",
"String",
"streamName",
",",
"Integer",
"limit",
",",
"String",
"exclusiveStartShardId",
")",
"{",
"return",
"describeStreamAsync",
"(",
"new",
"DescribeStreamRequest",
"(",
")",
".",
"withStreamName",
"(",
"streamName",
")",
".",
"withLimit",
"(",
"limit",
")",
".",
"withExclusiveStartShardId",
"(",
"exclusiveStartShardId",
")",
")",
";",
"}"
] |
Simplified method form for invoking the DescribeStream operation.
@see #describeStreamAsync(DescribeStreamRequest)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"DescribeStream",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java#L577-L581
|
19,728
|
aws/aws-sdk-java
|
aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java
|
AmazonKinesisAsyncClient.describeStreamAsync
|
@Override
public java.util.concurrent.Future<DescribeStreamResult> describeStreamAsync(String streamName, Integer limit, String exclusiveStartShardId,
com.amazonaws.handlers.AsyncHandler<DescribeStreamRequest, DescribeStreamResult> asyncHandler) {
return describeStreamAsync(new DescribeStreamRequest().withStreamName(streamName).withLimit(limit).withExclusiveStartShardId(exclusiveStartShardId),
asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<DescribeStreamResult> describeStreamAsync(String streamName, Integer limit, String exclusiveStartShardId,
com.amazonaws.handlers.AsyncHandler<DescribeStreamRequest, DescribeStreamResult> asyncHandler) {
return describeStreamAsync(new DescribeStreamRequest().withStreamName(streamName).withLimit(limit).withExclusiveStartShardId(exclusiveStartShardId),
asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DescribeStreamResult",
">",
"describeStreamAsync",
"(",
"String",
"streamName",
",",
"Integer",
"limit",
",",
"String",
"exclusiveStartShardId",
",",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"DescribeStreamRequest",
",",
"DescribeStreamResult",
">",
"asyncHandler",
")",
"{",
"return",
"describeStreamAsync",
"(",
"new",
"DescribeStreamRequest",
"(",
")",
".",
"withStreamName",
"(",
"streamName",
")",
".",
"withLimit",
"(",
"limit",
")",
".",
"withExclusiveStartShardId",
"(",
"exclusiveStartShardId",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the DescribeStream operation with an AsyncHandler.
@see #describeStreamAsync(DescribeStreamRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"DescribeStream",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java#L588-L594
|
19,729
|
aws/aws-sdk-java
|
aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java
|
AmazonKinesisAsyncClient.getShardIteratorAsync
|
@Override
public java.util.concurrent.Future<GetShardIteratorResult> getShardIteratorAsync(String streamName, String shardId, String shardIteratorType,
String startingSequenceNumber) {
return getShardIteratorAsync(new GetShardIteratorRequest().withStreamName(streamName).withShardId(shardId).withShardIteratorType(shardIteratorType)
.withStartingSequenceNumber(startingSequenceNumber));
}
|
java
|
@Override
public java.util.concurrent.Future<GetShardIteratorResult> getShardIteratorAsync(String streamName, String shardId, String shardIteratorType,
String startingSequenceNumber) {
return getShardIteratorAsync(new GetShardIteratorRequest().withStreamName(streamName).withShardId(shardId).withShardIteratorType(shardIteratorType)
.withStartingSequenceNumber(startingSequenceNumber));
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"GetShardIteratorResult",
">",
"getShardIteratorAsync",
"(",
"String",
"streamName",
",",
"String",
"shardId",
",",
"String",
"shardIteratorType",
",",
"String",
"startingSequenceNumber",
")",
"{",
"return",
"getShardIteratorAsync",
"(",
"new",
"GetShardIteratorRequest",
"(",
")",
".",
"withStreamName",
"(",
"streamName",
")",
".",
"withShardId",
"(",
"shardId",
")",
".",
"withShardIteratorType",
"(",
"shardIteratorType",
")",
".",
"withStartingSequenceNumber",
"(",
"startingSequenceNumber",
")",
")",
";",
"}"
] |
Simplified method form for invoking the GetShardIterator operation.
@see #getShardIteratorAsync(GetShardIteratorRequest)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"GetShardIterator",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java#L823-L829
|
19,730
|
aws/aws-sdk-java
|
aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java
|
AmazonKinesisAsyncClient.getShardIteratorAsync
|
@Override
public java.util.concurrent.Future<GetShardIteratorResult> getShardIteratorAsync(String streamName, String shardId, String shardIteratorType,
String startingSequenceNumber, com.amazonaws.handlers.AsyncHandler<GetShardIteratorRequest, GetShardIteratorResult> asyncHandler) {
return getShardIteratorAsync(new GetShardIteratorRequest().withStreamName(streamName).withShardId(shardId).withShardIteratorType(shardIteratorType)
.withStartingSequenceNumber(startingSequenceNumber), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<GetShardIteratorResult> getShardIteratorAsync(String streamName, String shardId, String shardIteratorType,
String startingSequenceNumber, com.amazonaws.handlers.AsyncHandler<GetShardIteratorRequest, GetShardIteratorResult> asyncHandler) {
return getShardIteratorAsync(new GetShardIteratorRequest().withStreamName(streamName).withShardId(shardId).withShardIteratorType(shardIteratorType)
.withStartingSequenceNumber(startingSequenceNumber), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"GetShardIteratorResult",
">",
"getShardIteratorAsync",
"(",
"String",
"streamName",
",",
"String",
"shardId",
",",
"String",
"shardIteratorType",
",",
"String",
"startingSequenceNumber",
",",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"GetShardIteratorRequest",
",",
"GetShardIteratorResult",
">",
"asyncHandler",
")",
"{",
"return",
"getShardIteratorAsync",
"(",
"new",
"GetShardIteratorRequest",
"(",
")",
".",
"withStreamName",
"(",
"streamName",
")",
".",
"withShardId",
"(",
"shardId",
")",
".",
"withShardIteratorType",
"(",
"shardIteratorType",
")",
".",
"withStartingSequenceNumber",
"(",
"startingSequenceNumber",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the GetShardIterator operation with an AsyncHandler.
@see #getShardIteratorAsync(GetShardIteratorRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"GetShardIterator",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java#L836-L842
|
19,731
|
aws/aws-sdk-java
|
aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java
|
AmazonKinesisAsyncClient.listStreamsAsync
|
@Override
public java.util.concurrent.Future<ListStreamsResult> listStreamsAsync(
com.amazonaws.handlers.AsyncHandler<ListStreamsRequest, ListStreamsResult> asyncHandler) {
return listStreamsAsync(new ListStreamsRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<ListStreamsResult> listStreamsAsync(
com.amazonaws.handlers.AsyncHandler<ListStreamsRequest, ListStreamsResult> asyncHandler) {
return listStreamsAsync(new ListStreamsRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"ListStreamsResult",
">",
"listStreamsAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"ListStreamsRequest",
",",
"ListStreamsResult",
">",
"asyncHandler",
")",
"{",
"return",
"listStreamsAsync",
"(",
"new",
"ListStreamsRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the ListStreams operation with an AsyncHandler.
@see #listStreamsAsync(ListStreamsRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"ListStreams",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java#L993-L998
|
19,732
|
aws/aws-sdk-java
|
aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java
|
AmazonKinesisAsyncClient.mergeShardsAsync
|
@Override
public java.util.concurrent.Future<MergeShardsResult> mergeShardsAsync(String streamName, String shardToMerge, String adjacentShardToMerge) {
return mergeShardsAsync(new MergeShardsRequest().withStreamName(streamName).withShardToMerge(shardToMerge)
.withAdjacentShardToMerge(adjacentShardToMerge));
}
|
java
|
@Override
public java.util.concurrent.Future<MergeShardsResult> mergeShardsAsync(String streamName, String shardToMerge, String adjacentShardToMerge) {
return mergeShardsAsync(new MergeShardsRequest().withStreamName(streamName).withShardToMerge(shardToMerge)
.withAdjacentShardToMerge(adjacentShardToMerge));
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"MergeShardsResult",
">",
"mergeShardsAsync",
"(",
"String",
"streamName",
",",
"String",
"shardToMerge",
",",
"String",
"adjacentShardToMerge",
")",
"{",
"return",
"mergeShardsAsync",
"(",
"new",
"MergeShardsRequest",
"(",
")",
".",
"withStreamName",
"(",
"streamName",
")",
".",
"withShardToMerge",
"(",
"shardToMerge",
")",
".",
"withAdjacentShardToMerge",
"(",
"adjacentShardToMerge",
")",
")",
";",
"}"
] |
Simplified method form for invoking the MergeShards operation.
@see #mergeShardsAsync(MergeShardsRequest)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"MergeShards",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java#L1117-L1122
|
19,733
|
aws/aws-sdk-java
|
aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java
|
AmazonKinesisAsyncClient.mergeShardsAsync
|
@Override
public java.util.concurrent.Future<MergeShardsResult> mergeShardsAsync(String streamName, String shardToMerge, String adjacentShardToMerge,
com.amazonaws.handlers.AsyncHandler<MergeShardsRequest, MergeShardsResult> asyncHandler) {
return mergeShardsAsync(
new MergeShardsRequest().withStreamName(streamName).withShardToMerge(shardToMerge).withAdjacentShardToMerge(adjacentShardToMerge), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<MergeShardsResult> mergeShardsAsync(String streamName, String shardToMerge, String adjacentShardToMerge,
com.amazonaws.handlers.AsyncHandler<MergeShardsRequest, MergeShardsResult> asyncHandler) {
return mergeShardsAsync(
new MergeShardsRequest().withStreamName(streamName).withShardToMerge(shardToMerge).withAdjacentShardToMerge(adjacentShardToMerge), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"MergeShardsResult",
">",
"mergeShardsAsync",
"(",
"String",
"streamName",
",",
"String",
"shardToMerge",
",",
"String",
"adjacentShardToMerge",
",",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"MergeShardsRequest",
",",
"MergeShardsResult",
">",
"asyncHandler",
")",
"{",
"return",
"mergeShardsAsync",
"(",
"new",
"MergeShardsRequest",
"(",
")",
".",
"withStreamName",
"(",
"streamName",
")",
".",
"withShardToMerge",
"(",
"shardToMerge",
")",
".",
"withAdjacentShardToMerge",
"(",
"adjacentShardToMerge",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the MergeShards operation with an AsyncHandler.
@see #mergeShardsAsync(MergeShardsRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"MergeShards",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java#L1129-L1135
|
19,734
|
aws/aws-sdk-java
|
aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java
|
AmazonKinesisAsyncClient.putRecordAsync
|
@Override
public java.util.concurrent.Future<PutRecordResult> putRecordAsync(String streamName, java.nio.ByteBuffer data, String partitionKey,
String sequenceNumberForOrdering) {
return putRecordAsync(new PutRecordRequest().withStreamName(streamName).withData(data).withPartitionKey(partitionKey)
.withSequenceNumberForOrdering(sequenceNumberForOrdering));
}
|
java
|
@Override
public java.util.concurrent.Future<PutRecordResult> putRecordAsync(String streamName, java.nio.ByteBuffer data, String partitionKey,
String sequenceNumberForOrdering) {
return putRecordAsync(new PutRecordRequest().withStreamName(streamName).withData(data).withPartitionKey(partitionKey)
.withSequenceNumberForOrdering(sequenceNumberForOrdering));
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"PutRecordResult",
">",
"putRecordAsync",
"(",
"String",
"streamName",
",",
"java",
".",
"nio",
".",
"ByteBuffer",
"data",
",",
"String",
"partitionKey",
",",
"String",
"sequenceNumberForOrdering",
")",
"{",
"return",
"putRecordAsync",
"(",
"new",
"PutRecordRequest",
"(",
")",
".",
"withStreamName",
"(",
"streamName",
")",
".",
"withData",
"(",
"data",
")",
".",
"withPartitionKey",
"(",
"partitionKey",
")",
".",
"withSequenceNumberForOrdering",
"(",
"sequenceNumberForOrdering",
")",
")",
";",
"}"
] |
Simplified method form for invoking the PutRecord operation.
@see #putRecordAsync(PutRecordRequest)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"PutRecord",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java#L1198-L1204
|
19,735
|
aws/aws-sdk-java
|
aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java
|
AmazonKinesisAsyncClient.putRecordAsync
|
@Override
public java.util.concurrent.Future<PutRecordResult> putRecordAsync(String streamName, java.nio.ByteBuffer data, String partitionKey,
String sequenceNumberForOrdering, com.amazonaws.handlers.AsyncHandler<PutRecordRequest, PutRecordResult> asyncHandler) {
return putRecordAsync(
new PutRecordRequest().withStreamName(streamName).withData(data).withPartitionKey(partitionKey)
.withSequenceNumberForOrdering(sequenceNumberForOrdering), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<PutRecordResult> putRecordAsync(String streamName, java.nio.ByteBuffer data, String partitionKey,
String sequenceNumberForOrdering, com.amazonaws.handlers.AsyncHandler<PutRecordRequest, PutRecordResult> asyncHandler) {
return putRecordAsync(
new PutRecordRequest().withStreamName(streamName).withData(data).withPartitionKey(partitionKey)
.withSequenceNumberForOrdering(sequenceNumberForOrdering), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"PutRecordResult",
">",
"putRecordAsync",
"(",
"String",
"streamName",
",",
"java",
".",
"nio",
".",
"ByteBuffer",
"data",
",",
"String",
"partitionKey",
",",
"String",
"sequenceNumberForOrdering",
",",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"PutRecordRequest",
",",
"PutRecordResult",
">",
"asyncHandler",
")",
"{",
"return",
"putRecordAsync",
"(",
"new",
"PutRecordRequest",
"(",
")",
".",
"withStreamName",
"(",
"streamName",
")",
".",
"withData",
"(",
"data",
")",
".",
"withPartitionKey",
"(",
"partitionKey",
")",
".",
"withSequenceNumberForOrdering",
"(",
"sequenceNumberForOrdering",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the PutRecord operation with an AsyncHandler.
@see #putRecordAsync(PutRecordRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"PutRecord",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java#L1211-L1218
|
19,736
|
aws/aws-sdk-java
|
aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java
|
AmazonKinesisAsyncClient.splitShardAsync
|
@Override
public java.util.concurrent.Future<SplitShardResult> splitShardAsync(String streamName, String shardToSplit, String newStartingHashKey) {
return splitShardAsync(new SplitShardRequest().withStreamName(streamName).withShardToSplit(shardToSplit).withNewStartingHashKey(newStartingHashKey));
}
|
java
|
@Override
public java.util.concurrent.Future<SplitShardResult> splitShardAsync(String streamName, String shardToSplit, String newStartingHashKey) {
return splitShardAsync(new SplitShardRequest().withStreamName(streamName).withShardToSplit(shardToSplit).withNewStartingHashKey(newStartingHashKey));
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"SplitShardResult",
">",
"splitShardAsync",
"(",
"String",
"streamName",
",",
"String",
"shardToSplit",
",",
"String",
"newStartingHashKey",
")",
"{",
"return",
"splitShardAsync",
"(",
"new",
"SplitShardRequest",
"(",
")",
".",
"withStreamName",
"(",
"streamName",
")",
".",
"withShardToSplit",
"(",
"shardToSplit",
")",
".",
"withNewStartingHashKey",
"(",
"newStartingHashKey",
")",
")",
";",
"}"
] |
Simplified method form for invoking the SplitShard operation.
@see #splitShardAsync(SplitShardRequest)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"SplitShard",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java#L1357-L1361
|
19,737
|
aws/aws-sdk-java
|
aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java
|
AmazonKinesisAsyncClient.splitShardAsync
|
@Override
public java.util.concurrent.Future<SplitShardResult> splitShardAsync(String streamName, String shardToSplit, String newStartingHashKey,
com.amazonaws.handlers.AsyncHandler<SplitShardRequest, SplitShardResult> asyncHandler) {
return splitShardAsync(new SplitShardRequest().withStreamName(streamName).withShardToSplit(shardToSplit).withNewStartingHashKey(newStartingHashKey),
asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<SplitShardResult> splitShardAsync(String streamName, String shardToSplit, String newStartingHashKey,
com.amazonaws.handlers.AsyncHandler<SplitShardRequest, SplitShardResult> asyncHandler) {
return splitShardAsync(new SplitShardRequest().withStreamName(streamName).withShardToSplit(shardToSplit).withNewStartingHashKey(newStartingHashKey),
asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"SplitShardResult",
">",
"splitShardAsync",
"(",
"String",
"streamName",
",",
"String",
"shardToSplit",
",",
"String",
"newStartingHashKey",
",",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"SplitShardRequest",
",",
"SplitShardResult",
">",
"asyncHandler",
")",
"{",
"return",
"splitShardAsync",
"(",
"new",
"SplitShardRequest",
"(",
")",
".",
"withStreamName",
"(",
"streamName",
")",
".",
"withShardToSplit",
"(",
"shardToSplit",
")",
".",
"withNewStartingHashKey",
"(",
"newStartingHashKey",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the SplitShard operation with an AsyncHandler.
@see #splitShardAsync(SplitShardRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"SplitShard",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/AmazonKinesisAsyncClient.java#L1368-L1374
|
19,738
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/waiters/AcceptorPathMatcher.java
|
AcceptorPathMatcher.pathAll
|
public static boolean pathAll(JsonNode expectedResult, JsonNode finalResult) {
if (finalResult.isNull()) {
return false;
}
if (!finalResult.isArray()) {
throw new RuntimeException("Expected an array");
}
for (JsonNode element : finalResult) {
if (!element.equals(expectedResult)) {
return false;
}
}
return true;
}
|
java
|
public static boolean pathAll(JsonNode expectedResult, JsonNode finalResult) {
if (finalResult.isNull()) {
return false;
}
if (!finalResult.isArray()) {
throw new RuntimeException("Expected an array");
}
for (JsonNode element : finalResult) {
if (!element.equals(expectedResult)) {
return false;
}
}
return true;
}
|
[
"public",
"static",
"boolean",
"pathAll",
"(",
"JsonNode",
"expectedResult",
",",
"JsonNode",
"finalResult",
")",
"{",
"if",
"(",
"finalResult",
".",
"isNull",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"finalResult",
".",
"isArray",
"(",
")",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"Expected an array\"",
")",
";",
"}",
"for",
"(",
"JsonNode",
"element",
":",
"finalResult",
")",
"{",
"if",
"(",
"!",
"element",
".",
"equals",
"(",
"expectedResult",
")",
")",
"{",
"return",
"false",
";",
"}",
"}",
"return",
"true",
";",
"}"
] |
PathAll matcher that checks if each element of the final
result matches the expected result
@param expectedResult Expected result given by the waiter definition
@param finalResult Final result of the resource got by the execution
of the JmesPath expression given by the waiter
definition
@return True if all elements of the final result matches
the expected result, False otherwise
|
[
"PathAll",
"matcher",
"that",
"checks",
"if",
"each",
"element",
"of",
"the",
"final",
"result",
"matches",
"the",
"expected",
"result"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/waiters/AcceptorPathMatcher.java#L35-L48
|
19,739
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/internal/SdkInputStream.java
|
SdkInputStream.abortIfNeeded
|
protected final void abortIfNeeded() {
if (shouldAbort()) {
try {
abort(); // execute subclass specific abortion logic
} catch (IOException e) {
LogFactory.getLog(getClass()).debug("FYI", e);
}
throw new AbortedException();
}
}
|
java
|
protected final void abortIfNeeded() {
if (shouldAbort()) {
try {
abort(); // execute subclass specific abortion logic
} catch (IOException e) {
LogFactory.getLog(getClass()).debug("FYI", e);
}
throw new AbortedException();
}
}
|
[
"protected",
"final",
"void",
"abortIfNeeded",
"(",
")",
"{",
"if",
"(",
"shouldAbort",
"(",
")",
")",
"{",
"try",
"{",
"abort",
"(",
")",
";",
"// execute subclass specific abortion logic",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"LogFactory",
".",
"getLog",
"(",
"getClass",
"(",
")",
")",
".",
"debug",
"(",
"\"FYI\"",
",",
"e",
")",
";",
"}",
"throw",
"new",
"AbortedException",
"(",
")",
";",
"}",
"}"
] |
Aborts with subclass specific abortion logic executed if needed.
Note the interrupted status of the thread is cleared by this method.
@throws AbortedException if found necessary.
|
[
"Aborts",
"with",
"subclass",
"specific",
"abortion",
"logic",
"executed",
"if",
"needed",
".",
"Note",
"the",
"interrupted",
"status",
"of",
"the",
"thread",
"is",
"cleared",
"by",
"this",
"method",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/internal/SdkInputStream.java#L53-L62
|
19,740
|
aws/aws-sdk-java
|
aws-java-sdk-sts/src/main/java/com/amazonaws/auth/STSAssumeRoleSessionCredentialsProvider.java
|
STSAssumeRoleSessionCredentialsProvider.buildStsClient
|
private static AWSSecurityTokenService buildStsClient(Builder builder) throws
IllegalArgumentException {
/**
* Passing two types of credential interfaces is not permitted
*/
if (builder.longLivedCredentials != null && builder.longLivedCredentialsProvider != null) {
throw new IllegalArgumentException(
"It is illegal to set both an AWSCredentials and an AWSCredentialsProvider for an " +
STSAssumeRoleSessionCredentialsProvider.class.getName());
}
AWSCredentialsProvider longLivedCredentialsProvider = null;
if (builder.longLivedCredentials != null) {
longLivedCredentialsProvider = new StaticCredentialsProvider(
builder.longLivedCredentials);
} else if (builder.longLivedCredentialsProvider != null) {
longLivedCredentialsProvider = builder.longLivedCredentialsProvider;
}
// Depending on which options are explicitly provided we have to call the right overloaded constructor so
// defaults are properly applied.
if (longLivedCredentialsProvider == null) {
if (builder.clientConfiguration == null) {
return new AWSSecurityTokenServiceClient();
} else {
return new AWSSecurityTokenServiceClient(builder.clientConfiguration);
}
} else {
if (builder.clientConfiguration == null) {
return new AWSSecurityTokenServiceClient(longLivedCredentialsProvider);
} else {
return new AWSSecurityTokenServiceClient(longLivedCredentialsProvider,
builder.clientConfiguration);
}
}
}
|
java
|
private static AWSSecurityTokenService buildStsClient(Builder builder) throws
IllegalArgumentException {
/**
* Passing two types of credential interfaces is not permitted
*/
if (builder.longLivedCredentials != null && builder.longLivedCredentialsProvider != null) {
throw new IllegalArgumentException(
"It is illegal to set both an AWSCredentials and an AWSCredentialsProvider for an " +
STSAssumeRoleSessionCredentialsProvider.class.getName());
}
AWSCredentialsProvider longLivedCredentialsProvider = null;
if (builder.longLivedCredentials != null) {
longLivedCredentialsProvider = new StaticCredentialsProvider(
builder.longLivedCredentials);
} else if (builder.longLivedCredentialsProvider != null) {
longLivedCredentialsProvider = builder.longLivedCredentialsProvider;
}
// Depending on which options are explicitly provided we have to call the right overloaded constructor so
// defaults are properly applied.
if (longLivedCredentialsProvider == null) {
if (builder.clientConfiguration == null) {
return new AWSSecurityTokenServiceClient();
} else {
return new AWSSecurityTokenServiceClient(builder.clientConfiguration);
}
} else {
if (builder.clientConfiguration == null) {
return new AWSSecurityTokenServiceClient(longLivedCredentialsProvider);
} else {
return new AWSSecurityTokenServiceClient(longLivedCredentialsProvider,
builder.clientConfiguration);
}
}
}
|
[
"private",
"static",
"AWSSecurityTokenService",
"buildStsClient",
"(",
"Builder",
"builder",
")",
"throws",
"IllegalArgumentException",
"{",
"/**\n * Passing two types of credential interfaces is not permitted\n */",
"if",
"(",
"builder",
".",
"longLivedCredentials",
"!=",
"null",
"&&",
"builder",
".",
"longLivedCredentialsProvider",
"!=",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"It is illegal to set both an AWSCredentials and an AWSCredentialsProvider for an \"",
"+",
"STSAssumeRoleSessionCredentialsProvider",
".",
"class",
".",
"getName",
"(",
")",
")",
";",
"}",
"AWSCredentialsProvider",
"longLivedCredentialsProvider",
"=",
"null",
";",
"if",
"(",
"builder",
".",
"longLivedCredentials",
"!=",
"null",
")",
"{",
"longLivedCredentialsProvider",
"=",
"new",
"StaticCredentialsProvider",
"(",
"builder",
".",
"longLivedCredentials",
")",
";",
"}",
"else",
"if",
"(",
"builder",
".",
"longLivedCredentialsProvider",
"!=",
"null",
")",
"{",
"longLivedCredentialsProvider",
"=",
"builder",
".",
"longLivedCredentialsProvider",
";",
"}",
"// Depending on which options are explicitly provided we have to call the right overloaded constructor so",
"// defaults are properly applied.",
"if",
"(",
"longLivedCredentialsProvider",
"==",
"null",
")",
"{",
"if",
"(",
"builder",
".",
"clientConfiguration",
"==",
"null",
")",
"{",
"return",
"new",
"AWSSecurityTokenServiceClient",
"(",
")",
";",
"}",
"else",
"{",
"return",
"new",
"AWSSecurityTokenServiceClient",
"(",
"builder",
".",
"clientConfiguration",
")",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"builder",
".",
"clientConfiguration",
"==",
"null",
")",
"{",
"return",
"new",
"AWSSecurityTokenServiceClient",
"(",
"longLivedCredentialsProvider",
")",
";",
"}",
"else",
"{",
"return",
"new",
"AWSSecurityTokenServiceClient",
"(",
"longLivedCredentialsProvider",
",",
"builder",
".",
"clientConfiguration",
")",
";",
"}",
"}",
"}"
] |
Construct a new STS client from the settings in the builder.
@param builder Configured builder
@return New instance of AWSSecurityTokenService
@throws IllegalArgumentException if builder configuration is inconsistent
|
[
"Construct",
"a",
"new",
"STS",
"client",
"from",
"the",
"settings",
"in",
"the",
"builder",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sts/src/main/java/com/amazonaws/auth/STSAssumeRoleSessionCredentialsProvider.java#L242-L277
|
19,741
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/util/Md5Utils.java
|
Md5Utils.computeMD5Hash
|
public static byte[] computeMD5Hash(InputStream is) throws IOException {
BufferedInputStream bis = new BufferedInputStream(is);
try {
MessageDigest messageDigest = MessageDigest.getInstance("MD5");
byte[] buffer = new byte[SIXTEEN_K];
int bytesRead;
while ( (bytesRead = bis.read(buffer, 0, buffer.length)) != -1 ) {
messageDigest.update(buffer, 0, bytesRead);
}
return messageDigest.digest();
} catch (NoSuchAlgorithmException e) {
// should never get here
throw new IllegalStateException(e);
} finally {
try {
bis.close();
} catch (Exception e) {
LogFactory.getLog(Md5Utils.class).debug(
"Unable to close input stream of hash candidate: " + e);
}
}
}
|
java
|
public static byte[] computeMD5Hash(InputStream is) throws IOException {
BufferedInputStream bis = new BufferedInputStream(is);
try {
MessageDigest messageDigest = MessageDigest.getInstance("MD5");
byte[] buffer = new byte[SIXTEEN_K];
int bytesRead;
while ( (bytesRead = bis.read(buffer, 0, buffer.length)) != -1 ) {
messageDigest.update(buffer, 0, bytesRead);
}
return messageDigest.digest();
} catch (NoSuchAlgorithmException e) {
// should never get here
throw new IllegalStateException(e);
} finally {
try {
bis.close();
} catch (Exception e) {
LogFactory.getLog(Md5Utils.class).debug(
"Unable to close input stream of hash candidate: " + e);
}
}
}
|
[
"public",
"static",
"byte",
"[",
"]",
"computeMD5Hash",
"(",
"InputStream",
"is",
")",
"throws",
"IOException",
"{",
"BufferedInputStream",
"bis",
"=",
"new",
"BufferedInputStream",
"(",
"is",
")",
";",
"try",
"{",
"MessageDigest",
"messageDigest",
"=",
"MessageDigest",
".",
"getInstance",
"(",
"\"MD5\"",
")",
";",
"byte",
"[",
"]",
"buffer",
"=",
"new",
"byte",
"[",
"SIXTEEN_K",
"]",
";",
"int",
"bytesRead",
";",
"while",
"(",
"(",
"bytesRead",
"=",
"bis",
".",
"read",
"(",
"buffer",
",",
"0",
",",
"buffer",
".",
"length",
")",
")",
"!=",
"-",
"1",
")",
"{",
"messageDigest",
".",
"update",
"(",
"buffer",
",",
"0",
",",
"bytesRead",
")",
";",
"}",
"return",
"messageDigest",
".",
"digest",
"(",
")",
";",
"}",
"catch",
"(",
"NoSuchAlgorithmException",
"e",
")",
"{",
"// should never get here\r",
"throw",
"new",
"IllegalStateException",
"(",
"e",
")",
";",
"}",
"finally",
"{",
"try",
"{",
"bis",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"LogFactory",
".",
"getLog",
"(",
"Md5Utils",
".",
"class",
")",
".",
"debug",
"(",
"\"Unable to close input stream of hash candidate: \"",
"+",
"e",
")",
";",
"}",
"}",
"}"
] |
Computes the MD5 hash of the data in the given input stream and returns
it as an array of bytes.
Note this method closes the given input stream upon completion.
|
[
"Computes",
"the",
"MD5",
"hash",
"of",
"the",
"data",
"in",
"the",
"given",
"input",
"stream",
"and",
"returns",
"it",
"as",
"an",
"array",
"of",
"bytes",
".",
"Note",
"this",
"method",
"closes",
"the",
"given",
"input",
"stream",
"upon",
"completion",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/Md5Utils.java#L41-L62
|
19,742
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/util/Md5Utils.java
|
Md5Utils.computeMD5Hash
|
public static byte[] computeMD5Hash(byte[] input) {
try {
MessageDigest md = MessageDigest.getInstance("MD5");
return md.digest(input);
} catch (NoSuchAlgorithmException e) {
// should never get here
throw new IllegalStateException(e);
}
}
|
java
|
public static byte[] computeMD5Hash(byte[] input) {
try {
MessageDigest md = MessageDigest.getInstance("MD5");
return md.digest(input);
} catch (NoSuchAlgorithmException e) {
// should never get here
throw new IllegalStateException(e);
}
}
|
[
"public",
"static",
"byte",
"[",
"]",
"computeMD5Hash",
"(",
"byte",
"[",
"]",
"input",
")",
"{",
"try",
"{",
"MessageDigest",
"md",
"=",
"MessageDigest",
".",
"getInstance",
"(",
"\"MD5\"",
")",
";",
"return",
"md",
".",
"digest",
"(",
"input",
")",
";",
"}",
"catch",
"(",
"NoSuchAlgorithmException",
"e",
")",
"{",
"// should never get here\r",
"throw",
"new",
"IllegalStateException",
"(",
"e",
")",
";",
"}",
"}"
] |
Computes the MD5 hash of the given data and returns it as an array of
bytes.
|
[
"Computes",
"the",
"MD5",
"hash",
"of",
"the",
"given",
"data",
"and",
"returns",
"it",
"as",
"an",
"array",
"of",
"bytes",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/Md5Utils.java#L76-L84
|
19,743
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/util/Md5Utils.java
|
Md5Utils.md5AsBase64
|
public static String md5AsBase64(File file) throws FileNotFoundException, IOException {
return Base64.encodeAsString(computeMD5Hash(file));
}
|
java
|
public static String md5AsBase64(File file) throws FileNotFoundException, IOException {
return Base64.encodeAsString(computeMD5Hash(file));
}
|
[
"public",
"static",
"String",
"md5AsBase64",
"(",
"File",
"file",
")",
"throws",
"FileNotFoundException",
",",
"IOException",
"{",
"return",
"Base64",
".",
"encodeAsString",
"(",
"computeMD5Hash",
"(",
"file",
")",
")",
";",
"}"
] |
Returns the MD5 in base64 for the given file.
|
[
"Returns",
"the",
"MD5",
"in",
"base64",
"for",
"the",
"given",
"file",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/Md5Utils.java#L103-L105
|
19,744
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/UploadCallable.java
|
UploadCallable.uploadInOneChunk
|
private UploadResult uploadInOneChunk() {
PutObjectResult putObjectResult = s3.putObject(origReq);
UploadResult uploadResult = new UploadResult();
uploadResult.setBucketName(origReq.getBucketName());
uploadResult.setKey(origReq.getKey());
uploadResult.setETag(putObjectResult.getETag());
uploadResult.setVersionId(putObjectResult.getVersionId());
return uploadResult;
}
|
java
|
private UploadResult uploadInOneChunk() {
PutObjectResult putObjectResult = s3.putObject(origReq);
UploadResult uploadResult = new UploadResult();
uploadResult.setBucketName(origReq.getBucketName());
uploadResult.setKey(origReq.getKey());
uploadResult.setETag(putObjectResult.getETag());
uploadResult.setVersionId(putObjectResult.getVersionId());
return uploadResult;
}
|
[
"private",
"UploadResult",
"uploadInOneChunk",
"(",
")",
"{",
"PutObjectResult",
"putObjectResult",
"=",
"s3",
".",
"putObject",
"(",
"origReq",
")",
";",
"UploadResult",
"uploadResult",
"=",
"new",
"UploadResult",
"(",
")",
";",
"uploadResult",
".",
"setBucketName",
"(",
"origReq",
".",
"getBucketName",
"(",
")",
")",
";",
"uploadResult",
".",
"setKey",
"(",
"origReq",
".",
"getKey",
"(",
")",
")",
";",
"uploadResult",
".",
"setETag",
"(",
"putObjectResult",
".",
"getETag",
"(",
")",
")",
";",
"uploadResult",
".",
"setVersionId",
"(",
"putObjectResult",
".",
"getVersionId",
"(",
")",
")",
";",
"return",
"uploadResult",
";",
"}"
] |
Uploads the given request in a single chunk and returns the result.
|
[
"Uploads",
"the",
"given",
"request",
"in",
"a",
"single",
"chunk",
"and",
"returns",
"the",
"result",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/UploadCallable.java#L130-L139
|
19,745
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/UploadCallable.java
|
UploadCallable.captureUploadStateIfPossible
|
private void captureUploadStateIfPossible() {
if (origReq.getSSECustomerKey() == null) {
persistableUpload = new PersistableUpload(origReq.getBucketName(),
origReq.getKey(), origReq.getFile()
.getAbsolutePath(), multipartUploadId,
configuration.getMinimumUploadPartSize(),
configuration.getMultipartUploadThreshold());
notifyPersistableTransferAvailability();
}
}
|
java
|
private void captureUploadStateIfPossible() {
if (origReq.getSSECustomerKey() == null) {
persistableUpload = new PersistableUpload(origReq.getBucketName(),
origReq.getKey(), origReq.getFile()
.getAbsolutePath(), multipartUploadId,
configuration.getMinimumUploadPartSize(),
configuration.getMultipartUploadThreshold());
notifyPersistableTransferAvailability();
}
}
|
[
"private",
"void",
"captureUploadStateIfPossible",
"(",
")",
"{",
"if",
"(",
"origReq",
".",
"getSSECustomerKey",
"(",
")",
"==",
"null",
")",
"{",
"persistableUpload",
"=",
"new",
"PersistableUpload",
"(",
"origReq",
".",
"getBucketName",
"(",
")",
",",
"origReq",
".",
"getKey",
"(",
")",
",",
"origReq",
".",
"getFile",
"(",
")",
".",
"getAbsolutePath",
"(",
")",
",",
"multipartUploadId",
",",
"configuration",
".",
"getMinimumUploadPartSize",
"(",
")",
",",
"configuration",
".",
"getMultipartUploadThreshold",
"(",
")",
")",
";",
"notifyPersistableTransferAvailability",
"(",
")",
";",
"}",
"}"
] |
Captures the state of the upload.
|
[
"Captures",
"the",
"state",
"of",
"the",
"upload",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/UploadCallable.java#L144-L153
|
19,746
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/UploadCallable.java
|
UploadCallable.uploadInParts
|
private UploadResult uploadInParts() throws Exception {
boolean isUsingEncryption = s3 instanceof AmazonS3Encryption;
long optimalPartSize = getOptimalPartSize(isUsingEncryption);
try {
if (multipartUploadId == null) {
multipartUploadId = initiateMultipartUpload(origReq,
isUsingEncryption);
}
UploadPartRequestFactory requestFactory = new UploadPartRequestFactory(origReq, multipartUploadId, optimalPartSize);
if (TransferManagerUtils.isUploadParallelizable(origReq, isUsingEncryption)) {
captureUploadStateIfPossible();
uploadPartsInParallel(requestFactory, multipartUploadId);
return null;
} else {
return uploadPartsInSeries(requestFactory);
}
} catch (Exception e) {
publishProgress(listener, ProgressEventType.TRANSFER_FAILED_EVENT);
performAbortMultipartUpload();
throw e;
} finally {
if (origReq.getInputStream() != null) {
try {origReq.getInputStream().close(); } catch (Exception e) {
log.warn("Unable to cleanly close input stream: " + e.getMessage(), e);
}
}
}
}
|
java
|
private UploadResult uploadInParts() throws Exception {
boolean isUsingEncryption = s3 instanceof AmazonS3Encryption;
long optimalPartSize = getOptimalPartSize(isUsingEncryption);
try {
if (multipartUploadId == null) {
multipartUploadId = initiateMultipartUpload(origReq,
isUsingEncryption);
}
UploadPartRequestFactory requestFactory = new UploadPartRequestFactory(origReq, multipartUploadId, optimalPartSize);
if (TransferManagerUtils.isUploadParallelizable(origReq, isUsingEncryption)) {
captureUploadStateIfPossible();
uploadPartsInParallel(requestFactory, multipartUploadId);
return null;
} else {
return uploadPartsInSeries(requestFactory);
}
} catch (Exception e) {
publishProgress(listener, ProgressEventType.TRANSFER_FAILED_EVENT);
performAbortMultipartUpload();
throw e;
} finally {
if (origReq.getInputStream() != null) {
try {origReq.getInputStream().close(); } catch (Exception e) {
log.warn("Unable to cleanly close input stream: " + e.getMessage(), e);
}
}
}
}
|
[
"private",
"UploadResult",
"uploadInParts",
"(",
")",
"throws",
"Exception",
"{",
"boolean",
"isUsingEncryption",
"=",
"s3",
"instanceof",
"AmazonS3Encryption",
";",
"long",
"optimalPartSize",
"=",
"getOptimalPartSize",
"(",
"isUsingEncryption",
")",
";",
"try",
"{",
"if",
"(",
"multipartUploadId",
"==",
"null",
")",
"{",
"multipartUploadId",
"=",
"initiateMultipartUpload",
"(",
"origReq",
",",
"isUsingEncryption",
")",
";",
"}",
"UploadPartRequestFactory",
"requestFactory",
"=",
"new",
"UploadPartRequestFactory",
"(",
"origReq",
",",
"multipartUploadId",
",",
"optimalPartSize",
")",
";",
"if",
"(",
"TransferManagerUtils",
".",
"isUploadParallelizable",
"(",
"origReq",
",",
"isUsingEncryption",
")",
")",
"{",
"captureUploadStateIfPossible",
"(",
")",
";",
"uploadPartsInParallel",
"(",
"requestFactory",
",",
"multipartUploadId",
")",
";",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"uploadPartsInSeries",
"(",
"requestFactory",
")",
";",
"}",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"publishProgress",
"(",
"listener",
",",
"ProgressEventType",
".",
"TRANSFER_FAILED_EVENT",
")",
";",
"performAbortMultipartUpload",
"(",
")",
";",
"throw",
"e",
";",
"}",
"finally",
"{",
"if",
"(",
"origReq",
".",
"getInputStream",
"(",
")",
"!=",
"null",
")",
"{",
"try",
"{",
"origReq",
".",
"getInputStream",
"(",
")",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"log",
".",
"warn",
"(",
"\"Unable to cleanly close input stream: \"",
"+",
"e",
".",
"getMessage",
"(",
")",
",",
"e",
")",
";",
"}",
"}",
"}",
"}"
] |
Uploads the request in multiple chunks, submitting each upload chunk task
to the thread pool and recording its corresponding Future object, as well
as the multipart upload id.
|
[
"Uploads",
"the",
"request",
"in",
"multiple",
"chunks",
"submitting",
"each",
"upload",
"chunk",
"task",
"to",
"the",
"thread",
"pool",
"and",
"recording",
"its",
"corresponding",
"Future",
"object",
"as",
"well",
"as",
"the",
"multipart",
"upload",
"id",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/UploadCallable.java#L172-L202
|
19,747
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/UploadCallable.java
|
UploadCallable.getOptimalPartSize
|
private long getOptimalPartSize(boolean isUsingEncryption) {
long optimalPartSize = TransferManagerUtils.calculateOptimalPartSize(origReq, configuration);
if (isUsingEncryption && optimalPartSize % 32 > 0) {
// When using encryption, parts must line up correctly along cipher block boundaries
optimalPartSize = optimalPartSize - (optimalPartSize % 32) + 32 ;
}
log.debug("Calculated optimal part size: " + optimalPartSize);
return optimalPartSize;
}
|
java
|
private long getOptimalPartSize(boolean isUsingEncryption) {
long optimalPartSize = TransferManagerUtils.calculateOptimalPartSize(origReq, configuration);
if (isUsingEncryption && optimalPartSize % 32 > 0) {
// When using encryption, parts must line up correctly along cipher block boundaries
optimalPartSize = optimalPartSize - (optimalPartSize % 32) + 32 ;
}
log.debug("Calculated optimal part size: " + optimalPartSize);
return optimalPartSize;
}
|
[
"private",
"long",
"getOptimalPartSize",
"(",
"boolean",
"isUsingEncryption",
")",
"{",
"long",
"optimalPartSize",
"=",
"TransferManagerUtils",
".",
"calculateOptimalPartSize",
"(",
"origReq",
",",
"configuration",
")",
";",
"if",
"(",
"isUsingEncryption",
"&&",
"optimalPartSize",
"%",
"32",
">",
"0",
")",
"{",
"// When using encryption, parts must line up correctly along cipher block boundaries",
"optimalPartSize",
"=",
"optimalPartSize",
"-",
"(",
"optimalPartSize",
"%",
"32",
")",
"+",
"32",
";",
"}",
"log",
".",
"debug",
"(",
"\"Calculated optimal part size: \"",
"+",
"optimalPartSize",
")",
";",
"return",
"optimalPartSize",
";",
"}"
] |
Computes and returns the optimal part size for the upload.
|
[
"Computes",
"and",
"returns",
"the",
"optimal",
"part",
"size",
"for",
"the",
"upload",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/UploadCallable.java#L228-L236
|
19,748
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/UploadCallable.java
|
UploadCallable.uploadPartsInSeries
|
private UploadResult uploadPartsInSeries(UploadPartRequestFactory requestFactory) {
final List<PartETag> partETags = new ArrayList<PartETag>();
while (requestFactory.hasMoreRequests()) {
if (threadPool.isShutdown()) throw new CancellationException("TransferManager has been shutdown");
UploadPartRequest uploadPartRequest = requestFactory.getNextUploadPartRequest();
// Mark the stream in case we need to reset it
InputStream inputStream = uploadPartRequest.getInputStream();
if (inputStream != null && inputStream.markSupported()) {
if (uploadPartRequest.getPartSize() >= Integer.MAX_VALUE) {
inputStream.mark(Integer.MAX_VALUE);
} else {
inputStream.mark((int)uploadPartRequest.getPartSize());
}
}
partETags.add(s3.uploadPart(uploadPartRequest).getPartETag());
}
CompleteMultipartUploadRequest req =
new CompleteMultipartUploadRequest(
origReq.getBucketName(), origReq.getKey(), multipartUploadId,
partETags)
.withRequesterPays(origReq.isRequesterPays())
.withGeneralProgressListener(origReq.getGeneralProgressListener())
.withRequestMetricCollector(origReq.getRequestMetricCollector())
;
CompleteMultipartUploadResult res = s3.completeMultipartUpload(req);
UploadResult uploadResult = new UploadResult();
uploadResult.setBucketName(res.getBucketName());
uploadResult.setKey(res.getKey());
uploadResult.setETag(res.getETag());
uploadResult.setVersionId(res.getVersionId());
return uploadResult;
}
|
java
|
private UploadResult uploadPartsInSeries(UploadPartRequestFactory requestFactory) {
final List<PartETag> partETags = new ArrayList<PartETag>();
while (requestFactory.hasMoreRequests()) {
if (threadPool.isShutdown()) throw new CancellationException("TransferManager has been shutdown");
UploadPartRequest uploadPartRequest = requestFactory.getNextUploadPartRequest();
// Mark the stream in case we need to reset it
InputStream inputStream = uploadPartRequest.getInputStream();
if (inputStream != null && inputStream.markSupported()) {
if (uploadPartRequest.getPartSize() >= Integer.MAX_VALUE) {
inputStream.mark(Integer.MAX_VALUE);
} else {
inputStream.mark((int)uploadPartRequest.getPartSize());
}
}
partETags.add(s3.uploadPart(uploadPartRequest).getPartETag());
}
CompleteMultipartUploadRequest req =
new CompleteMultipartUploadRequest(
origReq.getBucketName(), origReq.getKey(), multipartUploadId,
partETags)
.withRequesterPays(origReq.isRequesterPays())
.withGeneralProgressListener(origReq.getGeneralProgressListener())
.withRequestMetricCollector(origReq.getRequestMetricCollector())
;
CompleteMultipartUploadResult res = s3.completeMultipartUpload(req);
UploadResult uploadResult = new UploadResult();
uploadResult.setBucketName(res.getBucketName());
uploadResult.setKey(res.getKey());
uploadResult.setETag(res.getETag());
uploadResult.setVersionId(res.getVersionId());
return uploadResult;
}
|
[
"private",
"UploadResult",
"uploadPartsInSeries",
"(",
"UploadPartRequestFactory",
"requestFactory",
")",
"{",
"final",
"List",
"<",
"PartETag",
">",
"partETags",
"=",
"new",
"ArrayList",
"<",
"PartETag",
">",
"(",
")",
";",
"while",
"(",
"requestFactory",
".",
"hasMoreRequests",
"(",
")",
")",
"{",
"if",
"(",
"threadPool",
".",
"isShutdown",
"(",
")",
")",
"throw",
"new",
"CancellationException",
"(",
"\"TransferManager has been shutdown\"",
")",
";",
"UploadPartRequest",
"uploadPartRequest",
"=",
"requestFactory",
".",
"getNextUploadPartRequest",
"(",
")",
";",
"// Mark the stream in case we need to reset it",
"InputStream",
"inputStream",
"=",
"uploadPartRequest",
".",
"getInputStream",
"(",
")",
";",
"if",
"(",
"inputStream",
"!=",
"null",
"&&",
"inputStream",
".",
"markSupported",
"(",
")",
")",
"{",
"if",
"(",
"uploadPartRequest",
".",
"getPartSize",
"(",
")",
">=",
"Integer",
".",
"MAX_VALUE",
")",
"{",
"inputStream",
".",
"mark",
"(",
"Integer",
".",
"MAX_VALUE",
")",
";",
"}",
"else",
"{",
"inputStream",
".",
"mark",
"(",
"(",
"int",
")",
"uploadPartRequest",
".",
"getPartSize",
"(",
")",
")",
";",
"}",
"}",
"partETags",
".",
"add",
"(",
"s3",
".",
"uploadPart",
"(",
"uploadPartRequest",
")",
".",
"getPartETag",
"(",
")",
")",
";",
"}",
"CompleteMultipartUploadRequest",
"req",
"=",
"new",
"CompleteMultipartUploadRequest",
"(",
"origReq",
".",
"getBucketName",
"(",
")",
",",
"origReq",
".",
"getKey",
"(",
")",
",",
"multipartUploadId",
",",
"partETags",
")",
".",
"withRequesterPays",
"(",
"origReq",
".",
"isRequesterPays",
"(",
")",
")",
".",
"withGeneralProgressListener",
"(",
"origReq",
".",
"getGeneralProgressListener",
"(",
")",
")",
".",
"withRequestMetricCollector",
"(",
"origReq",
".",
"getRequestMetricCollector",
"(",
")",
")",
";",
"CompleteMultipartUploadResult",
"res",
"=",
"s3",
".",
"completeMultipartUpload",
"(",
"req",
")",
";",
"UploadResult",
"uploadResult",
"=",
"new",
"UploadResult",
"(",
")",
";",
"uploadResult",
".",
"setBucketName",
"(",
"res",
".",
"getBucketName",
"(",
")",
")",
";",
"uploadResult",
".",
"setKey",
"(",
"res",
".",
"getKey",
"(",
")",
")",
";",
"uploadResult",
".",
"setETag",
"(",
"res",
".",
"getETag",
"(",
")",
")",
";",
"uploadResult",
".",
"setVersionId",
"(",
"res",
".",
"getVersionId",
"(",
")",
")",
";",
"return",
"uploadResult",
";",
"}"
] |
Uploads all parts in the request in serial in this thread, then completes
the upload and returns the result.
|
[
"Uploads",
"all",
"parts",
"in",
"the",
"request",
"in",
"serial",
"in",
"this",
"thread",
"then",
"completes",
"the",
"upload",
"and",
"returns",
"the",
"result",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/UploadCallable.java#L242-L277
|
19,749
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/UploadCallable.java
|
UploadCallable.uploadPartsInParallel
|
private void uploadPartsInParallel(UploadPartRequestFactory requestFactory,
String uploadId) {
Map<Integer,PartSummary> partNumbers = identifyExistingPartsForResume(uploadId);
while (requestFactory.hasMoreRequests()) {
if (threadPool.isShutdown()) throw new CancellationException("TransferManager has been shutdown");
UploadPartRequest request = requestFactory.getNextUploadPartRequest();
if (partNumbers.containsKey(request.getPartNumber())) {
PartSummary summary = partNumbers.get(request.getPartNumber());
eTagsToSkip.add(new PartETag(request.getPartNumber(), summary
.getETag()));
transferProgress.updateProgress(summary.getSize());
continue;
}
futures.add(threadPool.submit(new UploadPartCallable(s3, request, shouldCalculatePartMd5())));
}
}
|
java
|
private void uploadPartsInParallel(UploadPartRequestFactory requestFactory,
String uploadId) {
Map<Integer,PartSummary> partNumbers = identifyExistingPartsForResume(uploadId);
while (requestFactory.hasMoreRequests()) {
if (threadPool.isShutdown()) throw new CancellationException("TransferManager has been shutdown");
UploadPartRequest request = requestFactory.getNextUploadPartRequest();
if (partNumbers.containsKey(request.getPartNumber())) {
PartSummary summary = partNumbers.get(request.getPartNumber());
eTagsToSkip.add(new PartETag(request.getPartNumber(), summary
.getETag()));
transferProgress.updateProgress(summary.getSize());
continue;
}
futures.add(threadPool.submit(new UploadPartCallable(s3, request, shouldCalculatePartMd5())));
}
}
|
[
"private",
"void",
"uploadPartsInParallel",
"(",
"UploadPartRequestFactory",
"requestFactory",
",",
"String",
"uploadId",
")",
"{",
"Map",
"<",
"Integer",
",",
"PartSummary",
">",
"partNumbers",
"=",
"identifyExistingPartsForResume",
"(",
"uploadId",
")",
";",
"while",
"(",
"requestFactory",
".",
"hasMoreRequests",
"(",
")",
")",
"{",
"if",
"(",
"threadPool",
".",
"isShutdown",
"(",
")",
")",
"throw",
"new",
"CancellationException",
"(",
"\"TransferManager has been shutdown\"",
")",
";",
"UploadPartRequest",
"request",
"=",
"requestFactory",
".",
"getNextUploadPartRequest",
"(",
")",
";",
"if",
"(",
"partNumbers",
".",
"containsKey",
"(",
"request",
".",
"getPartNumber",
"(",
")",
")",
")",
"{",
"PartSummary",
"summary",
"=",
"partNumbers",
".",
"get",
"(",
"request",
".",
"getPartNumber",
"(",
")",
")",
";",
"eTagsToSkip",
".",
"add",
"(",
"new",
"PartETag",
"(",
"request",
".",
"getPartNumber",
"(",
")",
",",
"summary",
".",
"getETag",
"(",
")",
")",
")",
";",
"transferProgress",
".",
"updateProgress",
"(",
"summary",
".",
"getSize",
"(",
")",
")",
";",
"continue",
";",
"}",
"futures",
".",
"add",
"(",
"threadPool",
".",
"submit",
"(",
"new",
"UploadPartCallable",
"(",
"s3",
",",
"request",
",",
"shouldCalculatePartMd5",
"(",
")",
")",
")",
")",
";",
"}",
"}"
] |
Submits a callable for each part to upload to our thread pool and records its corresponding Future.
|
[
"Submits",
"a",
"callable",
"for",
"each",
"part",
"to",
"upload",
"to",
"our",
"thread",
"pool",
"and",
"records",
"its",
"corresponding",
"Future",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/UploadCallable.java#L282-L299
|
19,750
|
aws/aws-sdk-java
|
aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/ListBulkDeploymentsResult.java
|
ListBulkDeploymentsResult.setBulkDeployments
|
public void setBulkDeployments(java.util.Collection<BulkDeployment> bulkDeployments) {
if (bulkDeployments == null) {
this.bulkDeployments = null;
return;
}
this.bulkDeployments = new java.util.ArrayList<BulkDeployment>(bulkDeployments);
}
|
java
|
public void setBulkDeployments(java.util.Collection<BulkDeployment> bulkDeployments) {
if (bulkDeployments == null) {
this.bulkDeployments = null;
return;
}
this.bulkDeployments = new java.util.ArrayList<BulkDeployment>(bulkDeployments);
}
|
[
"public",
"void",
"setBulkDeployments",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"BulkDeployment",
">",
"bulkDeployments",
")",
"{",
"if",
"(",
"bulkDeployments",
"==",
"null",
")",
"{",
"this",
".",
"bulkDeployments",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"bulkDeployments",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"BulkDeployment",
">",
"(",
"bulkDeployments",
")",
";",
"}"
] |
A list of bulk deployments.
@param bulkDeployments
A list of bulk deployments.
|
[
"A",
"list",
"of",
"bulk",
"deployments",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/ListBulkDeploymentsResult.java#L48-L55
|
19,751
|
aws/aws-sdk-java
|
aws-java-sdk-lambda/src/main/java/com/amazonaws/services/lambda/AWSLambdaAsyncClient.java
|
AWSLambdaAsyncClient.listEventSourceMappingsAsync
|
@Override
public java.util.concurrent.Future<ListEventSourceMappingsResult> listEventSourceMappingsAsync(
com.amazonaws.handlers.AsyncHandler<ListEventSourceMappingsRequest, ListEventSourceMappingsResult> asyncHandler) {
return listEventSourceMappingsAsync(new ListEventSourceMappingsRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<ListEventSourceMappingsResult> listEventSourceMappingsAsync(
com.amazonaws.handlers.AsyncHandler<ListEventSourceMappingsRequest, ListEventSourceMappingsResult> asyncHandler) {
return listEventSourceMappingsAsync(new ListEventSourceMappingsRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"ListEventSourceMappingsResult",
">",
"listEventSourceMappingsAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"ListEventSourceMappingsRequest",
",",
"ListEventSourceMappingsResult",
">",
"asyncHandler",
")",
"{",
"return",
"listEventSourceMappingsAsync",
"(",
"new",
"ListEventSourceMappingsRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the ListEventSourceMappings operation with an AsyncHandler.
@see #listEventSourceMappingsAsync(ListEventSourceMappingsRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"ListEventSourceMappings",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-lambda/src/main/java/com/amazonaws/services/lambda/AWSLambdaAsyncClient.java#L1031-L1036
|
19,752
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/http/conn/ssl/privileged/PrivilegedMasterSecretValidator.java
|
PrivilegedMasterSecretValidator.isMasterSecretValid
|
public boolean isMasterSecretValid(final Socket socket) {
return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
@Override
public Boolean run() {
return privilegedIsMasterSecretValid(socket);
}
});
}
|
java
|
public boolean isMasterSecretValid(final Socket socket) {
return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
@Override
public Boolean run() {
return privilegedIsMasterSecretValid(socket);
}
});
}
|
[
"public",
"boolean",
"isMasterSecretValid",
"(",
"final",
"Socket",
"socket",
")",
"{",
"return",
"AccessController",
".",
"doPrivileged",
"(",
"new",
"PrivilegedAction",
"<",
"Boolean",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Boolean",
"run",
"(",
")",
"{",
"return",
"privilegedIsMasterSecretValid",
"(",
"socket",
")",
";",
"}",
"}",
")",
";",
"}"
] |
Double check the master secret of an SSL session is not null
@param socket
connected socket
@return True if master secret is valid (i.e. non-null) or master secret cannot be validated,
false otherwise
|
[
"Double",
"check",
"the",
"master",
"secret",
"of",
"an",
"SSL",
"session",
"is",
"not",
"null"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/http/conn/ssl/privileged/PrivilegedMasterSecretValidator.java#L48-L55
|
19,753
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/http/conn/ssl/privileged/PrivilegedMasterSecretValidator.java
|
PrivilegedMasterSecretValidator.privilegedIsMasterSecretValid
|
private boolean privilegedIsMasterSecretValid(final Socket socket) {
if (socket instanceof SSLSocket) {
SSLSession session = getSslSession(socket);
if (session != null) {
String className = session.getClass().getName();
if ("sun.security.ssl.SSLSessionImpl".equals(className)) {
try {
Object masterSecret = getMasterSecret(session, className);
if (masterSecret == null) {
session.invalidate();
if (LOG.isDebugEnabled()) {
LOG.debug("Invalidated session " + session);
}
return false;
}
} catch (Exception e) {
failedToVerifyMasterSecret(e);
}
}
}
}
return true;
}
|
java
|
private boolean privilegedIsMasterSecretValid(final Socket socket) {
if (socket instanceof SSLSocket) {
SSLSession session = getSslSession(socket);
if (session != null) {
String className = session.getClass().getName();
if ("sun.security.ssl.SSLSessionImpl".equals(className)) {
try {
Object masterSecret = getMasterSecret(session, className);
if (masterSecret == null) {
session.invalidate();
if (LOG.isDebugEnabled()) {
LOG.debug("Invalidated session " + session);
}
return false;
}
} catch (Exception e) {
failedToVerifyMasterSecret(e);
}
}
}
}
return true;
}
|
[
"private",
"boolean",
"privilegedIsMasterSecretValid",
"(",
"final",
"Socket",
"socket",
")",
"{",
"if",
"(",
"socket",
"instanceof",
"SSLSocket",
")",
"{",
"SSLSession",
"session",
"=",
"getSslSession",
"(",
"socket",
")",
";",
"if",
"(",
"session",
"!=",
"null",
")",
"{",
"String",
"className",
"=",
"session",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
";",
"if",
"(",
"\"sun.security.ssl.SSLSessionImpl\"",
".",
"equals",
"(",
"className",
")",
")",
"{",
"try",
"{",
"Object",
"masterSecret",
"=",
"getMasterSecret",
"(",
"session",
",",
"className",
")",
";",
"if",
"(",
"masterSecret",
"==",
"null",
")",
"{",
"session",
".",
"invalidate",
"(",
")",
";",
"if",
"(",
"LOG",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"LOG",
".",
"debug",
"(",
"\"Invalidated session \"",
"+",
"session",
")",
";",
"}",
"return",
"false",
";",
"}",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"failedToVerifyMasterSecret",
"(",
"e",
")",
";",
"}",
"}",
"}",
"}",
"return",
"true",
";",
"}"
] |
Checks the validity of an SSLSession's master secret. Should be run within a doPrivileged
block
|
[
"Checks",
"the",
"validity",
"of",
"an",
"SSLSession",
"s",
"master",
"secret",
".",
"Should",
"be",
"run",
"within",
"a",
"doPrivileged",
"block"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/http/conn/ssl/privileged/PrivilegedMasterSecretValidator.java#L61-L84
|
19,754
|
aws/aws-sdk-java
|
aws-java-sdk-rds/src/main/java/com/amazonaws/services/rds/AbstractAmazonRDSAsync.java
|
AbstractAmazonRDSAsync.describeDBSecurityGroupsAsync
|
@Override
public java.util.concurrent.Future<DescribeDBSecurityGroupsResult> describeDBSecurityGroupsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeDBSecurityGroupsRequest, DescribeDBSecurityGroupsResult> asyncHandler) {
return describeDBSecurityGroupsAsync(new DescribeDBSecurityGroupsRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<DescribeDBSecurityGroupsResult> describeDBSecurityGroupsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeDBSecurityGroupsRequest, DescribeDBSecurityGroupsResult> asyncHandler) {
return describeDBSecurityGroupsAsync(new DescribeDBSecurityGroupsRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DescribeDBSecurityGroupsResult",
">",
"describeDBSecurityGroupsAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"DescribeDBSecurityGroupsRequest",
",",
"DescribeDBSecurityGroupsResult",
">",
"asyncHandler",
")",
"{",
"return",
"describeDBSecurityGroupsAsync",
"(",
"new",
"DescribeDBSecurityGroupsRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the DescribeDBSecurityGroups operation with an AsyncHandler.
@see #describeDBSecurityGroupsAsync(DescribeDBSecurityGroupsRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"DescribeDBSecurityGroups",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-rds/src/main/java/com/amazonaws/services/rds/AbstractAmazonRDSAsync.java#L938-L943
|
19,755
|
aws/aws-sdk-java
|
aws-java-sdk-rds/src/main/java/com/amazonaws/services/rds/AbstractAmazonRDSAsync.java
|
AbstractAmazonRDSAsync.describeDBSnapshotsAsync
|
@Override
public java.util.concurrent.Future<DescribeDBSnapshotsResult> describeDBSnapshotsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeDBSnapshotsRequest, DescribeDBSnapshotsResult> asyncHandler) {
return describeDBSnapshotsAsync(new DescribeDBSnapshotsRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<DescribeDBSnapshotsResult> describeDBSnapshotsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeDBSnapshotsRequest, DescribeDBSnapshotsResult> asyncHandler) {
return describeDBSnapshotsAsync(new DescribeDBSnapshotsRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DescribeDBSnapshotsResult",
">",
"describeDBSnapshotsAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"DescribeDBSnapshotsRequest",
",",
"DescribeDBSnapshotsResult",
">",
"asyncHandler",
")",
"{",
"return",
"describeDBSnapshotsAsync",
"(",
"new",
"DescribeDBSnapshotsRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the DescribeDBSnapshots operation with an AsyncHandler.
@see #describeDBSnapshotsAsync(DescribeDBSnapshotsRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"DescribeDBSnapshots",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-rds/src/main/java/com/amazonaws/services/rds/AbstractAmazonRDSAsync.java#L1010-L1015
|
19,756
|
aws/aws-sdk-java
|
aws-java-sdk-rds/src/main/java/com/amazonaws/services/rds/AbstractAmazonRDSAsync.java
|
AbstractAmazonRDSAsync.describeEventSubscriptionsAsync
|
@Override
public java.util.concurrent.Future<DescribeEventSubscriptionsResult> describeEventSubscriptionsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeEventSubscriptionsRequest, DescribeEventSubscriptionsResult> asyncHandler) {
return describeEventSubscriptionsAsync(new DescribeEventSubscriptionsRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<DescribeEventSubscriptionsResult> describeEventSubscriptionsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeEventSubscriptionsRequest, DescribeEventSubscriptionsResult> asyncHandler) {
return describeEventSubscriptionsAsync(new DescribeEventSubscriptionsRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DescribeEventSubscriptionsResult",
">",
"describeEventSubscriptionsAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"DescribeEventSubscriptionsRequest",
",",
"DescribeEventSubscriptionsResult",
">",
"asyncHandler",
")",
"{",
"return",
"describeEventSubscriptionsAsync",
"(",
"new",
"DescribeEventSubscriptionsRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the DescribeEventSubscriptions operation with an AsyncHandler.
@see #describeEventSubscriptionsAsync(DescribeEventSubscriptionsRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"DescribeEventSubscriptions",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-rds/src/main/java/com/amazonaws/services/rds/AbstractAmazonRDSAsync.java#L1144-L1149
|
19,757
|
aws/aws-sdk-java
|
aws-java-sdk-rds/src/main/java/com/amazonaws/services/rds/AbstractAmazonRDSAsync.java
|
AbstractAmazonRDSAsync.describeOptionGroupsAsync
|
@Override
public java.util.concurrent.Future<DescribeOptionGroupsResult> describeOptionGroupsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeOptionGroupsRequest, DescribeOptionGroupsResult> asyncHandler) {
return describeOptionGroupsAsync(new DescribeOptionGroupsRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<DescribeOptionGroupsResult> describeOptionGroupsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeOptionGroupsRequest, DescribeOptionGroupsResult> asyncHandler) {
return describeOptionGroupsAsync(new DescribeOptionGroupsRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DescribeOptionGroupsResult",
">",
"describeOptionGroupsAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"DescribeOptionGroupsRequest",
",",
"DescribeOptionGroupsResult",
">",
"asyncHandler",
")",
"{",
"return",
"describeOptionGroupsAsync",
"(",
"new",
"DescribeOptionGroupsRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the DescribeOptionGroups operation with an AsyncHandler.
@see #describeOptionGroupsAsync(DescribeOptionGroupsRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"DescribeOptionGroups",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-rds/src/main/java/com/amazonaws/services/rds/AbstractAmazonRDSAsync.java#L1242-L1247
|
19,758
|
aws/aws-sdk-java
|
aws-java-sdk-rds/src/main/java/com/amazonaws/services/rds/AbstractAmazonRDSAsync.java
|
AbstractAmazonRDSAsync.failoverDBClusterAsync
|
@Override
public java.util.concurrent.Future<DBCluster> failoverDBClusterAsync(com.amazonaws.handlers.AsyncHandler<FailoverDBClusterRequest, DBCluster> asyncHandler) {
return failoverDBClusterAsync(new FailoverDBClusterRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<DBCluster> failoverDBClusterAsync(com.amazonaws.handlers.AsyncHandler<FailoverDBClusterRequest, DBCluster> asyncHandler) {
return failoverDBClusterAsync(new FailoverDBClusterRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DBCluster",
">",
"failoverDBClusterAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"FailoverDBClusterRequest",
",",
"DBCluster",
">",
"asyncHandler",
")",
"{",
"return",
"failoverDBClusterAsync",
"(",
"new",
"FailoverDBClusterRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the FailoverDBCluster operation with an AsyncHandler.
@see #failoverDBClusterAsync(FailoverDBClusterRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"FailoverDBCluster",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-rds/src/main/java/com/amazonaws/services/rds/AbstractAmazonRDSAsync.java#L1448-L1452
|
19,759
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperConfig.java
|
DynamoDBMapperConfig.merge
|
final DynamoDBMapperConfig merge(final DynamoDBMapperConfig overrides) {
return overrides == null || this == overrides ? this : builder().merge(this).merge(overrides).build();
}
|
java
|
final DynamoDBMapperConfig merge(final DynamoDBMapperConfig overrides) {
return overrides == null || this == overrides ? this : builder().merge(this).merge(overrides).build();
}
|
[
"final",
"DynamoDBMapperConfig",
"merge",
"(",
"final",
"DynamoDBMapperConfig",
"overrides",
")",
"{",
"return",
"overrides",
"==",
"null",
"||",
"this",
"==",
"overrides",
"?",
"this",
":",
"builder",
"(",
")",
".",
"merge",
"(",
"this",
")",
".",
"merge",
"(",
"overrides",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Merges these configuration values with the specified overrides; may
simply return this instance if overrides are the same or null.
@param overrides The overrides to merge.
@return This if the overrides are same or null, or a new merged config.
|
[
"Merges",
"these",
"configuration",
"values",
"with",
"the",
"specified",
"overrides",
";",
"may",
"simply",
"return",
"this",
"instance",
"if",
"overrides",
"are",
"the",
"same",
"or",
"null",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperConfig.java#L929-L931
|
19,760
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/util/ValidationUtils.java
|
ValidationUtils.assertNotNull
|
public static <T> T assertNotNull(T object, String fieldName) throws IllegalArgumentException {
if (object == null) {
throw new IllegalArgumentException(String.format("%s cannot be null", fieldName));
}
return object;
}
|
java
|
public static <T> T assertNotNull(T object, String fieldName) throws IllegalArgumentException {
if (object == null) {
throw new IllegalArgumentException(String.format("%s cannot be null", fieldName));
}
return object;
}
|
[
"public",
"static",
"<",
"T",
">",
"T",
"assertNotNull",
"(",
"T",
"object",
",",
"String",
"fieldName",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"object",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"String",
".",
"format",
"(",
"\"%s cannot be null\"",
",",
"fieldName",
")",
")",
";",
"}",
"return",
"object",
";",
"}"
] |
Asserts that the given object is non-null and returns it.
@param object
Object to assert on
@param fieldName
Field name to display in exception message if null
@return Object if non null
@throws IllegalArgumentException
If object was null
|
[
"Asserts",
"that",
"the",
"given",
"object",
"is",
"non",
"-",
"null",
"and",
"returns",
"it",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/ValidationUtils.java#L35-L40
|
19,761
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/util/ValidationUtils.java
|
ValidationUtils.assertAllAreNull
|
public static void assertAllAreNull(String messageIfNull, Object... objects) throws IllegalArgumentException {
for (Object object : objects) {
if (object != null) {
throw new IllegalArgumentException(messageIfNull);
}
}
}
|
java
|
public static void assertAllAreNull(String messageIfNull, Object... objects) throws IllegalArgumentException {
for (Object object : objects) {
if (object != null) {
throw new IllegalArgumentException(messageIfNull);
}
}
}
|
[
"public",
"static",
"void",
"assertAllAreNull",
"(",
"String",
"messageIfNull",
",",
"Object",
"...",
"objects",
")",
"throws",
"IllegalArgumentException",
"{",
"for",
"(",
"Object",
"object",
":",
"objects",
")",
"{",
"if",
"(",
"object",
"!=",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"messageIfNull",
")",
";",
"}",
"}",
"}"
] |
Asserts that all of the objects are null.
@throws IllegalArgumentException
if any object provided was NOT null.
|
[
"Asserts",
"that",
"all",
"of",
"the",
"objects",
"are",
"null",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/ValidationUtils.java#L48-L54
|
19,762
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/DeleteObjectsRequest.java
|
DeleteObjectsRequest.withKeys
|
public DeleteObjectsRequest withKeys(String... keys) {
List<KeyVersion> keyVersions = new ArrayList<KeyVersion>(keys.length);
for (String key : keys) {
keyVersions.add(new KeyVersion(key));
}
setKeys(keyVersions);
return this;
}
|
java
|
public DeleteObjectsRequest withKeys(String... keys) {
List<KeyVersion> keyVersions = new ArrayList<KeyVersion>(keys.length);
for (String key : keys) {
keyVersions.add(new KeyVersion(key));
}
setKeys(keyVersions);
return this;
}
|
[
"public",
"DeleteObjectsRequest",
"withKeys",
"(",
"String",
"...",
"keys",
")",
"{",
"List",
"<",
"KeyVersion",
">",
"keyVersions",
"=",
"new",
"ArrayList",
"<",
"KeyVersion",
">",
"(",
"keys",
".",
"length",
")",
";",
"for",
"(",
"String",
"key",
":",
"keys",
")",
"{",
"keyVersions",
".",
"add",
"(",
"new",
"KeyVersion",
"(",
"key",
")",
")",
";",
"}",
"setKeys",
"(",
"keyVersions",
")",
";",
"return",
"this",
";",
"}"
] |
Convenience method to specify a set of keys without versions.
@see DeleteObjectsRequest#withKeys(List)
|
[
"Convenience",
"method",
"to",
"specify",
"a",
"set",
"of",
"keys",
"without",
"versions",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/DeleteObjectsRequest.java#L259-L266
|
19,763
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/ReplicationDestinationConfig.java
|
ReplicationDestinationConfig.setStorageClass
|
public void setStorageClass(StorageClass storageClass) {
setStorageClass(storageClass == null ? (String)null : storageClass.toString());
}
|
java
|
public void setStorageClass(StorageClass storageClass) {
setStorageClass(storageClass == null ? (String)null : storageClass.toString());
}
|
[
"public",
"void",
"setStorageClass",
"(",
"StorageClass",
"storageClass",
")",
"{",
"setStorageClass",
"(",
"storageClass",
"==",
"null",
"?",
"(",
"String",
")",
"null",
":",
"storageClass",
".",
"toString",
"(",
")",
")",
";",
"}"
] |
Sets the storage class for the replication destination. If not specified,
Amazon S3 uses the storage class of the source object to create object replica.
|
[
"Sets",
"the",
"storage",
"class",
"for",
"the",
"replication",
"destination",
".",
"If",
"not",
"specified",
"Amazon",
"S3",
"uses",
"the",
"storage",
"class",
"of",
"the",
"source",
"object",
"to",
"create",
"object",
"replica",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/ReplicationDestinationConfig.java#L121-L123
|
19,764
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/ReplicationDestinationConfig.java
|
ReplicationDestinationConfig.withStorageClass
|
public ReplicationDestinationConfig withStorageClass(StorageClass storageClass) {
setStorageClass(storageClass == null ? (String)null : storageClass.toString());
return this;
}
|
java
|
public ReplicationDestinationConfig withStorageClass(StorageClass storageClass) {
setStorageClass(storageClass == null ? (String)null : storageClass.toString());
return this;
}
|
[
"public",
"ReplicationDestinationConfig",
"withStorageClass",
"(",
"StorageClass",
"storageClass",
")",
"{",
"setStorageClass",
"(",
"storageClass",
"==",
"null",
"?",
"(",
"String",
")",
"null",
":",
"storageClass",
".",
"toString",
"(",
")",
")",
";",
"return",
"this",
";",
"}"
] |
Sets the storage class for the replication destination. If not specified,
Amazon S3 uses the storage class of the source object to create object replica.
Returns the updated object.
@return the updated {@link ReplicationDestinationConfig} object
|
[
"Sets",
"the",
"storage",
"class",
"for",
"the",
"replication",
"destination",
".",
"If",
"not",
"specified",
"Amazon",
"S3",
"uses",
"the",
"storage",
"class",
"of",
"the",
"source",
"object",
"to",
"create",
"object",
"replica",
".",
"Returns",
"the",
"updated",
"object",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/ReplicationDestinationConfig.java#L144-L147
|
19,765
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/AWS3Signer.java
|
AWS3Signer.sign
|
@Override
public void sign(SignableRequest<?> request, AWSCredentials credentials) throws SdkClientException {
// annonymous credentials, don't sign
if ( credentials instanceof AnonymousAWSCredentials ) {
return;
}
AWSCredentials sanitizedCredentials = sanitizeCredentials(credentials);
SigningAlgorithm algorithm = SigningAlgorithm.HmacSHA256;
String nonce = UUID.randomUUID().toString();
int timeOffset = request.getTimeOffset();
Date dateValue = getSignatureDate(timeOffset);
String date = DateUtils.formatRFC822Date(dateValue);
boolean isHttps = false;
if (overriddenDate != null) date = overriddenDate;
request.addHeader("Date", date);
request.addHeader("X-Amz-Date", date);
// AWS3 HTTP requires that we sign the Host header
// so we have to have it in the request by the time we sign.
String hostHeader = request.getEndpoint().getHost();
if (SdkHttpUtils.isUsingNonDefaultPort(request.getEndpoint())) {
hostHeader += ":" + request.getEndpoint().getPort();
}
request.addHeader("Host", hostHeader);
if ( sanitizedCredentials instanceof AWSSessionCredentials ) {
addSessionCredentials(request, (AWSSessionCredentials) sanitizedCredentials);
}
byte[] bytesToSign;
String stringToSign;
if (isHttps) {
request.addHeader(NONCE_HEADER, nonce);
stringToSign = date + nonce;
bytesToSign = stringToSign.getBytes(UTF8);
} else {
String path = SdkHttpUtils.appendUri(request.getEndpoint().getPath(), request.getResourcePath());
/*
* AWS3 requires all query params to be listed on the third line of
* the string to sign, even if those query params will be sent in
* the request body and not as a query string. POST formatted query
* params should *NOT* be included in the request payload.
*/
stringToSign = request.getHttpMethod().toString() + "\n"
+ getCanonicalizedResourcePath(path) + "\n"
+ getCanonicalizedQueryString(request.getParameters()) + "\n"
+ getCanonicalizedHeadersForStringToSign(request) + "\n"
+ getRequestPayloadWithoutQueryParams(request);
bytesToSign = hash(stringToSign);
}
if (log.isDebugEnabled())
log.debug("Calculated StringToSign: " + stringToSign);
String signature = signAndBase64Encode(bytesToSign,
sanitizedCredentials.getAWSSecretKey(), algorithm);
StringBuilder builder = new StringBuilder();
builder.append(isHttps ? HTTPS_SCHEME : HTTP_SCHEME).append(" ");
builder.append("AWSAccessKeyId=" + sanitizedCredentials.getAWSAccessKeyId() + ",");
builder.append("Algorithm=" + algorithm.toString() + ",");
if (!isHttps) {
builder.append(getSignedHeadersComponent(request) + ",");
}
builder.append("Signature=" + signature);
request.addHeader(AUTHORIZATION_HEADER, builder.toString());
}
|
java
|
@Override
public void sign(SignableRequest<?> request, AWSCredentials credentials) throws SdkClientException {
// annonymous credentials, don't sign
if ( credentials instanceof AnonymousAWSCredentials ) {
return;
}
AWSCredentials sanitizedCredentials = sanitizeCredentials(credentials);
SigningAlgorithm algorithm = SigningAlgorithm.HmacSHA256;
String nonce = UUID.randomUUID().toString();
int timeOffset = request.getTimeOffset();
Date dateValue = getSignatureDate(timeOffset);
String date = DateUtils.formatRFC822Date(dateValue);
boolean isHttps = false;
if (overriddenDate != null) date = overriddenDate;
request.addHeader("Date", date);
request.addHeader("X-Amz-Date", date);
// AWS3 HTTP requires that we sign the Host header
// so we have to have it in the request by the time we sign.
String hostHeader = request.getEndpoint().getHost();
if (SdkHttpUtils.isUsingNonDefaultPort(request.getEndpoint())) {
hostHeader += ":" + request.getEndpoint().getPort();
}
request.addHeader("Host", hostHeader);
if ( sanitizedCredentials instanceof AWSSessionCredentials ) {
addSessionCredentials(request, (AWSSessionCredentials) sanitizedCredentials);
}
byte[] bytesToSign;
String stringToSign;
if (isHttps) {
request.addHeader(NONCE_HEADER, nonce);
stringToSign = date + nonce;
bytesToSign = stringToSign.getBytes(UTF8);
} else {
String path = SdkHttpUtils.appendUri(request.getEndpoint().getPath(), request.getResourcePath());
/*
* AWS3 requires all query params to be listed on the third line of
* the string to sign, even if those query params will be sent in
* the request body and not as a query string. POST formatted query
* params should *NOT* be included in the request payload.
*/
stringToSign = request.getHttpMethod().toString() + "\n"
+ getCanonicalizedResourcePath(path) + "\n"
+ getCanonicalizedQueryString(request.getParameters()) + "\n"
+ getCanonicalizedHeadersForStringToSign(request) + "\n"
+ getRequestPayloadWithoutQueryParams(request);
bytesToSign = hash(stringToSign);
}
if (log.isDebugEnabled())
log.debug("Calculated StringToSign: " + stringToSign);
String signature = signAndBase64Encode(bytesToSign,
sanitizedCredentials.getAWSSecretKey(), algorithm);
StringBuilder builder = new StringBuilder();
builder.append(isHttps ? HTTPS_SCHEME : HTTP_SCHEME).append(" ");
builder.append("AWSAccessKeyId=" + sanitizedCredentials.getAWSAccessKeyId() + ",");
builder.append("Algorithm=" + algorithm.toString() + ",");
if (!isHttps) {
builder.append(getSignedHeadersComponent(request) + ",");
}
builder.append("Signature=" + signature);
request.addHeader(AUTHORIZATION_HEADER, builder.toString());
}
|
[
"@",
"Override",
"public",
"void",
"sign",
"(",
"SignableRequest",
"<",
"?",
">",
"request",
",",
"AWSCredentials",
"credentials",
")",
"throws",
"SdkClientException",
"{",
"// annonymous credentials, don't sign",
"if",
"(",
"credentials",
"instanceof",
"AnonymousAWSCredentials",
")",
"{",
"return",
";",
"}",
"AWSCredentials",
"sanitizedCredentials",
"=",
"sanitizeCredentials",
"(",
"credentials",
")",
";",
"SigningAlgorithm",
"algorithm",
"=",
"SigningAlgorithm",
".",
"HmacSHA256",
";",
"String",
"nonce",
"=",
"UUID",
".",
"randomUUID",
"(",
")",
".",
"toString",
"(",
")",
";",
"int",
"timeOffset",
"=",
"request",
".",
"getTimeOffset",
"(",
")",
";",
"Date",
"dateValue",
"=",
"getSignatureDate",
"(",
"timeOffset",
")",
";",
"String",
"date",
"=",
"DateUtils",
".",
"formatRFC822Date",
"(",
"dateValue",
")",
";",
"boolean",
"isHttps",
"=",
"false",
";",
"if",
"(",
"overriddenDate",
"!=",
"null",
")",
"date",
"=",
"overriddenDate",
";",
"request",
".",
"addHeader",
"(",
"\"Date\"",
",",
"date",
")",
";",
"request",
".",
"addHeader",
"(",
"\"X-Amz-Date\"",
",",
"date",
")",
";",
"// AWS3 HTTP requires that we sign the Host header",
"// so we have to have it in the request by the time we sign.",
"String",
"hostHeader",
"=",
"request",
".",
"getEndpoint",
"(",
")",
".",
"getHost",
"(",
")",
";",
"if",
"(",
"SdkHttpUtils",
".",
"isUsingNonDefaultPort",
"(",
"request",
".",
"getEndpoint",
"(",
")",
")",
")",
"{",
"hostHeader",
"+=",
"\":\"",
"+",
"request",
".",
"getEndpoint",
"(",
")",
".",
"getPort",
"(",
")",
";",
"}",
"request",
".",
"addHeader",
"(",
"\"Host\"",
",",
"hostHeader",
")",
";",
"if",
"(",
"sanitizedCredentials",
"instanceof",
"AWSSessionCredentials",
")",
"{",
"addSessionCredentials",
"(",
"request",
",",
"(",
"AWSSessionCredentials",
")",
"sanitizedCredentials",
")",
";",
"}",
"byte",
"[",
"]",
"bytesToSign",
";",
"String",
"stringToSign",
";",
"if",
"(",
"isHttps",
")",
"{",
"request",
".",
"addHeader",
"(",
"NONCE_HEADER",
",",
"nonce",
")",
";",
"stringToSign",
"=",
"date",
"+",
"nonce",
";",
"bytesToSign",
"=",
"stringToSign",
".",
"getBytes",
"(",
"UTF8",
")",
";",
"}",
"else",
"{",
"String",
"path",
"=",
"SdkHttpUtils",
".",
"appendUri",
"(",
"request",
".",
"getEndpoint",
"(",
")",
".",
"getPath",
"(",
")",
",",
"request",
".",
"getResourcePath",
"(",
")",
")",
";",
"/*\n * AWS3 requires all query params to be listed on the third line of\n * the string to sign, even if those query params will be sent in\n * the request body and not as a query string. POST formatted query\n * params should *NOT* be included in the request payload.\n */",
"stringToSign",
"=",
"request",
".",
"getHttpMethod",
"(",
")",
".",
"toString",
"(",
")",
"+",
"\"\\n\"",
"+",
"getCanonicalizedResourcePath",
"(",
"path",
")",
"+",
"\"\\n\"",
"+",
"getCanonicalizedQueryString",
"(",
"request",
".",
"getParameters",
"(",
")",
")",
"+",
"\"\\n\"",
"+",
"getCanonicalizedHeadersForStringToSign",
"(",
"request",
")",
"+",
"\"\\n\"",
"+",
"getRequestPayloadWithoutQueryParams",
"(",
"request",
")",
";",
"bytesToSign",
"=",
"hash",
"(",
"stringToSign",
")",
";",
"}",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"log",
".",
"debug",
"(",
"\"Calculated StringToSign: \"",
"+",
"stringToSign",
")",
";",
"String",
"signature",
"=",
"signAndBase64Encode",
"(",
"bytesToSign",
",",
"sanitizedCredentials",
".",
"getAWSSecretKey",
"(",
")",
",",
"algorithm",
")",
";",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"builder",
".",
"append",
"(",
"isHttps",
"?",
"HTTPS_SCHEME",
":",
"HTTP_SCHEME",
")",
".",
"append",
"(",
"\" \"",
")",
";",
"builder",
".",
"append",
"(",
"\"AWSAccessKeyId=\"",
"+",
"sanitizedCredentials",
".",
"getAWSAccessKeyId",
"(",
")",
"+",
"\",\"",
")",
";",
"builder",
".",
"append",
"(",
"\"Algorithm=\"",
"+",
"algorithm",
".",
"toString",
"(",
")",
"+",
"\",\"",
")",
";",
"if",
"(",
"!",
"isHttps",
")",
"{",
"builder",
".",
"append",
"(",
"getSignedHeadersComponent",
"(",
"request",
")",
"+",
"\",\"",
")",
";",
"}",
"builder",
".",
"append",
"(",
"\"Signature=\"",
"+",
"signature",
")",
";",
"request",
".",
"addHeader",
"(",
"AUTHORIZATION_HEADER",
",",
"builder",
".",
"toString",
"(",
")",
")",
";",
"}"
] |
Signs the specified request with the AWS3 signing protocol by using the
AWS account credentials specified when this object was constructed and
adding the required AWS3 headers to the request.
@param request
The request to sign.
|
[
"Signs",
"the",
"specified",
"request",
"with",
"the",
"AWS3",
"signing",
"protocol",
"by",
"using",
"the",
"AWS",
"account",
"credentials",
"specified",
"when",
"this",
"object",
"was",
"constructed",
"and",
"adding",
"the",
"required",
"AWS3",
"headers",
"to",
"the",
"request",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/AWS3Signer.java#L62-L133
|
19,766
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/internal/PageBasedCollection.java
|
PageBasedCollection.registerLowLevelResultListener
|
public LowLevelResultListener<R> registerLowLevelResultListener(LowLevelResultListener<R> listener) {
LowLevelResultListener<R> prev = this.listener;
if (listener == null)
this.listener = LowLevelResultListener.none();
else
this.listener = listener;
return prev;
}
|
java
|
public LowLevelResultListener<R> registerLowLevelResultListener(LowLevelResultListener<R> listener) {
LowLevelResultListener<R> prev = this.listener;
if (listener == null)
this.listener = LowLevelResultListener.none();
else
this.listener = listener;
return prev;
}
|
[
"public",
"LowLevelResultListener",
"<",
"R",
">",
"registerLowLevelResultListener",
"(",
"LowLevelResultListener",
"<",
"R",
">",
"listener",
")",
"{",
"LowLevelResultListener",
"<",
"R",
">",
"prev",
"=",
"this",
".",
"listener",
";",
"if",
"(",
"listener",
"==",
"null",
")",
"this",
".",
"listener",
"=",
"LowLevelResultListener",
".",
"none",
"(",
")",
";",
"else",
"this",
".",
"listener",
"=",
"listener",
";",
"return",
"prev",
";",
"}"
] |
Used to register a listener for the event of receiving a low-level result
from the server side.
@param listener
listener to be registered. If null, a "none" listener will be
set.
@return the previously registered listener. The return value is never
null.
|
[
"Used",
"to",
"register",
"a",
"listener",
"for",
"the",
"event",
"of",
"receiving",
"a",
"low",
"-",
"level",
"result",
"from",
"the",
"server",
"side",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/internal/PageBasedCollection.java#L77-L84
|
19,767
|
aws/aws-sdk-java
|
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/AddInputShapes.java
|
AddInputShapes.getDefaultTimeFormatIfNull
|
@Override
protected String getDefaultTimeFormatIfNull(Member c2jMemberDefinition, Map<String, Shape> allC2jShapes,
String protocolString, Shape parentShape) {
validateTimestampProtocol(protocolString, c2jMemberDefinition.getTimestampFormat(), c2jMemberDefinition.getShape());
String shapeName = c2jMemberDefinition.getShape();
Shape shape = allC2jShapes.get(shapeName);
validateTimestampProtocol(protocolString, shape.getTimestampFormat(), shapeName);
return super.getDefaultTimeFormatIfNull(c2jMemberDefinition, allC2jShapes, protocolString, parentShape);
}
|
java
|
@Override
protected String getDefaultTimeFormatIfNull(Member c2jMemberDefinition, Map<String, Shape> allC2jShapes,
String protocolString, Shape parentShape) {
validateTimestampProtocol(protocolString, c2jMemberDefinition.getTimestampFormat(), c2jMemberDefinition.getShape());
String shapeName = c2jMemberDefinition.getShape();
Shape shape = allC2jShapes.get(shapeName);
validateTimestampProtocol(protocolString, shape.getTimestampFormat(), shapeName);
return super.getDefaultTimeFormatIfNull(c2jMemberDefinition, allC2jShapes, protocolString, parentShape);
}
|
[
"@",
"Override",
"protected",
"String",
"getDefaultTimeFormatIfNull",
"(",
"Member",
"c2jMemberDefinition",
",",
"Map",
"<",
"String",
",",
"Shape",
">",
"allC2jShapes",
",",
"String",
"protocolString",
",",
"Shape",
"parentShape",
")",
"{",
"validateTimestampProtocol",
"(",
"protocolString",
",",
"c2jMemberDefinition",
".",
"getTimestampFormat",
"(",
")",
",",
"c2jMemberDefinition",
".",
"getShape",
"(",
")",
")",
";",
"String",
"shapeName",
"=",
"c2jMemberDefinition",
".",
"getShape",
"(",
")",
";",
"Shape",
"shape",
"=",
"allC2jShapes",
".",
"get",
"(",
"shapeName",
")",
";",
"validateTimestampProtocol",
"(",
"protocolString",
",",
"shape",
".",
"getTimestampFormat",
"(",
")",
",",
"shapeName",
")",
";",
"return",
"super",
".",
"getDefaultTimeFormatIfNull",
"(",
"c2jMemberDefinition",
",",
"allC2jShapes",
",",
"protocolString",
",",
"parentShape",
")",
";",
"}"
] |
Throw exception if timestamp format is provided for non-json protocol.
|
[
"Throw",
"exception",
"if",
"timestamp",
"format",
"is",
"provided",
"for",
"non",
"-",
"json",
"protocol",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/AddInputShapes.java#L82-L94
|
19,768
|
aws/aws-sdk-java
|
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/AddInputShapes.java
|
AddInputShapes.validateTimestampProtocol
|
private void validateTimestampProtocol(String protocolString, String timestampFormat, String shape2) {
if (!StringUtils.isNullOrEmpty(timestampFormat) && isNonJsonProtocol(protocolString)) {
throw new IllegalArgumentException(String.format(
"Shape %s has timestamp format provided. Timestamp format for requests is not supported for xml, query or ec2 "
+ "protocol",
shape2));
}
}
|
java
|
private void validateTimestampProtocol(String protocolString, String timestampFormat, String shape2) {
if (!StringUtils.isNullOrEmpty(timestampFormat) && isNonJsonProtocol(protocolString)) {
throw new IllegalArgumentException(String.format(
"Shape %s has timestamp format provided. Timestamp format for requests is not supported for xml, query or ec2 "
+ "protocol",
shape2));
}
}
|
[
"private",
"void",
"validateTimestampProtocol",
"(",
"String",
"protocolString",
",",
"String",
"timestampFormat",
",",
"String",
"shape2",
")",
"{",
"if",
"(",
"!",
"StringUtils",
".",
"isNullOrEmpty",
"(",
"timestampFormat",
")",
"&&",
"isNonJsonProtocol",
"(",
"protocolString",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"String",
".",
"format",
"(",
"\"Shape %s has timestamp format provided. Timestamp format for requests is not supported for xml, query or ec2 \"",
"+",
"\"protocol\"",
",",
"shape2",
")",
")",
";",
"}",
"}"
] |
Throw exception if timestamp is provided for non-json protocol
|
[
"Throw",
"exception",
"if",
"timestamp",
"is",
"provided",
"for",
"non",
"-",
"json",
"protocol"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/AddInputShapes.java#L123-L131
|
19,769
|
aws/aws-sdk-java
|
aws-java-sdk-neptune/src/main/java/com/amazonaws/services/neptune/waiters/AmazonNeptuneWaiters.java
|
AmazonNeptuneWaiters.dBInstanceAvailable
|
public Waiter<DescribeDBInstancesRequest> dBInstanceAvailable() {
return new WaiterBuilder<DescribeDBInstancesRequest, DescribeDBInstancesResult>()
.withSdkFunction(new DescribeDBInstancesFunction(client))
.withAcceptors(new DBInstanceAvailable.IsAvailableMatcher(), new DBInstanceAvailable.IsDeletedMatcher(),
new DBInstanceAvailable.IsDeletingMatcher(), new DBInstanceAvailable.IsFailedMatcher(),
new DBInstanceAvailable.IsIncompatiblerestoreMatcher(), new DBInstanceAvailable.IsIncompatibleparametersMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(30)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<DescribeDBInstancesRequest> dBInstanceAvailable() {
return new WaiterBuilder<DescribeDBInstancesRequest, DescribeDBInstancesResult>()
.withSdkFunction(new DescribeDBInstancesFunction(client))
.withAcceptors(new DBInstanceAvailable.IsAvailableMatcher(), new DBInstanceAvailable.IsDeletedMatcher(),
new DBInstanceAvailable.IsDeletingMatcher(), new DBInstanceAvailable.IsFailedMatcher(),
new DBInstanceAvailable.IsIncompatiblerestoreMatcher(), new DBInstanceAvailable.IsIncompatibleparametersMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(30)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"DescribeDBInstancesRequest",
">",
"dBInstanceAvailable",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"DescribeDBInstancesRequest",
",",
"DescribeDBInstancesResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"DescribeDBInstancesFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"DBInstanceAvailable",
".",
"IsAvailableMatcher",
"(",
")",
",",
"new",
"DBInstanceAvailable",
".",
"IsDeletedMatcher",
"(",
")",
",",
"new",
"DBInstanceAvailable",
".",
"IsDeletingMatcher",
"(",
")",
",",
"new",
"DBInstanceAvailable",
".",
"IsFailedMatcher",
"(",
")",
",",
"new",
"DBInstanceAvailable",
".",
"IsIncompatiblerestoreMatcher",
"(",
")",
",",
"new",
"DBInstanceAvailable",
".",
"IsIncompatibleparametersMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"60",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"30",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a DBInstanceAvailable waiter by using custom parameters waiterParameters and other parameters defined in
the waiters specification, and then polls until it determines whether the resource entered the desired state or
not, where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"DBInstanceAvailable",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-neptune/src/main/java/com/amazonaws/services/neptune/waiters/AmazonNeptuneWaiters.java#L51-L60
|
19,770
|
aws/aws-sdk-java
|
aws-java-sdk-neptune/src/main/java/com/amazonaws/services/neptune/waiters/AmazonNeptuneWaiters.java
|
AmazonNeptuneWaiters.dBInstanceDeleted
|
public Waiter<DescribeDBInstancesRequest> dBInstanceDeleted() {
return new WaiterBuilder<DescribeDBInstancesRequest, DescribeDBInstancesResult>()
.withSdkFunction(new DescribeDBInstancesFunction(client))
.withAcceptors(new DBInstanceDeleted.IsDeletedMatcher(), new DBInstanceDeleted.IsDBInstanceNotFoundMatcher(),
new DBInstanceDeleted.IsCreatingMatcher(), new DBInstanceDeleted.IsModifyingMatcher(), new DBInstanceDeleted.IsRebootingMatcher(),
new DBInstanceDeleted.IsResettingmastercredentialsMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(30)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<DescribeDBInstancesRequest> dBInstanceDeleted() {
return new WaiterBuilder<DescribeDBInstancesRequest, DescribeDBInstancesResult>()
.withSdkFunction(new DescribeDBInstancesFunction(client))
.withAcceptors(new DBInstanceDeleted.IsDeletedMatcher(), new DBInstanceDeleted.IsDBInstanceNotFoundMatcher(),
new DBInstanceDeleted.IsCreatingMatcher(), new DBInstanceDeleted.IsModifyingMatcher(), new DBInstanceDeleted.IsRebootingMatcher(),
new DBInstanceDeleted.IsResettingmastercredentialsMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(30)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"DescribeDBInstancesRequest",
">",
"dBInstanceDeleted",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"DescribeDBInstancesRequest",
",",
"DescribeDBInstancesResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"DescribeDBInstancesFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"DBInstanceDeleted",
".",
"IsDeletedMatcher",
"(",
")",
",",
"new",
"DBInstanceDeleted",
".",
"IsDBInstanceNotFoundMatcher",
"(",
")",
",",
"new",
"DBInstanceDeleted",
".",
"IsCreatingMatcher",
"(",
")",
",",
"new",
"DBInstanceDeleted",
".",
"IsModifyingMatcher",
"(",
")",
",",
"new",
"DBInstanceDeleted",
".",
"IsRebootingMatcher",
"(",
")",
",",
"new",
"DBInstanceDeleted",
".",
"IsResettingmastercredentialsMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"60",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"30",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a DBInstanceDeleted waiter by using custom parameters waiterParameters and other parameters defined in the
waiters specification, and then polls until it determines whether the resource entered the desired state or not,
where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"DBInstanceDeleted",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-neptune/src/main/java/com/amazonaws/services/neptune/waiters/AmazonNeptuneWaiters.java#L67-L76
|
19,771
|
aws/aws-sdk-java
|
aws-java-sdk-autoscaling/src/main/java/com/amazonaws/services/autoscaling/waiters/AmazonAutoScalingWaiters.java
|
AmazonAutoScalingWaiters.groupExists
|
public Waiter<DescribeAutoScalingGroupsRequest> groupExists() {
return new WaiterBuilder<DescribeAutoScalingGroupsRequest, DescribeAutoScalingGroupsResult>()
.withSdkFunction(new DescribeAutoScalingGroupsFunction(client))
.withAcceptors(new GroupExists.IsTrueMatcher(), new GroupExists.IsFalseMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(10), new FixedDelayStrategy(5)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<DescribeAutoScalingGroupsRequest> groupExists() {
return new WaiterBuilder<DescribeAutoScalingGroupsRequest, DescribeAutoScalingGroupsResult>()
.withSdkFunction(new DescribeAutoScalingGroupsFunction(client))
.withAcceptors(new GroupExists.IsTrueMatcher(), new GroupExists.IsFalseMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(10), new FixedDelayStrategy(5)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"DescribeAutoScalingGroupsRequest",
">",
"groupExists",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"DescribeAutoScalingGroupsRequest",
",",
"DescribeAutoScalingGroupsResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"DescribeAutoScalingGroupsFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"GroupExists",
".",
"IsTrueMatcher",
"(",
")",
",",
"new",
"GroupExists",
".",
"IsFalseMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"10",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"5",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a GroupExists waiter by using custom parameters waiterParameters and other parameters defined in the
waiters specification, and then polls until it determines whether the resource entered the desired state or not,
where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"GroupExists",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-autoscaling/src/main/java/com/amazonaws/services/autoscaling/waiters/AmazonAutoScalingWaiters.java#L79-L86
|
19,772
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/ApplicationsResponse.java
|
ApplicationsResponse.setItem
|
public void setItem(java.util.Collection<ApplicationResponse> item) {
if (item == null) {
this.item = null;
return;
}
this.item = new java.util.ArrayList<ApplicationResponse>(item);
}
|
java
|
public void setItem(java.util.Collection<ApplicationResponse> item) {
if (item == null) {
this.item = null;
return;
}
this.item = new java.util.ArrayList<ApplicationResponse>(item);
}
|
[
"public",
"void",
"setItem",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"ApplicationResponse",
">",
"item",
")",
"{",
"if",
"(",
"item",
"==",
"null",
")",
"{",
"this",
".",
"item",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"item",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"ApplicationResponse",
">",
"(",
"item",
")",
";",
"}"
] |
List of applications returned in this page.
@param item
List of applications returned in this page.
|
[
"List",
"of",
"applications",
"returned",
"in",
"this",
"page",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/ApplicationsResponse.java#L51-L58
|
19,773
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/internal/EC2MetadataClient.java
|
EC2MetadataClient.readResource
|
public String readResource(String resourcePath) throws IOException, SdkClientException {
URL url = getEc2MetadataServiceUrlForResource(resourcePath);
log.debug("Connecting to EC2 instance metadata service at URL: " + url.toString());
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
connection.setConnectTimeout(1000 * 2);
connection.setReadTimeout(1000 * 5);
connection.setRequestMethod("GET");
connection.setDoOutput(true);
connection.addRequestProperty("User-Agent", USER_AGENT);
connection.connect();
return readResponse(connection);
}
|
java
|
public String readResource(String resourcePath) throws IOException, SdkClientException {
URL url = getEc2MetadataServiceUrlForResource(resourcePath);
log.debug("Connecting to EC2 instance metadata service at URL: " + url.toString());
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
connection.setConnectTimeout(1000 * 2);
connection.setReadTimeout(1000 * 5);
connection.setRequestMethod("GET");
connection.setDoOutput(true);
connection.addRequestProperty("User-Agent", USER_AGENT);
connection.connect();
return readResponse(connection);
}
|
[
"public",
"String",
"readResource",
"(",
"String",
"resourcePath",
")",
"throws",
"IOException",
",",
"SdkClientException",
"{",
"URL",
"url",
"=",
"getEc2MetadataServiceUrlForResource",
"(",
"resourcePath",
")",
";",
"log",
".",
"debug",
"(",
"\"Connecting to EC2 instance metadata service at URL: \"",
"+",
"url",
".",
"toString",
"(",
")",
")",
";",
"HttpURLConnection",
"connection",
"=",
"(",
"HttpURLConnection",
")",
"url",
".",
"openConnection",
"(",
")",
";",
"connection",
".",
"setConnectTimeout",
"(",
"1000",
"*",
"2",
")",
";",
"connection",
".",
"setReadTimeout",
"(",
"1000",
"*",
"5",
")",
";",
"connection",
".",
"setRequestMethod",
"(",
"\"GET\"",
")",
";",
"connection",
".",
"setDoOutput",
"(",
"true",
")",
";",
"connection",
".",
"addRequestProperty",
"(",
"\"User-Agent\"",
",",
"USER_AGENT",
")",
";",
"connection",
".",
"connect",
"(",
")",
";",
"return",
"readResponse",
"(",
"connection",
")",
";",
"}"
] |
Connects to the metadata service to read the specified resource and
returns the text contents.
@param resourcePath
The resource
@return The text payload returned from the Amazon EC2 Instance Metadata
service for the specified resource path.
@throws IOException
If any problems were encountered while connecting to metadata
service for the requested resource path.
@throws SdkClientException
If the requested metadata service is not found.
|
[
"Connects",
"to",
"the",
"metadata",
"service",
"to",
"read",
"the",
"specified",
"resource",
"and",
"returns",
"the",
"text",
"contents",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/internal/EC2MetadataClient.java#L89-L102
|
19,774
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/internal/EC2MetadataClient.java
|
EC2MetadataClient.readResponse
|
private String readResponse(HttpURLConnection connection) throws IOException {
if (connection.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND)
throw new SdkClientException("The requested metadata is not found at " + connection.getURL());
InputStream inputStream = connection.getInputStream();
try {
StringBuilder buffer = new StringBuilder();
while (true) {
int c = inputStream.read();
if (c == -1) break;
buffer.append((char)c);
}
return buffer.toString();
} finally {
inputStream.close();
}
}
|
java
|
private String readResponse(HttpURLConnection connection) throws IOException {
if (connection.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND)
throw new SdkClientException("The requested metadata is not found at " + connection.getURL());
InputStream inputStream = connection.getInputStream();
try {
StringBuilder buffer = new StringBuilder();
while (true) {
int c = inputStream.read();
if (c == -1) break;
buffer.append((char)c);
}
return buffer.toString();
} finally {
inputStream.close();
}
}
|
[
"private",
"String",
"readResponse",
"(",
"HttpURLConnection",
"connection",
")",
"throws",
"IOException",
"{",
"if",
"(",
"connection",
".",
"getResponseCode",
"(",
")",
"==",
"HttpURLConnection",
".",
"HTTP_NOT_FOUND",
")",
"throw",
"new",
"SdkClientException",
"(",
"\"The requested metadata is not found at \"",
"+",
"connection",
".",
"getURL",
"(",
")",
")",
";",
"InputStream",
"inputStream",
"=",
"connection",
".",
"getInputStream",
"(",
")",
";",
"try",
"{",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"while",
"(",
"true",
")",
"{",
"int",
"c",
"=",
"inputStream",
".",
"read",
"(",
")",
";",
"if",
"(",
"c",
"==",
"-",
"1",
")",
"break",
";",
"buffer",
".",
"append",
"(",
"(",
"char",
")",
"c",
")",
";",
"}",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"finally",
"{",
"inputStream",
".",
"close",
"(",
")",
";",
"}",
"}"
] |
Reads a response from the Amazon EC2 Instance Metadata Service and
returns the content as a string.
@param connection
The connection to the Amazon EC2 Instance Metadata Service.
@return The content contained in the response from the Amazon EC2
Instance Metadata Service.
@throws IOException
If any problems ocurred while reading the response.
|
[
"Reads",
"a",
"response",
"from",
"the",
"Amazon",
"EC2",
"Instance",
"Metadata",
"Service",
"and",
"returns",
"the",
"content",
"as",
"a",
"string",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/internal/EC2MetadataClient.java#L118-L136
|
19,775
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/internal/EC2MetadataClient.java
|
EC2MetadataClient.getEc2MetadataServiceUrlForResource
|
private URL getEc2MetadataServiceUrlForResource(String resourcePath) throws IOException {
String endpoint = EC2_METADATA_SERVICE_URL;
if (System.getProperty(EC2_METADATA_SERVICE_OVERRIDE_SYSTEM_PROPERTY) != null) {
endpoint = System.getProperty(EC2_METADATA_SERVICE_OVERRIDE_SYSTEM_PROPERTY);
}
return new URL(endpoint + resourcePath);
}
|
java
|
private URL getEc2MetadataServiceUrlForResource(String resourcePath) throws IOException {
String endpoint = EC2_METADATA_SERVICE_URL;
if (System.getProperty(EC2_METADATA_SERVICE_OVERRIDE_SYSTEM_PROPERTY) != null) {
endpoint = System.getProperty(EC2_METADATA_SERVICE_OVERRIDE_SYSTEM_PROPERTY);
}
return new URL(endpoint + resourcePath);
}
|
[
"private",
"URL",
"getEc2MetadataServiceUrlForResource",
"(",
"String",
"resourcePath",
")",
"throws",
"IOException",
"{",
"String",
"endpoint",
"=",
"EC2_METADATA_SERVICE_URL",
";",
"if",
"(",
"System",
".",
"getProperty",
"(",
"EC2_METADATA_SERVICE_OVERRIDE_SYSTEM_PROPERTY",
")",
"!=",
"null",
")",
"{",
"endpoint",
"=",
"System",
".",
"getProperty",
"(",
"EC2_METADATA_SERVICE_OVERRIDE_SYSTEM_PROPERTY",
")",
";",
"}",
"return",
"new",
"URL",
"(",
"endpoint",
"+",
"resourcePath",
")",
";",
"}"
] |
Constructs a URL to the EC2 metadata service for the specified
resource path.
@param resourcePath
The resource portion of the URL.
@return A URL to the EC2 metadata service for the specified resource
path.
@throws IOException
If a valid URL could not be constructed.
|
[
"Constructs",
"a",
"URL",
"to",
"the",
"EC2",
"metadata",
"service",
"for",
"the",
"specified",
"resource",
"path",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/internal/EC2MetadataClient.java#L151-L158
|
19,776
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/DownloadCallable.java
|
DownloadCallable.downloadInParallel
|
private void downloadInParallel(int partCount) throws Exception {
if (lastFullyMergedPartNumber == null) {
lastFullyMergedPartNumber = 0;
}
if (lastFullyMergedPartPosition == null) {
lastFullyMergedPartPosition = 0L;
}
long previousPartLength = 0L;
long filePositionToWrite = lastFullyMergedPartPosition;
createParentDirectoryIfNecessary(dstfile);
truncateDestinationFileIfNecessary();
if (!FileLocks.lock(dstfile)) {
throw new FileLockException("Fail to lock " + dstfile);
}
for (int i = lastFullyMergedPartNumber + 1; i <= partCount; i++) {
filePositionToWrite += previousPartLength;
GetObjectRequest getPartRequest = new GetObjectRequest(req.getBucketName(), req.getKey(),
req.getVersionId()).withUnmodifiedSinceConstraint(req.getUnmodifiedSinceConstraint())
.withModifiedSinceConstraint(req.getModifiedSinceConstraint())
.withResponseHeaders(req.getResponseHeaders()).withSSECustomerKey(req.getSSECustomerKey())
.withGeneralProgressListener(req.getGeneralProgressListener());
getPartRequest.setMatchingETagConstraints(req.getMatchingETagConstraints());
getPartRequest.setNonmatchingETagConstraints(req.getNonmatchingETagConstraints());
getPartRequest.setRequesterPays(req.isRequesterPays());
// Update the part number
getPartRequest.setPartNumber(i);
futures.add(executor.submit(new DownloadS3ObjectCallable(serviceCall(getPartRequest),
dstfile,
filePositionToWrite)));
previousPartLength = ServiceUtils.getPartSize(req, s3, i);
}
Future<File> future = executor.submit(new CompleteMultipartDownload(futures, dstfile, download,
++lastFullyMergedPartNumber));
((DownloadMonitor) download.getMonitor()).setFuture(future);
}
|
java
|
private void downloadInParallel(int partCount) throws Exception {
if (lastFullyMergedPartNumber == null) {
lastFullyMergedPartNumber = 0;
}
if (lastFullyMergedPartPosition == null) {
lastFullyMergedPartPosition = 0L;
}
long previousPartLength = 0L;
long filePositionToWrite = lastFullyMergedPartPosition;
createParentDirectoryIfNecessary(dstfile);
truncateDestinationFileIfNecessary();
if (!FileLocks.lock(dstfile)) {
throw new FileLockException("Fail to lock " + dstfile);
}
for (int i = lastFullyMergedPartNumber + 1; i <= partCount; i++) {
filePositionToWrite += previousPartLength;
GetObjectRequest getPartRequest = new GetObjectRequest(req.getBucketName(), req.getKey(),
req.getVersionId()).withUnmodifiedSinceConstraint(req.getUnmodifiedSinceConstraint())
.withModifiedSinceConstraint(req.getModifiedSinceConstraint())
.withResponseHeaders(req.getResponseHeaders()).withSSECustomerKey(req.getSSECustomerKey())
.withGeneralProgressListener(req.getGeneralProgressListener());
getPartRequest.setMatchingETagConstraints(req.getMatchingETagConstraints());
getPartRequest.setNonmatchingETagConstraints(req.getNonmatchingETagConstraints());
getPartRequest.setRequesterPays(req.isRequesterPays());
// Update the part number
getPartRequest.setPartNumber(i);
futures.add(executor.submit(new DownloadS3ObjectCallable(serviceCall(getPartRequest),
dstfile,
filePositionToWrite)));
previousPartLength = ServiceUtils.getPartSize(req, s3, i);
}
Future<File> future = executor.submit(new CompleteMultipartDownload(futures, dstfile, download,
++lastFullyMergedPartNumber));
((DownloadMonitor) download.getMonitor()).setFuture(future);
}
|
[
"private",
"void",
"downloadInParallel",
"(",
"int",
"partCount",
")",
"throws",
"Exception",
"{",
"if",
"(",
"lastFullyMergedPartNumber",
"==",
"null",
")",
"{",
"lastFullyMergedPartNumber",
"=",
"0",
";",
"}",
"if",
"(",
"lastFullyMergedPartPosition",
"==",
"null",
")",
"{",
"lastFullyMergedPartPosition",
"=",
"0L",
";",
"}",
"long",
"previousPartLength",
"=",
"0L",
";",
"long",
"filePositionToWrite",
"=",
"lastFullyMergedPartPosition",
";",
"createParentDirectoryIfNecessary",
"(",
"dstfile",
")",
";",
"truncateDestinationFileIfNecessary",
"(",
")",
";",
"if",
"(",
"!",
"FileLocks",
".",
"lock",
"(",
"dstfile",
")",
")",
"{",
"throw",
"new",
"FileLockException",
"(",
"\"Fail to lock \"",
"+",
"dstfile",
")",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"lastFullyMergedPartNumber",
"+",
"1",
";",
"i",
"<=",
"partCount",
";",
"i",
"++",
")",
"{",
"filePositionToWrite",
"+=",
"previousPartLength",
";",
"GetObjectRequest",
"getPartRequest",
"=",
"new",
"GetObjectRequest",
"(",
"req",
".",
"getBucketName",
"(",
")",
",",
"req",
".",
"getKey",
"(",
")",
",",
"req",
".",
"getVersionId",
"(",
")",
")",
".",
"withUnmodifiedSinceConstraint",
"(",
"req",
".",
"getUnmodifiedSinceConstraint",
"(",
")",
")",
".",
"withModifiedSinceConstraint",
"(",
"req",
".",
"getModifiedSinceConstraint",
"(",
")",
")",
".",
"withResponseHeaders",
"(",
"req",
".",
"getResponseHeaders",
"(",
")",
")",
".",
"withSSECustomerKey",
"(",
"req",
".",
"getSSECustomerKey",
"(",
")",
")",
".",
"withGeneralProgressListener",
"(",
"req",
".",
"getGeneralProgressListener",
"(",
")",
")",
";",
"getPartRequest",
".",
"setMatchingETagConstraints",
"(",
"req",
".",
"getMatchingETagConstraints",
"(",
")",
")",
";",
"getPartRequest",
".",
"setNonmatchingETagConstraints",
"(",
"req",
".",
"getNonmatchingETagConstraints",
"(",
")",
")",
";",
"getPartRequest",
".",
"setRequesterPays",
"(",
"req",
".",
"isRequesterPays",
"(",
")",
")",
";",
"// Update the part number",
"getPartRequest",
".",
"setPartNumber",
"(",
"i",
")",
";",
"futures",
".",
"add",
"(",
"executor",
".",
"submit",
"(",
"new",
"DownloadS3ObjectCallable",
"(",
"serviceCall",
"(",
"getPartRequest",
")",
",",
"dstfile",
",",
"filePositionToWrite",
")",
")",
")",
";",
"previousPartLength",
"=",
"ServiceUtils",
".",
"getPartSize",
"(",
"req",
",",
"s3",
",",
"i",
")",
";",
"}",
"Future",
"<",
"File",
">",
"future",
"=",
"executor",
".",
"submit",
"(",
"new",
"CompleteMultipartDownload",
"(",
"futures",
",",
"dstfile",
",",
"download",
",",
"++",
"lastFullyMergedPartNumber",
")",
")",
";",
"(",
"(",
"DownloadMonitor",
")",
"download",
".",
"getMonitor",
"(",
")",
")",
".",
"setFuture",
"(",
"future",
")",
";",
"}"
] |
Downloads each part of the object into the different parts of the destination file in parallel.
|
[
"Downloads",
"each",
"part",
"of",
"the",
"object",
"into",
"the",
"different",
"parts",
"of",
"the",
"destination",
"file",
"in",
"parallel",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/DownloadCallable.java#L124-L171
|
19,777
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/DownloadCallable.java
|
DownloadCallable.adjustRequest
|
private void adjustRequest(GetObjectRequest req) {
long[] range = req.getRange();
long lastByte = range[1];
long totalBytesToDownload = lastByte - this.origStartingByte + 1;
if (dstfile.exists()) {
if (!FileLocks.lock(dstfile)) {
throw new FileLockException("Fail to lock " + dstfile
+ " for range adjustment");
}
try {
expectedFileLength = dstfile.length();
long startingByte = this.origStartingByte + expectedFileLength;
LOG.info("Adjusting request range from " + Arrays.toString(range)
+ " to "
+ Arrays.toString(new long[] {startingByte, lastByte})
+ " for file " + dstfile);
req.setRange(startingByte, lastByte);
totalBytesToDownload = lastByte - startingByte + 1;
} finally {
FileLocks.unlock(dstfile);
}
}
if (totalBytesToDownload < 0) {
throw new IllegalArgumentException(
"Unable to determine the range for download operation. lastByte="
+ lastByte + ", origStartingByte=" + origStartingByte
+ ", expectedFileLength=" + expectedFileLength
+ ", totalBytesToDownload=" + totalBytesToDownload);
}
}
|
java
|
private void adjustRequest(GetObjectRequest req) {
long[] range = req.getRange();
long lastByte = range[1];
long totalBytesToDownload = lastByte - this.origStartingByte + 1;
if (dstfile.exists()) {
if (!FileLocks.lock(dstfile)) {
throw new FileLockException("Fail to lock " + dstfile
+ " for range adjustment");
}
try {
expectedFileLength = dstfile.length();
long startingByte = this.origStartingByte + expectedFileLength;
LOG.info("Adjusting request range from " + Arrays.toString(range)
+ " to "
+ Arrays.toString(new long[] {startingByte, lastByte})
+ " for file " + dstfile);
req.setRange(startingByte, lastByte);
totalBytesToDownload = lastByte - startingByte + 1;
} finally {
FileLocks.unlock(dstfile);
}
}
if (totalBytesToDownload < 0) {
throw new IllegalArgumentException(
"Unable to determine the range for download operation. lastByte="
+ lastByte + ", origStartingByte=" + origStartingByte
+ ", expectedFileLength=" + expectedFileLength
+ ", totalBytesToDownload=" + totalBytesToDownload);
}
}
|
[
"private",
"void",
"adjustRequest",
"(",
"GetObjectRequest",
"req",
")",
"{",
"long",
"[",
"]",
"range",
"=",
"req",
".",
"getRange",
"(",
")",
";",
"long",
"lastByte",
"=",
"range",
"[",
"1",
"]",
";",
"long",
"totalBytesToDownload",
"=",
"lastByte",
"-",
"this",
".",
"origStartingByte",
"+",
"1",
";",
"if",
"(",
"dstfile",
".",
"exists",
"(",
")",
")",
"{",
"if",
"(",
"!",
"FileLocks",
".",
"lock",
"(",
"dstfile",
")",
")",
"{",
"throw",
"new",
"FileLockException",
"(",
"\"Fail to lock \"",
"+",
"dstfile",
"+",
"\" for range adjustment\"",
")",
";",
"}",
"try",
"{",
"expectedFileLength",
"=",
"dstfile",
".",
"length",
"(",
")",
";",
"long",
"startingByte",
"=",
"this",
".",
"origStartingByte",
"+",
"expectedFileLength",
";",
"LOG",
".",
"info",
"(",
"\"Adjusting request range from \"",
"+",
"Arrays",
".",
"toString",
"(",
"range",
")",
"+",
"\" to \"",
"+",
"Arrays",
".",
"toString",
"(",
"new",
"long",
"[",
"]",
"{",
"startingByte",
",",
"lastByte",
"}",
")",
"+",
"\" for file \"",
"+",
"dstfile",
")",
";",
"req",
".",
"setRange",
"(",
"startingByte",
",",
"lastByte",
")",
";",
"totalBytesToDownload",
"=",
"lastByte",
"-",
"startingByte",
"+",
"1",
";",
"}",
"finally",
"{",
"FileLocks",
".",
"unlock",
"(",
"dstfile",
")",
";",
"}",
"}",
"if",
"(",
"totalBytesToDownload",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Unable to determine the range for download operation. lastByte=\"",
"+",
"lastByte",
"+",
"\", origStartingByte=\"",
"+",
"origStartingByte",
"+",
"\", expectedFileLength=\"",
"+",
"expectedFileLength",
"+",
"\", totalBytesToDownload=\"",
"+",
"totalBytesToDownload",
")",
";",
"}",
"}"
] |
This method is called only if it is a resumed download.
Adjust the range of the get request, and the expected (ie current) file
length of the destination file to append to.
|
[
"This",
"method",
"is",
"called",
"only",
"if",
"it",
"is",
"a",
"resumed",
"download",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/DownloadCallable.java#L223-L254
|
19,778
|
aws/aws-sdk-java
|
aws-java-sdk-cloudwatch/src/main/java/com/amazonaws/services/cloudwatch/AmazonCloudWatchAsyncClient.java
|
AmazonCloudWatchAsyncClient.describeAlarmsAsync
|
@Override
public java.util.concurrent.Future<DescribeAlarmsResult> describeAlarmsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeAlarmsRequest, DescribeAlarmsResult> asyncHandler) {
return describeAlarmsAsync(new DescribeAlarmsRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<DescribeAlarmsResult> describeAlarmsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeAlarmsRequest, DescribeAlarmsResult> asyncHandler) {
return describeAlarmsAsync(new DescribeAlarmsRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DescribeAlarmsResult",
">",
"describeAlarmsAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"DescribeAlarmsRequest",
",",
"DescribeAlarmsResult",
">",
"asyncHandler",
")",
"{",
"return",
"describeAlarmsAsync",
"(",
"new",
"DescribeAlarmsRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the DescribeAlarms operation with an AsyncHandler.
@see #describeAlarmsAsync(DescribeAlarmsRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"DescribeAlarms",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudwatch/src/main/java/com/amazonaws/services/cloudwatch/AmazonCloudWatchAsyncClient.java#L430-L435
|
19,779
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/EventsRequest.java
|
EventsRequest.withBatchItem
|
public EventsRequest withBatchItem(java.util.Map<String, EventsBatch> batchItem) {
setBatchItem(batchItem);
return this;
}
|
java
|
public EventsRequest withBatchItem(java.util.Map<String, EventsBatch> batchItem) {
setBatchItem(batchItem);
return this;
}
|
[
"public",
"EventsRequest",
"withBatchItem",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"EventsBatch",
">",
"batchItem",
")",
"{",
"setBatchItem",
"(",
"batchItem",
")",
";",
"return",
"this",
";",
"}"
] |
A batch of events to process. Each BatchItem consists of an endpoint ID as the key, and an EventsBatch object as
the value.
@param batchItem
A batch of events to process. Each BatchItem consists of an endpoint ID as the key, and an EventsBatch
object as the value.
@return Returns a reference to this object so that method calls can be chained together.
|
[
"A",
"batch",
"of",
"events",
"to",
"process",
".",
"Each",
"BatchItem",
"consists",
"of",
"an",
"endpoint",
"ID",
"as",
"the",
"key",
"and",
"an",
"EventsBatch",
"object",
"as",
"the",
"value",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/EventsRequest.java#L70-L73
|
19,780
|
aws/aws-sdk-java
|
aws-java-sdk-ses/src/main/java/com/amazonaws/services/simpleemail/AbstractAmazonSimpleEmailServiceAsync.java
|
AbstractAmazonSimpleEmailServiceAsync.getSendQuotaAsync
|
@Override
public java.util.concurrent.Future<GetSendQuotaResult> getSendQuotaAsync(
com.amazonaws.handlers.AsyncHandler<GetSendQuotaRequest, GetSendQuotaResult> asyncHandler) {
return getSendQuotaAsync(new GetSendQuotaRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<GetSendQuotaResult> getSendQuotaAsync(
com.amazonaws.handlers.AsyncHandler<GetSendQuotaRequest, GetSendQuotaResult> asyncHandler) {
return getSendQuotaAsync(new GetSendQuotaRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"GetSendQuotaResult",
">",
"getSendQuotaAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"GetSendQuotaRequest",
",",
"GetSendQuotaResult",
">",
"asyncHandler",
")",
"{",
"return",
"getSendQuotaAsync",
"(",
"new",
"GetSendQuotaRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the GetSendQuota operation with an AsyncHandler.
@see #getSendQuotaAsync(GetSendQuotaRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"GetSendQuota",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ses/src/main/java/com/amazonaws/services/simpleemail/AbstractAmazonSimpleEmailServiceAsync.java#L482-L487
|
19,781
|
aws/aws-sdk-java
|
aws-java-sdk-ses/src/main/java/com/amazonaws/services/simpleemail/AbstractAmazonSimpleEmailServiceAsync.java
|
AbstractAmazonSimpleEmailServiceAsync.listVerifiedEmailAddressesAsync
|
@Override
public java.util.concurrent.Future<ListVerifiedEmailAddressesResult> listVerifiedEmailAddressesAsync(
com.amazonaws.handlers.AsyncHandler<ListVerifiedEmailAddressesRequest, ListVerifiedEmailAddressesResult> asyncHandler) {
return listVerifiedEmailAddressesAsync(new ListVerifiedEmailAddressesRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<ListVerifiedEmailAddressesResult> listVerifiedEmailAddressesAsync(
com.amazonaws.handlers.AsyncHandler<ListVerifiedEmailAddressesRequest, ListVerifiedEmailAddressesResult> asyncHandler) {
return listVerifiedEmailAddressesAsync(new ListVerifiedEmailAddressesRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"ListVerifiedEmailAddressesResult",
">",
"listVerifiedEmailAddressesAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"ListVerifiedEmailAddressesRequest",
",",
"ListVerifiedEmailAddressesResult",
">",
"asyncHandler",
")",
"{",
"return",
"listVerifiedEmailAddressesAsync",
"(",
"new",
"ListVerifiedEmailAddressesRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the ListVerifiedEmailAddresses operation with an AsyncHandler.
@see #listVerifiedEmailAddressesAsync(ListVerifiedEmailAddressesRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"ListVerifiedEmailAddresses",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ses/src/main/java/com/amazonaws/services/simpleemail/AbstractAmazonSimpleEmailServiceAsync.java#L683-L688
|
19,782
|
aws/aws-sdk-java
|
aws-java-sdk-rds/src/main/java/com/amazonaws/services/rds/auth/RdsIamAuthTokenGenerator.java
|
RdsIamAuthTokenGenerator.getAuthToken
|
public String getAuthToken(GetIamAuthTokenRequest request) throws AmazonClientException {
DefaultRequest<Void> signableRequest = new DefaultRequest<Void>(SERVICE_NAME);
signableRequest.setResourcePath("/");
setEndpoint(signableRequest, request);
setParameters(signableRequest, request);
signableRequest.setHttpMethod(HttpMethodName.GET);
return presignerFacade.presign(signableRequest, getExpirationDate()).toExternalForm().replaceFirst("http://", "");
}
|
java
|
public String getAuthToken(GetIamAuthTokenRequest request) throws AmazonClientException {
DefaultRequest<Void> signableRequest = new DefaultRequest<Void>(SERVICE_NAME);
signableRequest.setResourcePath("/");
setEndpoint(signableRequest, request);
setParameters(signableRequest, request);
signableRequest.setHttpMethod(HttpMethodName.GET);
return presignerFacade.presign(signableRequest, getExpirationDate()).toExternalForm().replaceFirst("http://", "");
}
|
[
"public",
"String",
"getAuthToken",
"(",
"GetIamAuthTokenRequest",
"request",
")",
"throws",
"AmazonClientException",
"{",
"DefaultRequest",
"<",
"Void",
">",
"signableRequest",
"=",
"new",
"DefaultRequest",
"<",
"Void",
">",
"(",
"SERVICE_NAME",
")",
";",
"signableRequest",
".",
"setResourcePath",
"(",
"\"/\"",
")",
";",
"setEndpoint",
"(",
"signableRequest",
",",
"request",
")",
";",
"setParameters",
"(",
"signableRequest",
",",
"request",
")",
";",
"signableRequest",
".",
"setHttpMethod",
"(",
"HttpMethodName",
".",
"GET",
")",
";",
"return",
"presignerFacade",
".",
"presign",
"(",
"signableRequest",
",",
"getExpirationDate",
"(",
")",
")",
".",
"toExternalForm",
"(",
")",
".",
"replaceFirst",
"(",
"\"http://\"",
",",
"\"\"",
")",
";",
"}"
] |
Create an authorization token used to connect to a database that uses RDS IAM authentication.
|
[
"Create",
"an",
"authorization",
"token",
"used",
"to",
"connect",
"to",
"a",
"database",
"that",
"uses",
"RDS",
"IAM",
"authentication",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-rds/src/main/java/com/amazonaws/services/rds/auth/RdsIamAuthTokenGenerator.java#L82-L89
|
19,783
|
aws/aws-sdk-java
|
aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java
|
AWSMediaPackageClient.createChannel
|
@Override
public CreateChannelResult createChannel(CreateChannelRequest request) {
request = beforeClientExecution(request);
return executeCreateChannel(request);
}
|
java
|
@Override
public CreateChannelResult createChannel(CreateChannelRequest request) {
request = beforeClientExecution(request);
return executeCreateChannel(request);
}
|
[
"@",
"Override",
"public",
"CreateChannelResult",
"createChannel",
"(",
"CreateChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateChannel",
"(",
"request",
")",
";",
"}"
] |
Creates a new Channel.
@param createChannelRequest
A new Channel configuration.
@return Result of the CreateChannel operation returned by the service.
@throws UnprocessableEntityException
The parameters sent in the request are not valid.
@throws InternalServerErrorException
An unexpected error occurred.
@throws ForbiddenException
The client is not authorized to access the requested resource.
@throws NotFoundException
The requested resource does not exist.
@throws ServiceUnavailableException
An unexpected error occurred.
@throws TooManyRequestsException
The client has exceeded their resource or throttling limits.
@sample AWSMediaPackage.CreateChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/CreateChannel" target="_top">AWS API
Documentation</a>
|
[
"Creates",
"a",
"new",
"Channel",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java#L166-L170
|
19,784
|
aws/aws-sdk-java
|
aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java
|
AWSMediaPackageClient.createOriginEndpoint
|
@Override
public CreateOriginEndpointResult createOriginEndpoint(CreateOriginEndpointRequest request) {
request = beforeClientExecution(request);
return executeCreateOriginEndpoint(request);
}
|
java
|
@Override
public CreateOriginEndpointResult createOriginEndpoint(CreateOriginEndpointRequest request) {
request = beforeClientExecution(request);
return executeCreateOriginEndpoint(request);
}
|
[
"@",
"Override",
"public",
"CreateOriginEndpointResult",
"createOriginEndpoint",
"(",
"CreateOriginEndpointRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateOriginEndpoint",
"(",
"request",
")",
";",
"}"
] |
Creates a new OriginEndpoint record.
@param createOriginEndpointRequest
Configuration parameters used to create a new OriginEndpoint.
@return Result of the CreateOriginEndpoint operation returned by the service.
@throws UnprocessableEntityException
The parameters sent in the request are not valid.
@throws InternalServerErrorException
An unexpected error occurred.
@throws ForbiddenException
The client is not authorized to access the requested resource.
@throws NotFoundException
The requested resource does not exist.
@throws ServiceUnavailableException
An unexpected error occurred.
@throws TooManyRequestsException
The client has exceeded their resource or throttling limits.
@sample AWSMediaPackage.CreateOriginEndpoint
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/CreateOriginEndpoint"
target="_top">AWS API Documentation</a>
|
[
"Creates",
"a",
"new",
"OriginEndpoint",
"record",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java#L229-L233
|
19,785
|
aws/aws-sdk-java
|
aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java
|
AWSMediaPackageClient.deleteChannel
|
@Override
public DeleteChannelResult deleteChannel(DeleteChannelRequest request) {
request = beforeClientExecution(request);
return executeDeleteChannel(request);
}
|
java
|
@Override
public DeleteChannelResult deleteChannel(DeleteChannelRequest request) {
request = beforeClientExecution(request);
return executeDeleteChannel(request);
}
|
[
"@",
"Override",
"public",
"DeleteChannelResult",
"deleteChannel",
"(",
"DeleteChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteChannel",
"(",
"request",
")",
";",
"}"
] |
Deletes an existing Channel.
@param deleteChannelRequest
@return Result of the DeleteChannel operation returned by the service.
@throws UnprocessableEntityException
The parameters sent in the request are not valid.
@throws InternalServerErrorException
An unexpected error occurred.
@throws ForbiddenException
The client is not authorized to access the requested resource.
@throws NotFoundException
The requested resource does not exist.
@throws ServiceUnavailableException
An unexpected error occurred.
@throws TooManyRequestsException
The client has exceeded their resource or throttling limits.
@sample AWSMediaPackage.DeleteChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DeleteChannel" target="_top">AWS API
Documentation</a>
|
[
"Deletes",
"an",
"existing",
"Channel",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java#L291-L295
|
19,786
|
aws/aws-sdk-java
|
aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java
|
AWSMediaPackageClient.deleteOriginEndpoint
|
@Override
public DeleteOriginEndpointResult deleteOriginEndpoint(DeleteOriginEndpointRequest request) {
request = beforeClientExecution(request);
return executeDeleteOriginEndpoint(request);
}
|
java
|
@Override
public DeleteOriginEndpointResult deleteOriginEndpoint(DeleteOriginEndpointRequest request) {
request = beforeClientExecution(request);
return executeDeleteOriginEndpoint(request);
}
|
[
"@",
"Override",
"public",
"DeleteOriginEndpointResult",
"deleteOriginEndpoint",
"(",
"DeleteOriginEndpointRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteOriginEndpoint",
"(",
"request",
")",
";",
"}"
] |
Deletes an existing OriginEndpoint.
@param deleteOriginEndpointRequest
@return Result of the DeleteOriginEndpoint operation returned by the service.
@throws UnprocessableEntityException
The parameters sent in the request are not valid.
@throws InternalServerErrorException
An unexpected error occurred.
@throws ForbiddenException
The client is not authorized to access the requested resource.
@throws NotFoundException
The requested resource does not exist.
@throws ServiceUnavailableException
An unexpected error occurred.
@throws TooManyRequestsException
The client has exceeded their resource or throttling limits.
@sample AWSMediaPackage.DeleteOriginEndpoint
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DeleteOriginEndpoint"
target="_top">AWS API Documentation</a>
|
[
"Deletes",
"an",
"existing",
"OriginEndpoint",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java#L353-L357
|
19,787
|
aws/aws-sdk-java
|
aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java
|
AWSMediaPackageClient.describeChannel
|
@Override
public DescribeChannelResult describeChannel(DescribeChannelRequest request) {
request = beforeClientExecution(request);
return executeDescribeChannel(request);
}
|
java
|
@Override
public DescribeChannelResult describeChannel(DescribeChannelRequest request) {
request = beforeClientExecution(request);
return executeDescribeChannel(request);
}
|
[
"@",
"Override",
"public",
"DescribeChannelResult",
"describeChannel",
"(",
"DescribeChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeChannel",
"(",
"request",
")",
";",
"}"
] |
Gets details about a Channel.
@param describeChannelRequest
@return Result of the DescribeChannel operation returned by the service.
@throws UnprocessableEntityException
The parameters sent in the request are not valid.
@throws InternalServerErrorException
An unexpected error occurred.
@throws ForbiddenException
The client is not authorized to access the requested resource.
@throws NotFoundException
The requested resource does not exist.
@throws ServiceUnavailableException
An unexpected error occurred.
@throws TooManyRequestsException
The client has exceeded their resource or throttling limits.
@sample AWSMediaPackage.DescribeChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DescribeChannel" target="_top">AWS
API Documentation</a>
|
[
"Gets",
"details",
"about",
"a",
"Channel",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java#L415-L419
|
19,788
|
aws/aws-sdk-java
|
aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java
|
AWSMediaPackageClient.describeOriginEndpoint
|
@Override
public DescribeOriginEndpointResult describeOriginEndpoint(DescribeOriginEndpointRequest request) {
request = beforeClientExecution(request);
return executeDescribeOriginEndpoint(request);
}
|
java
|
@Override
public DescribeOriginEndpointResult describeOriginEndpoint(DescribeOriginEndpointRequest request) {
request = beforeClientExecution(request);
return executeDescribeOriginEndpoint(request);
}
|
[
"@",
"Override",
"public",
"DescribeOriginEndpointResult",
"describeOriginEndpoint",
"(",
"DescribeOriginEndpointRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeOriginEndpoint",
"(",
"request",
")",
";",
"}"
] |
Gets details about an existing OriginEndpoint.
@param describeOriginEndpointRequest
@return Result of the DescribeOriginEndpoint operation returned by the service.
@throws UnprocessableEntityException
The parameters sent in the request are not valid.
@throws InternalServerErrorException
An unexpected error occurred.
@throws ForbiddenException
The client is not authorized to access the requested resource.
@throws NotFoundException
The requested resource does not exist.
@throws ServiceUnavailableException
An unexpected error occurred.
@throws TooManyRequestsException
The client has exceeded their resource or throttling limits.
@sample AWSMediaPackage.DescribeOriginEndpoint
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DescribeOriginEndpoint"
target="_top">AWS API Documentation</a>
|
[
"Gets",
"details",
"about",
"an",
"existing",
"OriginEndpoint",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java#L477-L481
|
19,789
|
aws/aws-sdk-java
|
aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java
|
AWSMediaPackageClient.listChannels
|
@Override
public ListChannelsResult listChannels(ListChannelsRequest request) {
request = beforeClientExecution(request);
return executeListChannels(request);
}
|
java
|
@Override
public ListChannelsResult listChannels(ListChannelsRequest request) {
request = beforeClientExecution(request);
return executeListChannels(request);
}
|
[
"@",
"Override",
"public",
"ListChannelsResult",
"listChannels",
"(",
"ListChannelsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListChannels",
"(",
"request",
")",
";",
"}"
] |
Returns a collection of Channels.
@param listChannelsRequest
@return Result of the ListChannels operation returned by the service.
@throws UnprocessableEntityException
The parameters sent in the request are not valid.
@throws InternalServerErrorException
An unexpected error occurred.
@throws ForbiddenException
The client is not authorized to access the requested resource.
@throws NotFoundException
The requested resource does not exist.
@throws ServiceUnavailableException
An unexpected error occurred.
@throws TooManyRequestsException
The client has exceeded their resource or throttling limits.
@sample AWSMediaPackage.ListChannels
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/ListChannels" target="_top">AWS API
Documentation</a>
|
[
"Returns",
"a",
"collection",
"of",
"Channels",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java#L540-L544
|
19,790
|
aws/aws-sdk-java
|
aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java
|
AWSMediaPackageClient.listOriginEndpoints
|
@Override
public ListOriginEndpointsResult listOriginEndpoints(ListOriginEndpointsRequest request) {
request = beforeClientExecution(request);
return executeListOriginEndpoints(request);
}
|
java
|
@Override
public ListOriginEndpointsResult listOriginEndpoints(ListOriginEndpointsRequest request) {
request = beforeClientExecution(request);
return executeListOriginEndpoints(request);
}
|
[
"@",
"Override",
"public",
"ListOriginEndpointsResult",
"listOriginEndpoints",
"(",
"ListOriginEndpointsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListOriginEndpoints",
"(",
"request",
")",
";",
"}"
] |
Returns a collection of OriginEndpoint records.
@param listOriginEndpointsRequest
@return Result of the ListOriginEndpoints operation returned by the service.
@throws UnprocessableEntityException
The parameters sent in the request are not valid.
@throws InternalServerErrorException
An unexpected error occurred.
@throws ForbiddenException
The client is not authorized to access the requested resource.
@throws NotFoundException
The requested resource does not exist.
@throws ServiceUnavailableException
An unexpected error occurred.
@throws TooManyRequestsException
The client has exceeded their resource or throttling limits.
@sample AWSMediaPackage.ListOriginEndpoints
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/ListOriginEndpoints"
target="_top">AWS API Documentation</a>
|
[
"Returns",
"a",
"collection",
"of",
"OriginEndpoint",
"records",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java#L602-L606
|
19,791
|
aws/aws-sdk-java
|
aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java
|
AWSMediaPackageClient.rotateChannelCredentials
|
@Override
@Deprecated
public RotateChannelCredentialsResult rotateChannelCredentials(RotateChannelCredentialsRequest request) {
request = beforeClientExecution(request);
return executeRotateChannelCredentials(request);
}
|
java
|
@Override
@Deprecated
public RotateChannelCredentialsResult rotateChannelCredentials(RotateChannelCredentialsRequest request) {
request = beforeClientExecution(request);
return executeRotateChannelCredentials(request);
}
|
[
"@",
"Override",
"@",
"Deprecated",
"public",
"RotateChannelCredentialsResult",
"rotateChannelCredentials",
"(",
"RotateChannelCredentialsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeRotateChannelCredentials",
"(",
"request",
")",
";",
"}"
] |
Changes the Channel's first IngestEndpoint's username and password. WARNING - This API is deprecated. Please use
RotateIngestEndpointCredentials instead
@param rotateChannelCredentialsRequest
@return Result of the RotateChannelCredentials operation returned by the service.
@throws UnprocessableEntityException
The parameters sent in the request are not valid.
@throws InternalServerErrorException
An unexpected error occurred.
@throws ForbiddenException
The client is not authorized to access the requested resource.
@throws NotFoundException
The requested resource does not exist.
@throws ServiceUnavailableException
An unexpected error occurred.
@throws TooManyRequestsException
The client has exceeded their resource or throttling limits.
@sample AWSMediaPackage.RotateChannelCredentials
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/RotateChannelCredentials"
target="_top">AWS API Documentation</a>
|
[
"Changes",
"the",
"Channel",
"s",
"first",
"IngestEndpoint",
"s",
"username",
"and",
"password",
".",
"WARNING",
"-",
"This",
"API",
"is",
"deprecated",
".",
"Please",
"use",
"RotateIngestEndpointCredentials",
"instead"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java#L713-L718
|
19,792
|
aws/aws-sdk-java
|
aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java
|
AWSMediaPackageClient.rotateIngestEndpointCredentials
|
@Override
public RotateIngestEndpointCredentialsResult rotateIngestEndpointCredentials(RotateIngestEndpointCredentialsRequest request) {
request = beforeClientExecution(request);
return executeRotateIngestEndpointCredentials(request);
}
|
java
|
@Override
public RotateIngestEndpointCredentialsResult rotateIngestEndpointCredentials(RotateIngestEndpointCredentialsRequest request) {
request = beforeClientExecution(request);
return executeRotateIngestEndpointCredentials(request);
}
|
[
"@",
"Override",
"public",
"RotateIngestEndpointCredentialsResult",
"rotateIngestEndpointCredentials",
"(",
"RotateIngestEndpointCredentialsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeRotateIngestEndpointCredentials",
"(",
"request",
")",
";",
"}"
] |
Rotate the IngestEndpoint's username and password, as specified by the IngestEndpoint's id.
@param rotateIngestEndpointCredentialsRequest
@return Result of the RotateIngestEndpointCredentials operation returned by the service.
@throws UnprocessableEntityException
The parameters sent in the request are not valid.
@throws InternalServerErrorException
An unexpected error occurred.
@throws ForbiddenException
The client is not authorized to access the requested resource.
@throws NotFoundException
The requested resource does not exist.
@throws ServiceUnavailableException
An unexpected error occurred.
@throws TooManyRequestsException
The client has exceeded their resource or throttling limits.
@sample AWSMediaPackage.RotateIngestEndpointCredentials
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/RotateIngestEndpointCredentials"
target="_top">AWS API Documentation</a>
|
[
"Rotate",
"the",
"IngestEndpoint",
"s",
"username",
"and",
"password",
"as",
"specified",
"by",
"the",
"IngestEndpoint",
"s",
"id",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java#L778-L782
|
19,793
|
aws/aws-sdk-java
|
aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java
|
AWSMediaPackageClient.updateChannel
|
@Override
public UpdateChannelResult updateChannel(UpdateChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateChannel(request);
}
|
java
|
@Override
public UpdateChannelResult updateChannel(UpdateChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateChannel(request);
}
|
[
"@",
"Override",
"public",
"UpdateChannelResult",
"updateChannel",
"(",
"UpdateChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateChannel",
"(",
"request",
")",
";",
"}"
] |
Updates an existing Channel.
@param updateChannelRequest
Configuration parameters used to update the Channel.
@return Result of the UpdateChannel operation returned by the service.
@throws UnprocessableEntityException
The parameters sent in the request are not valid.
@throws InternalServerErrorException
An unexpected error occurred.
@throws ForbiddenException
The client is not authorized to access the requested resource.
@throws NotFoundException
The requested resource does not exist.
@throws ServiceUnavailableException
An unexpected error occurred.
@throws TooManyRequestsException
The client has exceeded their resource or throttling limits.
@sample AWSMediaPackage.UpdateChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/UpdateChannel" target="_top">AWS API
Documentation</a>
|
[
"Updates",
"an",
"existing",
"Channel",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java#L940-L944
|
19,794
|
aws/aws-sdk-java
|
aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java
|
AWSMediaPackageClient.updateOriginEndpoint
|
@Override
public UpdateOriginEndpointResult updateOriginEndpoint(UpdateOriginEndpointRequest request) {
request = beforeClientExecution(request);
return executeUpdateOriginEndpoint(request);
}
|
java
|
@Override
public UpdateOriginEndpointResult updateOriginEndpoint(UpdateOriginEndpointRequest request) {
request = beforeClientExecution(request);
return executeUpdateOriginEndpoint(request);
}
|
[
"@",
"Override",
"public",
"UpdateOriginEndpointResult",
"updateOriginEndpoint",
"(",
"UpdateOriginEndpointRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateOriginEndpoint",
"(",
"request",
")",
";",
"}"
] |
Updates an existing OriginEndpoint.
@param updateOriginEndpointRequest
Configuration parameters used to update an existing OriginEndpoint.
@return Result of the UpdateOriginEndpoint operation returned by the service.
@throws UnprocessableEntityException
The parameters sent in the request are not valid.
@throws InternalServerErrorException
An unexpected error occurred.
@throws ForbiddenException
The client is not authorized to access the requested resource.
@throws NotFoundException
The requested resource does not exist.
@throws ServiceUnavailableException
An unexpected error occurred.
@throws TooManyRequestsException
The client has exceeded their resource or throttling limits.
@sample AWSMediaPackage.UpdateOriginEndpoint
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/UpdateOriginEndpoint"
target="_top">AWS API Documentation</a>
|
[
"Updates",
"an",
"existing",
"OriginEndpoint",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/AWSMediaPackageClient.java#L1003-L1007
|
19,795
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/EventsBatch.java
|
EventsBatch.withEvents
|
public EventsBatch withEvents(java.util.Map<String, Event> events) {
setEvents(events);
return this;
}
|
java
|
public EventsBatch withEvents(java.util.Map<String, Event> events) {
setEvents(events);
return this;
}
|
[
"public",
"EventsBatch",
"withEvents",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"Event",
">",
"events",
")",
"{",
"setEvents",
"(",
"events",
")",
";",
"return",
"this",
";",
"}"
] |
An object that contains a set of events associated with the endpoint.
@param events
An object that contains a set of events associated with the endpoint.
@return Returns a reference to this object so that method calls can be chained together.
|
[
"An",
"object",
"that",
"contains",
"a",
"set",
"of",
"events",
"associated",
"with",
"the",
"endpoint",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/EventsBatch.java#L97-L100
|
19,796
|
aws/aws-sdk-java
|
aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/model/ListJobTemplatesResult.java
|
ListJobTemplatesResult.setJobTemplates
|
public void setJobTemplates(java.util.Collection<JobTemplate> jobTemplates) {
if (jobTemplates == null) {
this.jobTemplates = null;
return;
}
this.jobTemplates = new java.util.ArrayList<JobTemplate>(jobTemplates);
}
|
java
|
public void setJobTemplates(java.util.Collection<JobTemplate> jobTemplates) {
if (jobTemplates == null) {
this.jobTemplates = null;
return;
}
this.jobTemplates = new java.util.ArrayList<JobTemplate>(jobTemplates);
}
|
[
"public",
"void",
"setJobTemplates",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"JobTemplate",
">",
"jobTemplates",
")",
"{",
"if",
"(",
"jobTemplates",
"==",
"null",
")",
"{",
"this",
".",
"jobTemplates",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"jobTemplates",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"JobTemplate",
">",
"(",
"jobTemplates",
")",
";",
"}"
] |
List of Job templates.
@param jobTemplates
List of Job templates.
|
[
"List",
"of",
"Job",
"templates",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/model/ListJobTemplatesResult.java#L48-L55
|
19,797
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/RepeatableInputStream.java
|
RepeatableInputStream.reset
|
public void reset() throws IOException {
abortIfNeeded();
if (bytesReadPastMark <= bufferSize) {
if (log.isDebugEnabled()) {
log.debug("Reset after reading " + bytesReadPastMark + " bytes.");
}
bufferOffset = 0;
} else {
throw new IOException(
"Input stream cannot be reset as " + this.bytesReadPastMark
+ " bytes have been written, exceeding the available buffer size of " + this.bufferSize);
}
}
|
java
|
public void reset() throws IOException {
abortIfNeeded();
if (bytesReadPastMark <= bufferSize) {
if (log.isDebugEnabled()) {
log.debug("Reset after reading " + bytesReadPastMark + " bytes.");
}
bufferOffset = 0;
} else {
throw new IOException(
"Input stream cannot be reset as " + this.bytesReadPastMark
+ " bytes have been written, exceeding the available buffer size of " + this.bufferSize);
}
}
|
[
"public",
"void",
"reset",
"(",
")",
"throws",
"IOException",
"{",
"abortIfNeeded",
"(",
")",
";",
"if",
"(",
"bytesReadPastMark",
"<=",
"bufferSize",
")",
"{",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"log",
".",
"debug",
"(",
"\"Reset after reading \"",
"+",
"bytesReadPastMark",
"+",
"\" bytes.\"",
")",
";",
"}",
"bufferOffset",
"=",
"0",
";",
"}",
"else",
"{",
"throw",
"new",
"IOException",
"(",
"\"Input stream cannot be reset as \"",
"+",
"this",
".",
"bytesReadPastMark",
"+",
"\" bytes have been written, exceeding the available buffer size of \"",
"+",
"this",
".",
"bufferSize",
")",
";",
"}",
"}"
] |
Resets the input stream to the beginning by pointing the buffer offset to
the beginning of the available data buffer.
@throws IOException
When the available buffer size has been exceeded, in which
case the input stream data cannot be repeated.
|
[
"Resets",
"the",
"input",
"stream",
"to",
"the",
"beginning",
"by",
"pointing",
"the",
"buffer",
"offset",
"to",
"the",
"beginning",
"of",
"the",
"available",
"data",
"buffer",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/RepeatableInputStream.java#L85-L97
|
19,798
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/RepeatableInputStream.java
|
RepeatableInputStream.mark
|
public void mark(int readlimit) {
abortIfNeeded();
if (log.isDebugEnabled()) {
log.debug("Input stream marked at " + bytesReadPastMark + " bytes");
}
if (bytesReadPastMark <= bufferSize && buffer != null) {
/*
* Clear buffer of already-read data to make more space. It's safe
* to cast bytesReadPastMark to an int because it is known to be
* less than bufferSize, which is an int.
*/
byte[] newBuffer = new byte[this.bufferSize];
System.arraycopy(buffer, bufferOffset, newBuffer, 0, (int)(bytesReadPastMark - bufferOffset));
this.buffer = newBuffer;
this.bytesReadPastMark -= bufferOffset;
this.bufferOffset = 0;
} else {
// If mark is called after the buffer was already exceeded, create a new buffer.
this.bufferOffset = 0;
this.bytesReadPastMark = 0;
this.buffer = new byte[this.bufferSize];
}
}
|
java
|
public void mark(int readlimit) {
abortIfNeeded();
if (log.isDebugEnabled()) {
log.debug("Input stream marked at " + bytesReadPastMark + " bytes");
}
if (bytesReadPastMark <= bufferSize && buffer != null) {
/*
* Clear buffer of already-read data to make more space. It's safe
* to cast bytesReadPastMark to an int because it is known to be
* less than bufferSize, which is an int.
*/
byte[] newBuffer = new byte[this.bufferSize];
System.arraycopy(buffer, bufferOffset, newBuffer, 0, (int)(bytesReadPastMark - bufferOffset));
this.buffer = newBuffer;
this.bytesReadPastMark -= bufferOffset;
this.bufferOffset = 0;
} else {
// If mark is called after the buffer was already exceeded, create a new buffer.
this.bufferOffset = 0;
this.bytesReadPastMark = 0;
this.buffer = new byte[this.bufferSize];
}
}
|
[
"public",
"void",
"mark",
"(",
"int",
"readlimit",
")",
"{",
"abortIfNeeded",
"(",
")",
";",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"log",
".",
"debug",
"(",
"\"Input stream marked at \"",
"+",
"bytesReadPastMark",
"+",
"\" bytes\"",
")",
";",
"}",
"if",
"(",
"bytesReadPastMark",
"<=",
"bufferSize",
"&&",
"buffer",
"!=",
"null",
")",
"{",
"/*\n * Clear buffer of already-read data to make more space. It's safe\n * to cast bytesReadPastMark to an int because it is known to be\n * less than bufferSize, which is an int.\n */",
"byte",
"[",
"]",
"newBuffer",
"=",
"new",
"byte",
"[",
"this",
".",
"bufferSize",
"]",
";",
"System",
".",
"arraycopy",
"(",
"buffer",
",",
"bufferOffset",
",",
"newBuffer",
",",
"0",
",",
"(",
"int",
")",
"(",
"bytesReadPastMark",
"-",
"bufferOffset",
")",
")",
";",
"this",
".",
"buffer",
"=",
"newBuffer",
";",
"this",
".",
"bytesReadPastMark",
"-=",
"bufferOffset",
";",
"this",
".",
"bufferOffset",
"=",
"0",
";",
"}",
"else",
"{",
"// If mark is called after the buffer was already exceeded, create a new buffer.",
"this",
".",
"bufferOffset",
"=",
"0",
";",
"this",
".",
"bytesReadPastMark",
"=",
"0",
";",
"this",
".",
"buffer",
"=",
"new",
"byte",
"[",
"this",
".",
"bufferSize",
"]",
";",
"}",
"}"
] |
This method can only be used while less data has been read from the input
stream than fits into the buffer. The readLimit parameter is ignored
entirely.
|
[
"This",
"method",
"can",
"only",
"be",
"used",
"while",
"less",
"data",
"has",
"been",
"read",
"from",
"the",
"input",
"stream",
"than",
"fits",
"into",
"the",
"buffer",
".",
"The",
"readLimit",
"parameter",
"is",
"ignored",
"entirely",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/RepeatableInputStream.java#L111-L133
|
19,799
|
aws/aws-sdk-java
|
aws-java-sdk-elasticache/src/main/java/com/amazonaws/services/elasticache/waiters/AmazonElastiCacheWaiters.java
|
AmazonElastiCacheWaiters.cacheClusterDeleted
|
public Waiter<DescribeCacheClustersRequest> cacheClusterDeleted() {
return new WaiterBuilder<DescribeCacheClustersRequest, DescribeCacheClustersResult>()
.withSdkFunction(new DescribeCacheClustersFunction(client))
.withAcceptors(new CacheClusterDeleted.IsDeletedMatcher(), new CacheClusterDeleted.IsCacheClusterNotFoundMatcher(),
new CacheClusterDeleted.IsAvailableMatcher(), new CacheClusterDeleted.IsCreatingMatcher(),
new CacheClusterDeleted.IsIncompatiblenetworkMatcher(), new CacheClusterDeleted.IsModifyingMatcher(),
new CacheClusterDeleted.IsRestorefailedMatcher(), new CacheClusterDeleted.IsSnapshottingMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<DescribeCacheClustersRequest> cacheClusterDeleted() {
return new WaiterBuilder<DescribeCacheClustersRequest, DescribeCacheClustersResult>()
.withSdkFunction(new DescribeCacheClustersFunction(client))
.withAcceptors(new CacheClusterDeleted.IsDeletedMatcher(), new CacheClusterDeleted.IsCacheClusterNotFoundMatcher(),
new CacheClusterDeleted.IsAvailableMatcher(), new CacheClusterDeleted.IsCreatingMatcher(),
new CacheClusterDeleted.IsIncompatiblenetworkMatcher(), new CacheClusterDeleted.IsModifyingMatcher(),
new CacheClusterDeleted.IsRestorefailedMatcher(), new CacheClusterDeleted.IsSnapshottingMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"DescribeCacheClustersRequest",
">",
"cacheClusterDeleted",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"DescribeCacheClustersRequest",
",",
"DescribeCacheClustersResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"DescribeCacheClustersFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"CacheClusterDeleted",
".",
"IsDeletedMatcher",
"(",
")",
",",
"new",
"CacheClusterDeleted",
".",
"IsCacheClusterNotFoundMatcher",
"(",
")",
",",
"new",
"CacheClusterDeleted",
".",
"IsAvailableMatcher",
"(",
")",
",",
"new",
"CacheClusterDeleted",
".",
"IsCreatingMatcher",
"(",
")",
",",
"new",
"CacheClusterDeleted",
".",
"IsIncompatiblenetworkMatcher",
"(",
")",
",",
"new",
"CacheClusterDeleted",
".",
"IsModifyingMatcher",
"(",
")",
",",
"new",
"CacheClusterDeleted",
".",
"IsRestorefailedMatcher",
"(",
")",
",",
"new",
"CacheClusterDeleted",
".",
"IsSnapshottingMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"40",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"15",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a CacheClusterDeleted waiter by using custom parameters waiterParameters and other parameters defined in
the waiters specification, and then polls until it determines whether the resource entered the desired state or
not, where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"CacheClusterDeleted",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-elasticache/src/main/java/com/amazonaws/services/elasticache/waiters/AmazonElastiCacheWaiters.java#L51-L61
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.