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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
20,800
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getApnsVoipSandboxChannel
|
@Override
public GetApnsVoipSandboxChannelResult getApnsVoipSandboxChannel(GetApnsVoipSandboxChannelRequest request) {
request = beforeClientExecution(request);
return executeGetApnsVoipSandboxChannel(request);
}
|
java
|
@Override
public GetApnsVoipSandboxChannelResult getApnsVoipSandboxChannel(GetApnsVoipSandboxChannelRequest request) {
request = beforeClientExecution(request);
return executeGetApnsVoipSandboxChannel(request);
}
|
[
"@",
"Override",
"public",
"GetApnsVoipSandboxChannelResult",
"getApnsVoipSandboxChannel",
"(",
"GetApnsVoipSandboxChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetApnsVoipSandboxChannel",
"(",
"request",
")",
";",
"}"
] |
Get an APNS VoIPSandbox channel
@param getApnsVoipSandboxChannelRequest
@return Result of the GetApnsVoipSandboxChannel operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetApnsVoipSandboxChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsVoipSandboxChannel"
target="_top">AWS API Documentation</a>
|
[
"Get",
"an",
"APNS",
"VoIPSandbox",
"channel"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L1874-L1878
|
20,801
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getApplicationSettings
|
@Override
public GetApplicationSettingsResult getApplicationSettings(GetApplicationSettingsRequest request) {
request = beforeClientExecution(request);
return executeGetApplicationSettings(request);
}
|
java
|
@Override
public GetApplicationSettingsResult getApplicationSettings(GetApplicationSettingsRequest request) {
request = beforeClientExecution(request);
return executeGetApplicationSettings(request);
}
|
[
"@",
"Override",
"public",
"GetApplicationSettingsResult",
"getApplicationSettings",
"(",
"GetApplicationSettingsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetApplicationSettings",
"(",
"request",
")",
";",
"}"
] |
Used to request the settings for an app.
@param getApplicationSettingsRequest
@return Result of the GetApplicationSettings operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetApplicationSettings
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApplicationSettings"
target="_top">AWS API Documentation</a>
|
[
"Used",
"to",
"request",
"the",
"settings",
"for",
"an",
"app",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L2000-L2004
|
20,802
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getApps
|
@Override
public GetAppsResult getApps(GetAppsRequest request) {
request = beforeClientExecution(request);
return executeGetApps(request);
}
|
java
|
@Override
public GetAppsResult getApps(GetAppsRequest request) {
request = beforeClientExecution(request);
return executeGetApps(request);
}
|
[
"@",
"Override",
"public",
"GetAppsResult",
"getApps",
"(",
"GetAppsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetApps",
"(",
"request",
")",
";",
"}"
] |
Returns information about your apps.
@param getAppsRequest
@return Result of the GetApps operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetApps
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApps" target="_top">AWS API
Documentation</a>
|
[
"Returns",
"information",
"about",
"your",
"apps",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L2063-L2067
|
20,803
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getBaiduChannel
|
@Override
public GetBaiduChannelResult getBaiduChannel(GetBaiduChannelRequest request) {
request = beforeClientExecution(request);
return executeGetBaiduChannel(request);
}
|
java
|
@Override
public GetBaiduChannelResult getBaiduChannel(GetBaiduChannelRequest request) {
request = beforeClientExecution(request);
return executeGetBaiduChannel(request);
}
|
[
"@",
"Override",
"public",
"GetBaiduChannelResult",
"getBaiduChannel",
"(",
"GetBaiduChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetBaiduChannel",
"(",
"request",
")",
";",
"}"
] |
Get a BAIDU GCM channel
@param getBaiduChannelRequest
@return Result of the GetBaiduChannel operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetBaiduChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetBaiduChannel" target="_top">AWS API
Documentation</a>
|
[
"Get",
"a",
"BAIDU",
"GCM",
"channel"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L2125-L2129
|
20,804
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getCampaign
|
@Override
public GetCampaignResult getCampaign(GetCampaignRequest request) {
request = beforeClientExecution(request);
return executeGetCampaign(request);
}
|
java
|
@Override
public GetCampaignResult getCampaign(GetCampaignRequest request) {
request = beforeClientExecution(request);
return executeGetCampaign(request);
}
|
[
"@",
"Override",
"public",
"GetCampaignResult",
"getCampaign",
"(",
"GetCampaignRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetCampaign",
"(",
"request",
")",
";",
"}"
] |
Returns information about a campaign.
@param getCampaignRequest
@return Result of the GetCampaign operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetCampaign
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaign" target="_top">AWS API
Documentation</a>
|
[
"Returns",
"information",
"about",
"a",
"campaign",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L2187-L2191
|
20,805
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getCampaignActivities
|
@Override
public GetCampaignActivitiesResult getCampaignActivities(GetCampaignActivitiesRequest request) {
request = beforeClientExecution(request);
return executeGetCampaignActivities(request);
}
|
java
|
@Override
public GetCampaignActivitiesResult getCampaignActivities(GetCampaignActivitiesRequest request) {
request = beforeClientExecution(request);
return executeGetCampaignActivities(request);
}
|
[
"@",
"Override",
"public",
"GetCampaignActivitiesResult",
"getCampaignActivities",
"(",
"GetCampaignActivitiesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetCampaignActivities",
"(",
"request",
")",
";",
"}"
] |
Returns information about the activity performed by a campaign.
@param getCampaignActivitiesRequest
@return Result of the GetCampaignActivities operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetCampaignActivities
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignActivities" target="_top">AWS
API Documentation</a>
|
[
"Returns",
"information",
"about",
"the",
"activity",
"performed",
"by",
"a",
"campaign",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L2249-L2253
|
20,806
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getCampaignVersion
|
@Override
public GetCampaignVersionResult getCampaignVersion(GetCampaignVersionRequest request) {
request = beforeClientExecution(request);
return executeGetCampaignVersion(request);
}
|
java
|
@Override
public GetCampaignVersionResult getCampaignVersion(GetCampaignVersionRequest request) {
request = beforeClientExecution(request);
return executeGetCampaignVersion(request);
}
|
[
"@",
"Override",
"public",
"GetCampaignVersionResult",
"getCampaignVersion",
"(",
"GetCampaignVersionRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetCampaignVersion",
"(",
"request",
")",
";",
"}"
] |
Returns information about a specific version of a campaign.
@param getCampaignVersionRequest
@return Result of the GetCampaignVersion operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetCampaignVersion
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersion" target="_top">AWS
API Documentation</a>
|
[
"Returns",
"information",
"about",
"a",
"specific",
"version",
"of",
"a",
"campaign",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L2312-L2316
|
20,807
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getCampaignVersions
|
@Override
public GetCampaignVersionsResult getCampaignVersions(GetCampaignVersionsRequest request) {
request = beforeClientExecution(request);
return executeGetCampaignVersions(request);
}
|
java
|
@Override
public GetCampaignVersionsResult getCampaignVersions(GetCampaignVersionsRequest request) {
request = beforeClientExecution(request);
return executeGetCampaignVersions(request);
}
|
[
"@",
"Override",
"public",
"GetCampaignVersionsResult",
"getCampaignVersions",
"(",
"GetCampaignVersionsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetCampaignVersions",
"(",
"request",
")",
";",
"}"
] |
Returns information about your campaign versions.
@param getCampaignVersionsRequest
@return Result of the GetCampaignVersions operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetCampaignVersions
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersions" target="_top">AWS
API Documentation</a>
|
[
"Returns",
"information",
"about",
"your",
"campaign",
"versions",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L2374-L2378
|
20,808
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getCampaigns
|
@Override
public GetCampaignsResult getCampaigns(GetCampaignsRequest request) {
request = beforeClientExecution(request);
return executeGetCampaigns(request);
}
|
java
|
@Override
public GetCampaignsResult getCampaigns(GetCampaignsRequest request) {
request = beforeClientExecution(request);
return executeGetCampaigns(request);
}
|
[
"@",
"Override",
"public",
"GetCampaignsResult",
"getCampaigns",
"(",
"GetCampaignsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetCampaigns",
"(",
"request",
")",
";",
"}"
] |
Returns information about your campaigns.
@param getCampaignsRequest
@return Result of the GetCampaigns operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetCampaigns
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaigns" target="_top">AWS API
Documentation</a>
|
[
"Returns",
"information",
"about",
"your",
"campaigns",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L2436-L2440
|
20,809
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getChannels
|
@Override
public GetChannelsResult getChannels(GetChannelsRequest request) {
request = beforeClientExecution(request);
return executeGetChannels(request);
}
|
java
|
@Override
public GetChannelsResult getChannels(GetChannelsRequest request) {
request = beforeClientExecution(request);
return executeGetChannels(request);
}
|
[
"@",
"Override",
"public",
"GetChannelsResult",
"getChannels",
"(",
"GetChannelsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetChannels",
"(",
"request",
")",
";",
"}"
] |
Get all channels.
@param getChannelsRequest
@return Result of the GetChannels operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetChannels
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetChannels" target="_top">AWS API
Documentation</a>
|
[
"Get",
"all",
"channels",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L2498-L2502
|
20,810
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getEmailChannel
|
@Override
public GetEmailChannelResult getEmailChannel(GetEmailChannelRequest request) {
request = beforeClientExecution(request);
return executeGetEmailChannel(request);
}
|
java
|
@Override
public GetEmailChannelResult getEmailChannel(GetEmailChannelRequest request) {
request = beforeClientExecution(request);
return executeGetEmailChannel(request);
}
|
[
"@",
"Override",
"public",
"GetEmailChannelResult",
"getEmailChannel",
"(",
"GetEmailChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetEmailChannel",
"(",
"request",
")",
";",
"}"
] |
Get an email channel.
@param getEmailChannelRequest
@return Result of the GetEmailChannel operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetEmailChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEmailChannel" target="_top">AWS API
Documentation</a>
|
[
"Get",
"an",
"email",
"channel",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L2560-L2564
|
20,811
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getEndpoint
|
@Override
public GetEndpointResult getEndpoint(GetEndpointRequest request) {
request = beforeClientExecution(request);
return executeGetEndpoint(request);
}
|
java
|
@Override
public GetEndpointResult getEndpoint(GetEndpointRequest request) {
request = beforeClientExecution(request);
return executeGetEndpoint(request);
}
|
[
"@",
"Override",
"public",
"GetEndpointResult",
"getEndpoint",
"(",
"GetEndpointRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetEndpoint",
"(",
"request",
")",
";",
"}"
] |
Returns information about an endpoint.
@param getEndpointRequest
@return Result of the GetEndpoint operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetEndpoint
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEndpoint" target="_top">AWS API
Documentation</a>
|
[
"Returns",
"information",
"about",
"an",
"endpoint",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L2622-L2626
|
20,812
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getEventStream
|
@Override
public GetEventStreamResult getEventStream(GetEventStreamRequest request) {
request = beforeClientExecution(request);
return executeGetEventStream(request);
}
|
java
|
@Override
public GetEventStreamResult getEventStream(GetEventStreamRequest request) {
request = beforeClientExecution(request);
return executeGetEventStream(request);
}
|
[
"@",
"Override",
"public",
"GetEventStreamResult",
"getEventStream",
"(",
"GetEventStreamRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetEventStream",
"(",
"request",
")",
";",
"}"
] |
Returns the event stream for an app.
@param getEventStreamRequest
@return Result of the GetEventStream operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetEventStream
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEventStream" target="_top">AWS API
Documentation</a>
|
[
"Returns",
"the",
"event",
"stream",
"for",
"an",
"app",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L2684-L2688
|
20,813
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getExportJob
|
@Override
public GetExportJobResult getExportJob(GetExportJobRequest request) {
request = beforeClientExecution(request);
return executeGetExportJob(request);
}
|
java
|
@Override
public GetExportJobResult getExportJob(GetExportJobRequest request) {
request = beforeClientExecution(request);
return executeGetExportJob(request);
}
|
[
"@",
"Override",
"public",
"GetExportJobResult",
"getExportJob",
"(",
"GetExportJobRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetExportJob",
"(",
"request",
")",
";",
"}"
] |
Returns information about an export job.
@param getExportJobRequest
@return Result of the GetExportJob operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetExportJob
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetExportJob" target="_top">AWS API
Documentation</a>
|
[
"Returns",
"information",
"about",
"an",
"export",
"job",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L2746-L2750
|
20,814
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getExportJobs
|
@Override
public GetExportJobsResult getExportJobs(GetExportJobsRequest request) {
request = beforeClientExecution(request);
return executeGetExportJobs(request);
}
|
java
|
@Override
public GetExportJobsResult getExportJobs(GetExportJobsRequest request) {
request = beforeClientExecution(request);
return executeGetExportJobs(request);
}
|
[
"@",
"Override",
"public",
"GetExportJobsResult",
"getExportJobs",
"(",
"GetExportJobsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetExportJobs",
"(",
"request",
")",
";",
"}"
] |
Returns information about your export jobs.
@param getExportJobsRequest
@return Result of the GetExportJobs operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetExportJobs
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetExportJobs" target="_top">AWS API
Documentation</a>
|
[
"Returns",
"information",
"about",
"your",
"export",
"jobs",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L2808-L2812
|
20,815
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getGcmChannel
|
@Override
public GetGcmChannelResult getGcmChannel(GetGcmChannelRequest request) {
request = beforeClientExecution(request);
return executeGetGcmChannel(request);
}
|
java
|
@Override
public GetGcmChannelResult getGcmChannel(GetGcmChannelRequest request) {
request = beforeClientExecution(request);
return executeGetGcmChannel(request);
}
|
[
"@",
"Override",
"public",
"GetGcmChannelResult",
"getGcmChannel",
"(",
"GetGcmChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetGcmChannel",
"(",
"request",
")",
";",
"}"
] |
Returns information about the GCM channel for an app.
@param getGcmChannelRequest
@return Result of the GetGcmChannel operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetGcmChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetGcmChannel" target="_top">AWS API
Documentation</a>
|
[
"Returns",
"information",
"about",
"the",
"GCM",
"channel",
"for",
"an",
"app",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L2870-L2874
|
20,816
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getImportJob
|
@Override
public GetImportJobResult getImportJob(GetImportJobRequest request) {
request = beforeClientExecution(request);
return executeGetImportJob(request);
}
|
java
|
@Override
public GetImportJobResult getImportJob(GetImportJobRequest request) {
request = beforeClientExecution(request);
return executeGetImportJob(request);
}
|
[
"@",
"Override",
"public",
"GetImportJobResult",
"getImportJob",
"(",
"GetImportJobRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetImportJob",
"(",
"request",
")",
";",
"}"
] |
Returns information about an import job.
@param getImportJobRequest
@return Result of the GetImportJob operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetImportJob
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJob" target="_top">AWS API
Documentation</a>
|
[
"Returns",
"information",
"about",
"an",
"import",
"job",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L2932-L2936
|
20,817
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getImportJobs
|
@Override
public GetImportJobsResult getImportJobs(GetImportJobsRequest request) {
request = beforeClientExecution(request);
return executeGetImportJobs(request);
}
|
java
|
@Override
public GetImportJobsResult getImportJobs(GetImportJobsRequest request) {
request = beforeClientExecution(request);
return executeGetImportJobs(request);
}
|
[
"@",
"Override",
"public",
"GetImportJobsResult",
"getImportJobs",
"(",
"GetImportJobsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetImportJobs",
"(",
"request",
")",
";",
"}"
] |
Returns information about your import jobs.
@param getImportJobsRequest
@return Result of the GetImportJobs operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetImportJobs
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJobs" target="_top">AWS API
Documentation</a>
|
[
"Returns",
"information",
"about",
"your",
"import",
"jobs",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L2994-L2998
|
20,818
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getSegment
|
@Override
public GetSegmentResult getSegment(GetSegmentRequest request) {
request = beforeClientExecution(request);
return executeGetSegment(request);
}
|
java
|
@Override
public GetSegmentResult getSegment(GetSegmentRequest request) {
request = beforeClientExecution(request);
return executeGetSegment(request);
}
|
[
"@",
"Override",
"public",
"GetSegmentResult",
"getSegment",
"(",
"GetSegmentRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetSegment",
"(",
"request",
")",
";",
"}"
] |
Returns information about a segment.
@param getSegmentRequest
@return Result of the GetSegment operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetSegment
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegment" target="_top">AWS API
Documentation</a>
|
[
"Returns",
"information",
"about",
"a",
"segment",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L3056-L3060
|
20,819
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getSegmentExportJobs
|
@Override
public GetSegmentExportJobsResult getSegmentExportJobs(GetSegmentExportJobsRequest request) {
request = beforeClientExecution(request);
return executeGetSegmentExportJobs(request);
}
|
java
|
@Override
public GetSegmentExportJobsResult getSegmentExportJobs(GetSegmentExportJobsRequest request) {
request = beforeClientExecution(request);
return executeGetSegmentExportJobs(request);
}
|
[
"@",
"Override",
"public",
"GetSegmentExportJobsResult",
"getSegmentExportJobs",
"(",
"GetSegmentExportJobsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetSegmentExportJobs",
"(",
"request",
")",
";",
"}"
] |
Returns a list of export jobs for a specific segment.
@param getSegmentExportJobsRequest
@return Result of the GetSegmentExportJobs operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetSegmentExportJobs
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentExportJobs" target="_top">AWS
API Documentation</a>
|
[
"Returns",
"a",
"list",
"of",
"export",
"jobs",
"for",
"a",
"specific",
"segment",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L3118-L3122
|
20,820
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getSegmentImportJobs
|
@Override
public GetSegmentImportJobsResult getSegmentImportJobs(GetSegmentImportJobsRequest request) {
request = beforeClientExecution(request);
return executeGetSegmentImportJobs(request);
}
|
java
|
@Override
public GetSegmentImportJobsResult getSegmentImportJobs(GetSegmentImportJobsRequest request) {
request = beforeClientExecution(request);
return executeGetSegmentImportJobs(request);
}
|
[
"@",
"Override",
"public",
"GetSegmentImportJobsResult",
"getSegmentImportJobs",
"(",
"GetSegmentImportJobsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetSegmentImportJobs",
"(",
"request",
")",
";",
"}"
] |
Returns a list of import jobs for a specific segment.
@param getSegmentImportJobsRequest
@return Result of the GetSegmentImportJobs operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetSegmentImportJobs
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentImportJobs" target="_top">AWS
API Documentation</a>
|
[
"Returns",
"a",
"list",
"of",
"import",
"jobs",
"for",
"a",
"specific",
"segment",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L3180-L3184
|
20,821
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getSegmentVersion
|
@Override
public GetSegmentVersionResult getSegmentVersion(GetSegmentVersionRequest request) {
request = beforeClientExecution(request);
return executeGetSegmentVersion(request);
}
|
java
|
@Override
public GetSegmentVersionResult getSegmentVersion(GetSegmentVersionRequest request) {
request = beforeClientExecution(request);
return executeGetSegmentVersion(request);
}
|
[
"@",
"Override",
"public",
"GetSegmentVersionResult",
"getSegmentVersion",
"(",
"GetSegmentVersionRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetSegmentVersion",
"(",
"request",
")",
";",
"}"
] |
Returns information about a segment version.
@param getSegmentVersionRequest
@return Result of the GetSegmentVersion operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetSegmentVersion
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersion" target="_top">AWS API
Documentation</a>
|
[
"Returns",
"information",
"about",
"a",
"segment",
"version",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L3242-L3246
|
20,822
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getSegmentVersions
|
@Override
public GetSegmentVersionsResult getSegmentVersions(GetSegmentVersionsRequest request) {
request = beforeClientExecution(request);
return executeGetSegmentVersions(request);
}
|
java
|
@Override
public GetSegmentVersionsResult getSegmentVersions(GetSegmentVersionsRequest request) {
request = beforeClientExecution(request);
return executeGetSegmentVersions(request);
}
|
[
"@",
"Override",
"public",
"GetSegmentVersionsResult",
"getSegmentVersions",
"(",
"GetSegmentVersionsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetSegmentVersions",
"(",
"request",
")",
";",
"}"
] |
Returns information about your segment versions.
@param getSegmentVersionsRequest
@return Result of the GetSegmentVersions operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetSegmentVersions
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersions" target="_top">AWS
API Documentation</a>
|
[
"Returns",
"information",
"about",
"your",
"segment",
"versions",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L3304-L3308
|
20,823
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getSegments
|
@Override
public GetSegmentsResult getSegments(GetSegmentsRequest request) {
request = beforeClientExecution(request);
return executeGetSegments(request);
}
|
java
|
@Override
public GetSegmentsResult getSegments(GetSegmentsRequest request) {
request = beforeClientExecution(request);
return executeGetSegments(request);
}
|
[
"@",
"Override",
"public",
"GetSegmentsResult",
"getSegments",
"(",
"GetSegmentsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetSegments",
"(",
"request",
")",
";",
"}"
] |
Used to get information about your segments.
@param getSegmentsRequest
@return Result of the GetSegments operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetSegments
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegments" target="_top">AWS API
Documentation</a>
|
[
"Used",
"to",
"get",
"information",
"about",
"your",
"segments",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L3366-L3370
|
20,824
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getSmsChannel
|
@Override
public GetSmsChannelResult getSmsChannel(GetSmsChannelRequest request) {
request = beforeClientExecution(request);
return executeGetSmsChannel(request);
}
|
java
|
@Override
public GetSmsChannelResult getSmsChannel(GetSmsChannelRequest request) {
request = beforeClientExecution(request);
return executeGetSmsChannel(request);
}
|
[
"@",
"Override",
"public",
"GetSmsChannelResult",
"getSmsChannel",
"(",
"GetSmsChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetSmsChannel",
"(",
"request",
")",
";",
"}"
] |
Get an SMS channel.
@param getSmsChannelRequest
@return Result of the GetSmsChannel operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetSmsChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSmsChannel" target="_top">AWS API
Documentation</a>
|
[
"Get",
"an",
"SMS",
"channel",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L3428-L3432
|
20,825
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getUserEndpoints
|
@Override
public GetUserEndpointsResult getUserEndpoints(GetUserEndpointsRequest request) {
request = beforeClientExecution(request);
return executeGetUserEndpoints(request);
}
|
java
|
@Override
public GetUserEndpointsResult getUserEndpoints(GetUserEndpointsRequest request) {
request = beforeClientExecution(request);
return executeGetUserEndpoints(request);
}
|
[
"@",
"Override",
"public",
"GetUserEndpointsResult",
"getUserEndpoints",
"(",
"GetUserEndpointsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetUserEndpoints",
"(",
"request",
")",
";",
"}"
] |
Returns information about the endpoints that are associated with a User ID.
@param getUserEndpointsRequest
@return Result of the GetUserEndpoints operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetUserEndpoints
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetUserEndpoints" target="_top">AWS API
Documentation</a>
|
[
"Returns",
"information",
"about",
"the",
"endpoints",
"that",
"are",
"associated",
"with",
"a",
"User",
"ID",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L3490-L3494
|
20,826
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.getVoiceChannel
|
@Override
public GetVoiceChannelResult getVoiceChannel(GetVoiceChannelRequest request) {
request = beforeClientExecution(request);
return executeGetVoiceChannel(request);
}
|
java
|
@Override
public GetVoiceChannelResult getVoiceChannel(GetVoiceChannelRequest request) {
request = beforeClientExecution(request);
return executeGetVoiceChannel(request);
}
|
[
"@",
"Override",
"public",
"GetVoiceChannelResult",
"getVoiceChannel",
"(",
"GetVoiceChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetVoiceChannel",
"(",
"request",
")",
";",
"}"
] |
Get a Voice Channel
@param getVoiceChannelRequest
@return Result of the GetVoiceChannel operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.GetVoiceChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetVoiceChannel" target="_top">AWS API
Documentation</a>
|
[
"Get",
"a",
"Voice",
"Channel"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L3552-L3556
|
20,827
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.phoneNumberValidate
|
@Override
public PhoneNumberValidateResult phoneNumberValidate(PhoneNumberValidateRequest request) {
request = beforeClientExecution(request);
return executePhoneNumberValidate(request);
}
|
java
|
@Override
public PhoneNumberValidateResult phoneNumberValidate(PhoneNumberValidateRequest request) {
request = beforeClientExecution(request);
return executePhoneNumberValidate(request);
}
|
[
"@",
"Override",
"public",
"PhoneNumberValidateResult",
"phoneNumberValidate",
"(",
"PhoneNumberValidateRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executePhoneNumberValidate",
"(",
"request",
")",
";",
"}"
] |
Returns information about the specified phone number.
@param phoneNumberValidateRequest
@return Result of the PhoneNumberValidate operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.PhoneNumberValidate
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PhoneNumberValidate" target="_top">AWS
API Documentation</a>
|
[
"Returns",
"information",
"about",
"the",
"specified",
"phone",
"number",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L3662-L3666
|
20,828
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.putEventStream
|
@Override
public PutEventStreamResult putEventStream(PutEventStreamRequest request) {
request = beforeClientExecution(request);
return executePutEventStream(request);
}
|
java
|
@Override
public PutEventStreamResult putEventStream(PutEventStreamRequest request) {
request = beforeClientExecution(request);
return executePutEventStream(request);
}
|
[
"@",
"Override",
"public",
"PutEventStreamResult",
"putEventStream",
"(",
"PutEventStreamRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executePutEventStream",
"(",
"request",
")",
";",
"}"
] |
Use to create or update the event stream for an app.
@param putEventStreamRequest
@return Result of the PutEventStream operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.PutEventStream
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PutEventStream" target="_top">AWS API
Documentation</a>
|
[
"Use",
"to",
"create",
"or",
"update",
"the",
"event",
"stream",
"for",
"an",
"app",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L3724-L3728
|
20,829
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.removeAttributes
|
@Override
public RemoveAttributesResult removeAttributes(RemoveAttributesRequest request) {
request = beforeClientExecution(request);
return executeRemoveAttributes(request);
}
|
java
|
@Override
public RemoveAttributesResult removeAttributes(RemoveAttributesRequest request) {
request = beforeClientExecution(request);
return executeRemoveAttributes(request);
}
|
[
"@",
"Override",
"public",
"RemoveAttributesResult",
"removeAttributes",
"(",
"RemoveAttributesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeRemoveAttributes",
"(",
"request",
")",
";",
"}"
] |
Used to remove the attributes for an app
@param removeAttributesRequest
@return Result of the RemoveAttributes operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.RemoveAttributes
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/RemoveAttributes" target="_top">AWS API
Documentation</a>
|
[
"Used",
"to",
"remove",
"the",
"attributes",
"for",
"an",
"app"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L3849-L3853
|
20,830
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.sendMessages
|
@Override
public SendMessagesResult sendMessages(SendMessagesRequest request) {
request = beforeClientExecution(request);
return executeSendMessages(request);
}
|
java
|
@Override
public SendMessagesResult sendMessages(SendMessagesRequest request) {
request = beforeClientExecution(request);
return executeSendMessages(request);
}
|
[
"@",
"Override",
"public",
"SendMessagesResult",
"sendMessages",
"(",
"SendMessagesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeSendMessages",
"(",
"request",
")",
";",
"}"
] |
Used to send a direct message.
@param sendMessagesRequest
@return Result of the SendMessages operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.SendMessages
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendMessages" target="_top">AWS API
Documentation</a>
|
[
"Used",
"to",
"send",
"a",
"direct",
"message",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L3911-L3915
|
20,831
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.sendUsersMessages
|
@Override
public SendUsersMessagesResult sendUsersMessages(SendUsersMessagesRequest request) {
request = beforeClientExecution(request);
return executeSendUsersMessages(request);
}
|
java
|
@Override
public SendUsersMessagesResult sendUsersMessages(SendUsersMessagesRequest request) {
request = beforeClientExecution(request);
return executeSendUsersMessages(request);
}
|
[
"@",
"Override",
"public",
"SendUsersMessagesResult",
"sendUsersMessages",
"(",
"SendUsersMessagesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeSendUsersMessages",
"(",
"request",
")",
";",
"}"
] |
Used to send a message to a list of users.
@param sendUsersMessagesRequest
@return Result of the SendUsersMessages operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.SendUsersMessages
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendUsersMessages" target="_top">AWS API
Documentation</a>
|
[
"Used",
"to",
"send",
"a",
"message",
"to",
"a",
"list",
"of",
"users",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L3973-L3977
|
20,832
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.updateAdmChannel
|
@Override
public UpdateAdmChannelResult updateAdmChannel(UpdateAdmChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateAdmChannel(request);
}
|
java
|
@Override
public UpdateAdmChannelResult updateAdmChannel(UpdateAdmChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateAdmChannel(request);
}
|
[
"@",
"Override",
"public",
"UpdateAdmChannelResult",
"updateAdmChannel",
"(",
"UpdateAdmChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateAdmChannel",
"(",
"request",
")",
";",
"}"
] |
Update an ADM channel.
@param updateAdmChannelRequest
@return Result of the UpdateAdmChannel operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.UpdateAdmChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateAdmChannel" target="_top">AWS API
Documentation</a>
|
[
"Update",
"an",
"ADM",
"channel",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L4131-L4135
|
20,833
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.updateApnsChannel
|
@Override
public UpdateApnsChannelResult updateApnsChannel(UpdateApnsChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateApnsChannel(request);
}
|
java
|
@Override
public UpdateApnsChannelResult updateApnsChannel(UpdateApnsChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateApnsChannel(request);
}
|
[
"@",
"Override",
"public",
"UpdateApnsChannelResult",
"updateApnsChannel",
"(",
"UpdateApnsChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateApnsChannel",
"(",
"request",
")",
";",
"}"
] |
Use to update the APNs channel for an app.
@param updateApnsChannelRequest
@return Result of the UpdateApnsChannel operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.UpdateApnsChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsChannel" target="_top">AWS API
Documentation</a>
|
[
"Use",
"to",
"update",
"the",
"APNs",
"channel",
"for",
"an",
"app",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L4193-L4197
|
20,834
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.updateApnsSandboxChannel
|
@Override
public UpdateApnsSandboxChannelResult updateApnsSandboxChannel(UpdateApnsSandboxChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateApnsSandboxChannel(request);
}
|
java
|
@Override
public UpdateApnsSandboxChannelResult updateApnsSandboxChannel(UpdateApnsSandboxChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateApnsSandboxChannel(request);
}
|
[
"@",
"Override",
"public",
"UpdateApnsSandboxChannelResult",
"updateApnsSandboxChannel",
"(",
"UpdateApnsSandboxChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateApnsSandboxChannel",
"(",
"request",
")",
";",
"}"
] |
Update an APNS sandbox channel.
@param updateApnsSandboxChannelRequest
@return Result of the UpdateApnsSandboxChannel operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.UpdateApnsSandboxChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsSandboxChannel"
target="_top">AWS API Documentation</a>
|
[
"Update",
"an",
"APNS",
"sandbox",
"channel",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L4255-L4259
|
20,835
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.updateApnsVoipChannel
|
@Override
public UpdateApnsVoipChannelResult updateApnsVoipChannel(UpdateApnsVoipChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateApnsVoipChannel(request);
}
|
java
|
@Override
public UpdateApnsVoipChannelResult updateApnsVoipChannel(UpdateApnsVoipChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateApnsVoipChannel(request);
}
|
[
"@",
"Override",
"public",
"UpdateApnsVoipChannelResult",
"updateApnsVoipChannel",
"(",
"UpdateApnsVoipChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateApnsVoipChannel",
"(",
"request",
")",
";",
"}"
] |
Update an APNS VoIP channel
@param updateApnsVoipChannelRequest
@return Result of the UpdateApnsVoipChannel operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.UpdateApnsVoipChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipChannel" target="_top">AWS
API Documentation</a>
|
[
"Update",
"an",
"APNS",
"VoIP",
"channel"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L4319-L4323
|
20,836
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.updateApnsVoipSandboxChannel
|
@Override
public UpdateApnsVoipSandboxChannelResult updateApnsVoipSandboxChannel(UpdateApnsVoipSandboxChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateApnsVoipSandboxChannel(request);
}
|
java
|
@Override
public UpdateApnsVoipSandboxChannelResult updateApnsVoipSandboxChannel(UpdateApnsVoipSandboxChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateApnsVoipSandboxChannel(request);
}
|
[
"@",
"Override",
"public",
"UpdateApnsVoipSandboxChannelResult",
"updateApnsVoipSandboxChannel",
"(",
"UpdateApnsVoipSandboxChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateApnsVoipSandboxChannel",
"(",
"request",
")",
";",
"}"
] |
Update an APNS VoIP sandbox channel
@param updateApnsVoipSandboxChannelRequest
@return Result of the UpdateApnsVoipSandboxChannel operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.UpdateApnsVoipSandboxChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipSandboxChannel"
target="_top">AWS API Documentation</a>
|
[
"Update",
"an",
"APNS",
"VoIP",
"sandbox",
"channel"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L4382-L4386
|
20,837
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.updateApplicationSettings
|
@Override
public UpdateApplicationSettingsResult updateApplicationSettings(UpdateApplicationSettingsRequest request) {
request = beforeClientExecution(request);
return executeUpdateApplicationSettings(request);
}
|
java
|
@Override
public UpdateApplicationSettingsResult updateApplicationSettings(UpdateApplicationSettingsRequest request) {
request = beforeClientExecution(request);
return executeUpdateApplicationSettings(request);
}
|
[
"@",
"Override",
"public",
"UpdateApplicationSettingsResult",
"updateApplicationSettings",
"(",
"UpdateApplicationSettingsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateApplicationSettings",
"(",
"request",
")",
";",
"}"
] |
Used to update the settings for an app.
@param updateApplicationSettingsRequest
@return Result of the UpdateApplicationSettings operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.UpdateApplicationSettings
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApplicationSettings"
target="_top">AWS API Documentation</a>
|
[
"Used",
"to",
"update",
"the",
"settings",
"for",
"an",
"app",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L4446-L4450
|
20,838
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.updateBaiduChannel
|
@Override
public UpdateBaiduChannelResult updateBaiduChannel(UpdateBaiduChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateBaiduChannel(request);
}
|
java
|
@Override
public UpdateBaiduChannelResult updateBaiduChannel(UpdateBaiduChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateBaiduChannel(request);
}
|
[
"@",
"Override",
"public",
"UpdateBaiduChannelResult",
"updateBaiduChannel",
"(",
"UpdateBaiduChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateBaiduChannel",
"(",
"request",
")",
";",
"}"
] |
Update a BAIDU GCM channel
@param updateBaiduChannelRequest
@return Result of the UpdateBaiduChannel operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.UpdateBaiduChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateBaiduChannel" target="_top">AWS
API Documentation</a>
|
[
"Update",
"a",
"BAIDU",
"GCM",
"channel"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L4510-L4514
|
20,839
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.updateCampaign
|
@Override
public UpdateCampaignResult updateCampaign(UpdateCampaignRequest request) {
request = beforeClientExecution(request);
return executeUpdateCampaign(request);
}
|
java
|
@Override
public UpdateCampaignResult updateCampaign(UpdateCampaignRequest request) {
request = beforeClientExecution(request);
return executeUpdateCampaign(request);
}
|
[
"@",
"Override",
"public",
"UpdateCampaignResult",
"updateCampaign",
"(",
"UpdateCampaignRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateCampaign",
"(",
"request",
")",
";",
"}"
] |
Use to update a campaign.
@param updateCampaignRequest
@return Result of the UpdateCampaign operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.UpdateCampaign
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateCampaign" target="_top">AWS API
Documentation</a>
|
[
"Use",
"to",
"update",
"a",
"campaign",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L4572-L4576
|
20,840
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.updateEmailChannel
|
@Override
public UpdateEmailChannelResult updateEmailChannel(UpdateEmailChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateEmailChannel(request);
}
|
java
|
@Override
public UpdateEmailChannelResult updateEmailChannel(UpdateEmailChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateEmailChannel(request);
}
|
[
"@",
"Override",
"public",
"UpdateEmailChannelResult",
"updateEmailChannel",
"(",
"UpdateEmailChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateEmailChannel",
"(",
"request",
")",
";",
"}"
] |
Update an email channel.
@param updateEmailChannelRequest
@return Result of the UpdateEmailChannel operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.UpdateEmailChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEmailChannel" target="_top">AWS
API Documentation</a>
|
[
"Update",
"an",
"email",
"channel",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L4634-L4638
|
20,841
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.updateEndpointsBatch
|
@Override
public UpdateEndpointsBatchResult updateEndpointsBatch(UpdateEndpointsBatchRequest request) {
request = beforeClientExecution(request);
return executeUpdateEndpointsBatch(request);
}
|
java
|
@Override
public UpdateEndpointsBatchResult updateEndpointsBatch(UpdateEndpointsBatchRequest request) {
request = beforeClientExecution(request);
return executeUpdateEndpointsBatch(request);
}
|
[
"@",
"Override",
"public",
"UpdateEndpointsBatchResult",
"updateEndpointsBatch",
"(",
"UpdateEndpointsBatchRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateEndpointsBatch",
"(",
"request",
")",
";",
"}"
] |
Use to update a batch of endpoints.
@param updateEndpointsBatchRequest
@return Result of the UpdateEndpointsBatch operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.UpdateEndpointsBatch
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEndpointsBatch" target="_top">AWS
API Documentation</a>
|
[
"Use",
"to",
"update",
"a",
"batch",
"of",
"endpoints",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L4758-L4762
|
20,842
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.updateGcmChannel
|
@Override
public UpdateGcmChannelResult updateGcmChannel(UpdateGcmChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateGcmChannel(request);
}
|
java
|
@Override
public UpdateGcmChannelResult updateGcmChannel(UpdateGcmChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateGcmChannel(request);
}
|
[
"@",
"Override",
"public",
"UpdateGcmChannelResult",
"updateGcmChannel",
"(",
"UpdateGcmChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateGcmChannel",
"(",
"request",
")",
";",
"}"
] |
Use to update the GCM channel for an app.
@param updateGcmChannelRequest
@return Result of the UpdateGcmChannel operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.UpdateGcmChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateGcmChannel" target="_top">AWS API
Documentation</a>
|
[
"Use",
"to",
"update",
"the",
"GCM",
"channel",
"for",
"an",
"app",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L4820-L4824
|
20,843
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.updateSegment
|
@Override
public UpdateSegmentResult updateSegment(UpdateSegmentRequest request) {
request = beforeClientExecution(request);
return executeUpdateSegment(request);
}
|
java
|
@Override
public UpdateSegmentResult updateSegment(UpdateSegmentRequest request) {
request = beforeClientExecution(request);
return executeUpdateSegment(request);
}
|
[
"@",
"Override",
"public",
"UpdateSegmentResult",
"updateSegment",
"(",
"UpdateSegmentRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateSegment",
"(",
"request",
")",
";",
"}"
] |
Used to update a segment.
@param updateSegmentRequest
@return Result of the UpdateSegment operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.UpdateSegment
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSegment" target="_top">AWS API
Documentation</a>
|
[
"Used",
"to",
"update",
"a",
"segment",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L4882-L4886
|
20,844
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.updateSmsChannel
|
@Override
public UpdateSmsChannelResult updateSmsChannel(UpdateSmsChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateSmsChannel(request);
}
|
java
|
@Override
public UpdateSmsChannelResult updateSmsChannel(UpdateSmsChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateSmsChannel(request);
}
|
[
"@",
"Override",
"public",
"UpdateSmsChannelResult",
"updateSmsChannel",
"(",
"UpdateSmsChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateSmsChannel",
"(",
"request",
")",
";",
"}"
] |
Update an SMS channel.
@param updateSmsChannelRequest
@return Result of the UpdateSmsChannel operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.UpdateSmsChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSmsChannel" target="_top">AWS API
Documentation</a>
|
[
"Update",
"an",
"SMS",
"channel",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L4944-L4948
|
20,845
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java
|
AmazonPinpointClient.updateVoiceChannel
|
@Override
public UpdateVoiceChannelResult updateVoiceChannel(UpdateVoiceChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateVoiceChannel(request);
}
|
java
|
@Override
public UpdateVoiceChannelResult updateVoiceChannel(UpdateVoiceChannelRequest request) {
request = beforeClientExecution(request);
return executeUpdateVoiceChannel(request);
}
|
[
"@",
"Override",
"public",
"UpdateVoiceChannelResult",
"updateVoiceChannel",
"(",
"UpdateVoiceChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateVoiceChannel",
"(",
"request",
")",
";",
"}"
] |
Update an Voice channel
@param updateVoiceChannelRequest
@return Result of the UpdateVoiceChannel operation returned by the service.
@throws BadRequestException
400 response
@throws InternalServerErrorException
500 response
@throws ForbiddenException
403 response
@throws NotFoundException
404 response
@throws MethodNotAllowedException
405 response
@throws TooManyRequestsException
429 response
@sample AmazonPinpoint.UpdateVoiceChannel
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateVoiceChannel" target="_top">AWS
API Documentation</a>
|
[
"Update",
"an",
"Voice",
"channel"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/AmazonPinpointClient.java#L5006-L5010
|
20,846
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/utils/ValueList.java
|
ValueList.appendStringSet
|
public ValueList appendStringSet(String ...val) {
super.append(new LinkedHashSet<String>(Arrays.asList(val)));
return this;
}
|
java
|
public ValueList appendStringSet(String ...val) {
super.append(new LinkedHashSet<String>(Arrays.asList(val)));
return this;
}
|
[
"public",
"ValueList",
"appendStringSet",
"(",
"String",
"...",
"val",
")",
"{",
"super",
".",
"append",
"(",
"new",
"LinkedHashSet",
"<",
"String",
">",
"(",
"Arrays",
".",
"asList",
"(",
"val",
")",
")",
")",
";",
"return",
"this",
";",
"}"
] |
Appends the given values to this list as a string set.
|
[
"Appends",
"the",
"given",
"values",
"to",
"this",
"list",
"as",
"a",
"string",
"set",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/utils/ValueList.java#L112-L115
|
20,847
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/utils/ValueList.java
|
ValueList.appendNumberSet
|
public ValueList appendNumberSet(BigDecimal ... val) {
super.append(new LinkedHashSet<BigDecimal>(Arrays.asList(val)));
return this;
}
|
java
|
public ValueList appendNumberSet(BigDecimal ... val) {
super.append(new LinkedHashSet<BigDecimal>(Arrays.asList(val)));
return this;
}
|
[
"public",
"ValueList",
"appendNumberSet",
"(",
"BigDecimal",
"...",
"val",
")",
"{",
"super",
".",
"append",
"(",
"new",
"LinkedHashSet",
"<",
"BigDecimal",
">",
"(",
"Arrays",
".",
"asList",
"(",
"val",
")",
")",
")",
";",
"return",
"this",
";",
"}"
] |
Appends the given value to this list as a set of BigDecimals.
|
[
"Appends",
"the",
"given",
"value",
"to",
"this",
"list",
"as",
"a",
"set",
"of",
"BigDecimals",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/utils/ValueList.java#L128-L131
|
20,848
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/utils/ValueList.java
|
ValueList.appendList
|
public ValueList appendList(Object ... vals) {
super.append(new ArrayList<Object>(Arrays.asList(vals)));
return this;
}
|
java
|
public ValueList appendList(Object ... vals) {
super.append(new ArrayList<Object>(Arrays.asList(vals)));
return this;
}
|
[
"public",
"ValueList",
"appendList",
"(",
"Object",
"...",
"vals",
")",
"{",
"super",
".",
"append",
"(",
"new",
"ArrayList",
"<",
"Object",
">",
"(",
"Arrays",
".",
"asList",
"(",
"vals",
")",
")",
")",
";",
"return",
"this",
";",
"}"
] |
Appends the given values to this list as a list.
|
[
"Appends",
"the",
"given",
"values",
"to",
"this",
"list",
"as",
"a",
"list",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/utils/ValueList.java#L168-L171
|
20,849
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/partitions/model/Endpoint.java
|
Endpoint.merge
|
public static Endpoint merge(Endpoint defaults, Endpoint override) {
if (defaults == null) {
defaults = new Endpoint();
}
if (override == null) {
override = new Endpoint();
}
final Endpoint merged = new Endpoint();
merged.setCredentialScope(override.getCredentialScope() != null
? override.getCredentialScope()
: defaults.getCredentialScope());
merged.setHostName(override.getHostName() != null
? override.getHostName()
: defaults.getHostName());
merged.setSslCommonName(override.getSslCommonName() != null
? override.getSslCommonName()
: defaults.getSslCommonName());
merged.setProtocols(override.getProtocols() != null
? override.getProtocols()
: defaults.getProtocols());
merged.setSignatureVersions(override.getSignatureVersions() != null
? override.getSignatureVersions()
: defaults.getSignatureVersions()
);
return merged;
}
|
java
|
public static Endpoint merge(Endpoint defaults, Endpoint override) {
if (defaults == null) {
defaults = new Endpoint();
}
if (override == null) {
override = new Endpoint();
}
final Endpoint merged = new Endpoint();
merged.setCredentialScope(override.getCredentialScope() != null
? override.getCredentialScope()
: defaults.getCredentialScope());
merged.setHostName(override.getHostName() != null
? override.getHostName()
: defaults.getHostName());
merged.setSslCommonName(override.getSslCommonName() != null
? override.getSslCommonName()
: defaults.getSslCommonName());
merged.setProtocols(override.getProtocols() != null
? override.getProtocols()
: defaults.getProtocols());
merged.setSignatureVersions(override.getSignatureVersions() != null
? override.getSignatureVersions()
: defaults.getSignatureVersions()
);
return merged;
}
|
[
"public",
"static",
"Endpoint",
"merge",
"(",
"Endpoint",
"defaults",
",",
"Endpoint",
"override",
")",
"{",
"if",
"(",
"defaults",
"==",
"null",
")",
"{",
"defaults",
"=",
"new",
"Endpoint",
"(",
")",
";",
"}",
"if",
"(",
"override",
"==",
"null",
")",
"{",
"override",
"=",
"new",
"Endpoint",
"(",
")",
";",
"}",
"final",
"Endpoint",
"merged",
"=",
"new",
"Endpoint",
"(",
")",
";",
"merged",
".",
"setCredentialScope",
"(",
"override",
".",
"getCredentialScope",
"(",
")",
"!=",
"null",
"?",
"override",
".",
"getCredentialScope",
"(",
")",
":",
"defaults",
".",
"getCredentialScope",
"(",
")",
")",
";",
"merged",
".",
"setHostName",
"(",
"override",
".",
"getHostName",
"(",
")",
"!=",
"null",
"?",
"override",
".",
"getHostName",
"(",
")",
":",
"defaults",
".",
"getHostName",
"(",
")",
")",
";",
"merged",
".",
"setSslCommonName",
"(",
"override",
".",
"getSslCommonName",
"(",
")",
"!=",
"null",
"?",
"override",
".",
"getSslCommonName",
"(",
")",
":",
"defaults",
".",
"getSslCommonName",
"(",
")",
")",
";",
"merged",
".",
"setProtocols",
"(",
"override",
".",
"getProtocols",
"(",
")",
"!=",
"null",
"?",
"override",
".",
"getProtocols",
"(",
")",
":",
"defaults",
".",
"getProtocols",
"(",
")",
")",
";",
"merged",
".",
"setSignatureVersions",
"(",
"override",
".",
"getSignatureVersions",
"(",
")",
"!=",
"null",
"?",
"override",
".",
"getSignatureVersions",
"(",
")",
":",
"defaults",
".",
"getSignatureVersions",
"(",
")",
")",
";",
"return",
"merged",
";",
"}"
] |
Merges the given endpoints and returns the merged one.
|
[
"Merges",
"the",
"given",
"endpoints",
"and",
"returns",
"the",
"merged",
"one",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/partitions/model/Endpoint.java#L55-L90
|
20,850
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/http/conn/ssl/SdkTLSSocketFactory.java
|
SdkTLSSocketFactory.existsIn
|
private boolean existsIn(String element, String[] a) {
for (String s : a) {
if (element.equals(s)) {
return true;
}
}
return false;
}
|
java
|
private boolean existsIn(String element, String[] a) {
for (String s : a) {
if (element.equals(s)) {
return true;
}
}
return false;
}
|
[
"private",
"boolean",
"existsIn",
"(",
"String",
"element",
",",
"String",
"[",
"]",
"a",
")",
"{",
"for",
"(",
"String",
"s",
":",
"a",
")",
"{",
"if",
"(",
"element",
".",
"equals",
"(",
"s",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}"
] |
Returns true if the given element exists in the given array; false otherwise.
|
[
"Returns",
"true",
"if",
"the",
"given",
"element",
"exists",
"in",
"the",
"given",
"array",
";",
"false",
"otherwise",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/http/conn/ssl/SdkTLSSocketFactory.java#L120-L127
|
20,851
|
aws/aws-sdk-java
|
aws-java-sdk-opensdk/src/main/java/com/amazonaws/opensdk/protect/auth/RequestSignerRegistry.java
|
RequestSignerRegistry.register
|
public RequestSignerRegistry register(RequestSigner requestSigner, Class<? extends RequestSigner> signerType) {
Map<Class<? extends RequestSigner>, RequestSigner> registeredSigners = new HashMap<>();
registeredSigners.putAll(signerForType);
registeredSigners.put(signerType, requestSigner);
return new RequestSignerRegistry(registeredSigners);
}
|
java
|
public RequestSignerRegistry register(RequestSigner requestSigner, Class<? extends RequestSigner> signerType) {
Map<Class<? extends RequestSigner>, RequestSigner> registeredSigners = new HashMap<>();
registeredSigners.putAll(signerForType);
registeredSigners.put(signerType, requestSigner);
return new RequestSignerRegistry(registeredSigners);
}
|
[
"public",
"RequestSignerRegistry",
"register",
"(",
"RequestSigner",
"requestSigner",
",",
"Class",
"<",
"?",
"extends",
"RequestSigner",
">",
"signerType",
")",
"{",
"Map",
"<",
"Class",
"<",
"?",
"extends",
"RequestSigner",
">",
",",
"RequestSigner",
">",
"registeredSigners",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"registeredSigners",
".",
"putAll",
"(",
"signerForType",
")",
";",
"registeredSigners",
".",
"put",
"(",
"signerType",
",",
"requestSigner",
")",
";",
"return",
"new",
"RequestSignerRegistry",
"(",
"registeredSigners",
")",
";",
"}"
] |
Register an requestSigner
@param requestSigner
an instance of an RequestSigner to use for a given type
@param signerType
the type of requestSigner that this instance will be used for
|
[
"Register",
"an",
"requestSigner"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-opensdk/src/main/java/com/amazonaws/opensdk/protect/auth/RequestSignerRegistry.java#L48-L53
|
20,852
|
aws/aws-sdk-java
|
aws-java-sdk-signer/src/main/java/com/amazonaws/services/signer/waiters/AWSsignerWaiters.java
|
AWSsignerWaiters.successfulSigningJob
|
public Waiter<DescribeSigningJobRequest> successfulSigningJob() {
return new WaiterBuilder<DescribeSigningJobRequest, DescribeSigningJobResult>()
.withSdkFunction(new DescribeSigningJobFunction(client))
.withAcceptors(new SuccessfulSigningJob.IsSucceededMatcher(), new SuccessfulSigningJob.IsFailedMatcher(),
new SuccessfulSigningJob.IsResourceNotFoundExceptionMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(25), new FixedDelayStrategy(20)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<DescribeSigningJobRequest> successfulSigningJob() {
return new WaiterBuilder<DescribeSigningJobRequest, DescribeSigningJobResult>()
.withSdkFunction(new DescribeSigningJobFunction(client))
.withAcceptors(new SuccessfulSigningJob.IsSucceededMatcher(), new SuccessfulSigningJob.IsFailedMatcher(),
new SuccessfulSigningJob.IsResourceNotFoundExceptionMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(25), new FixedDelayStrategy(20)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"DescribeSigningJobRequest",
">",
"successfulSigningJob",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"DescribeSigningJobRequest",
",",
"DescribeSigningJobResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"DescribeSigningJobFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"SuccessfulSigningJob",
".",
"IsSucceededMatcher",
"(",
")",
",",
"new",
"SuccessfulSigningJob",
".",
"IsFailedMatcher",
"(",
")",
",",
"new",
"SuccessfulSigningJob",
".",
"IsResourceNotFoundExceptionMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"25",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"20",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a SuccessfulSigningJob 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",
"SuccessfulSigningJob",
"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-signer/src/main/java/com/amazonaws/services/signer/waiters/AWSsignerWaiters.java#L51-L59
|
20,853
|
aws/aws-sdk-java
|
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/AddWaiters.java
|
AddWaiters.executeToAstProcess
|
private Process executeToAstProcess(String argument) throws IOException {
try {
Process p = new ProcessBuilder("python", codeGenBinDirectory + "/jp-to-ast.py", argument).start();
p.waitFor();
return p;
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException(e);
}
}
|
java
|
private Process executeToAstProcess(String argument) throws IOException {
try {
Process p = new ProcessBuilder("python", codeGenBinDirectory + "/jp-to-ast.py", argument).start();
p.waitFor();
return p;
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException(e);
}
}
|
[
"private",
"Process",
"executeToAstProcess",
"(",
"String",
"argument",
")",
"throws",
"IOException",
"{",
"try",
"{",
"Process",
"p",
"=",
"new",
"ProcessBuilder",
"(",
"\"python\"",
",",
"codeGenBinDirectory",
"+",
"\"/jp-to-ast.py\"",
",",
"argument",
")",
".",
"start",
"(",
")",
";",
"p",
".",
"waitFor",
"(",
")",
";",
"return",
"p",
";",
"}",
"catch",
"(",
"InterruptedException",
"e",
")",
"{",
"Thread",
".",
"currentThread",
"(",
")",
".",
"interrupt",
"(",
")",
";",
"throw",
"new",
"RuntimeException",
"(",
"e",
")",
";",
"}",
"}"
] |
Execute the jp-to-ast.py command and wait for it to complete.
@param argument JP expression to compile to AST.
@return Process with access to output streams.
|
[
"Execute",
"the",
"jp",
"-",
"to",
"-",
"ast",
".",
"py",
"command",
"and",
"wait",
"for",
"it",
"to",
"complete",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/AddWaiters.java#L116-L125
|
20,854
|
aws/aws-sdk-java
|
aws-java-sdk-guardduty/src/main/java/com/amazonaws/services/guardduty/model/InstanceDetails.java
|
InstanceDetails.setProductCodes
|
public void setProductCodes(java.util.Collection<ProductCode> productCodes) {
if (productCodes == null) {
this.productCodes = null;
return;
}
this.productCodes = new java.util.ArrayList<ProductCode>(productCodes);
}
|
java
|
public void setProductCodes(java.util.Collection<ProductCode> productCodes) {
if (productCodes == null) {
this.productCodes = null;
return;
}
this.productCodes = new java.util.ArrayList<ProductCode>(productCodes);
}
|
[
"public",
"void",
"setProductCodes",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"ProductCode",
">",
"productCodes",
")",
"{",
"if",
"(",
"productCodes",
"==",
"null",
")",
"{",
"this",
".",
"productCodes",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"productCodes",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"ProductCode",
">",
"(",
"productCodes",
")",
";",
"}"
] |
The product code of the EC2 instance.
@param productCodes
The product code of the EC2 instance.
|
[
"The",
"product",
"code",
"of",
"the",
"EC2",
"instance",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-guardduty/src/main/java/com/amazonaws/services/guardduty/model/InstanceDetails.java#L431-L438
|
20,855
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/profile/ProfilesConfigFile.java
|
ProfilesConfigFile.getCredentials
|
public AWSCredentials getCredentials(String profileName) {
final AWSCredentialsProvider provider = credentialProviderCache.get(profileName);
if (provider != null) {
return provider.getCredentials();
} else {
BasicProfile profile = allProfiles.getProfile(profileName);
if (profile == null) {
throw new IllegalArgumentException("No AWS profile named '" + profileName + "'");
}
final AWSCredentialsProvider newProvider = fromProfile(profile);
credentialProviderCache.put(profileName, newProvider);
return newProvider.getCredentials();
}
}
|
java
|
public AWSCredentials getCredentials(String profileName) {
final AWSCredentialsProvider provider = credentialProviderCache.get(profileName);
if (provider != null) {
return provider.getCredentials();
} else {
BasicProfile profile = allProfiles.getProfile(profileName);
if (profile == null) {
throw new IllegalArgumentException("No AWS profile named '" + profileName + "'");
}
final AWSCredentialsProvider newProvider = fromProfile(profile);
credentialProviderCache.put(profileName, newProvider);
return newProvider.getCredentials();
}
}
|
[
"public",
"AWSCredentials",
"getCredentials",
"(",
"String",
"profileName",
")",
"{",
"final",
"AWSCredentialsProvider",
"provider",
"=",
"credentialProviderCache",
".",
"get",
"(",
"profileName",
")",
";",
"if",
"(",
"provider",
"!=",
"null",
")",
"{",
"return",
"provider",
".",
"getCredentials",
"(",
")",
";",
"}",
"else",
"{",
"BasicProfile",
"profile",
"=",
"allProfiles",
".",
"getProfile",
"(",
"profileName",
")",
";",
"if",
"(",
"profile",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"No AWS profile named '\"",
"+",
"profileName",
"+",
"\"'\"",
")",
";",
"}",
"final",
"AWSCredentialsProvider",
"newProvider",
"=",
"fromProfile",
"(",
"profile",
")",
";",
"credentialProviderCache",
".",
"put",
"(",
"profileName",
",",
"newProvider",
")",
";",
"return",
"newProvider",
".",
"getCredentials",
"(",
")",
";",
"}",
"}"
] |
Returns the AWS credentials for the specified profile.
|
[
"Returns",
"the",
"AWS",
"credentials",
"for",
"the",
"specified",
"profile",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/profile/ProfilesConfigFile.java#L151-L164
|
20,856
|
aws/aws-sdk-java
|
aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/ListReservationsResult.java
|
ListReservationsResult.setReservations
|
public void setReservations(java.util.Collection<Reservation> reservations) {
if (reservations == null) {
this.reservations = null;
return;
}
this.reservations = new java.util.ArrayList<Reservation>(reservations);
}
|
java
|
public void setReservations(java.util.Collection<Reservation> reservations) {
if (reservations == null) {
this.reservations = null;
return;
}
this.reservations = new java.util.ArrayList<Reservation>(reservations);
}
|
[
"public",
"void",
"setReservations",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"Reservation",
">",
"reservations",
")",
"{",
"if",
"(",
"reservations",
"==",
"null",
")",
"{",
"this",
".",
"reservations",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"reservations",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"Reservation",
">",
"(",
"reservations",
")",
";",
"}"
] |
List of reservations
@param reservations
List of reservations
|
[
"List",
"of",
"reservations"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/ListReservationsResult.java#L83-L90
|
20,857
|
aws/aws-sdk-java
|
aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/model/CreateTagsRequest.java
|
CreateTagsRequest.withTags
|
public CreateTagsRequest withTags(java.util.Map<String, String> tags) {
setTags(tags);
return this;
}
|
java
|
public CreateTagsRequest withTags(java.util.Map<String, String> tags) {
setTags(tags);
return this;
}
|
[
"public",
"CreateTagsRequest",
"withTags",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"tags",
")",
"{",
"setTags",
"(",
"tags",
")",
";",
"return",
"this",
";",
"}"
] |
The key-value pair for the resource tag.
@param tags
The key-value pair for the resource tag.
@return Returns a reference to this object so that method calls can be chained together.
|
[
"The",
"key",
"-",
"value",
"pair",
"for",
"the",
"resource",
"tag",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/model/CreateTagsRequest.java#L97-L100
|
20,858
|
aws/aws-sdk-java
|
aws-java-sdk-kinesisvideo/src/main/java/com/amazonaws/services/kinesisvideo/model/transform/AckEventUnmarshaller.java
|
AckEventUnmarshaller.getTextField
|
private String getTextField(JsonNode json, String fieldName) {
if (!json.has(fieldName)) {
return null;
}
return json.get(fieldName).asText();
}
|
java
|
private String getTextField(JsonNode json, String fieldName) {
if (!json.has(fieldName)) {
return null;
}
return json.get(fieldName).asText();
}
|
[
"private",
"String",
"getTextField",
"(",
"JsonNode",
"json",
",",
"String",
"fieldName",
")",
"{",
"if",
"(",
"!",
"json",
".",
"has",
"(",
"fieldName",
")",
")",
"{",
"return",
"null",
";",
"}",
"return",
"json",
".",
"get",
"(",
"fieldName",
")",
".",
"asText",
"(",
")",
";",
"}"
] |
Get a String field from the JSON.
@param json JSON document.
@param fieldName Field name to get.
@return String value of field or null if not present.
|
[
"Get",
"a",
"String",
"field",
"from",
"the",
"JSON",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesisvideo/src/main/java/com/amazonaws/services/kinesisvideo/model/transform/AckEventUnmarshaller.java#L57-L62
|
20,859
|
aws/aws-sdk-java
|
aws-java-sdk-kinesisvideo/src/main/java/com/amazonaws/services/kinesisvideo/model/transform/AckEventUnmarshaller.java
|
AckEventUnmarshaller.getLongField
|
private Long getLongField(JsonNode json, String fieldName) {
if (!json.has(fieldName)) {
return null;
}
return json.get(fieldName).longValue();
}
|
java
|
private Long getLongField(JsonNode json, String fieldName) {
if (!json.has(fieldName)) {
return null;
}
return json.get(fieldName).longValue();
}
|
[
"private",
"Long",
"getLongField",
"(",
"JsonNode",
"json",
",",
"String",
"fieldName",
")",
"{",
"if",
"(",
"!",
"json",
".",
"has",
"(",
"fieldName",
")",
")",
"{",
"return",
"null",
";",
"}",
"return",
"json",
".",
"get",
"(",
"fieldName",
")",
".",
"longValue",
"(",
")",
";",
"}"
] |
Get a Long field from the JSON.
@param json JSON document.
@param fieldName Field name to get.
@return Long value of field or null if not present.
|
[
"Get",
"a",
"Long",
"field",
"from",
"the",
"JSON",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesisvideo/src/main/java/com/amazonaws/services/kinesisvideo/model/transform/AckEventUnmarshaller.java#L71-L76
|
20,860
|
aws/aws-sdk-java
|
aws-java-sdk-kinesisvideo/src/main/java/com/amazonaws/services/kinesisvideo/model/transform/AckEventUnmarshaller.java
|
AckEventUnmarshaller.getIntegerField
|
private Integer getIntegerField(JsonNode json, String fieldName) {
if (!json.has(fieldName)) {
return null;
}
return json.get(fieldName).intValue();
}
|
java
|
private Integer getIntegerField(JsonNode json, String fieldName) {
if (!json.has(fieldName)) {
return null;
}
return json.get(fieldName).intValue();
}
|
[
"private",
"Integer",
"getIntegerField",
"(",
"JsonNode",
"json",
",",
"String",
"fieldName",
")",
"{",
"if",
"(",
"!",
"json",
".",
"has",
"(",
"fieldName",
")",
")",
"{",
"return",
"null",
";",
"}",
"return",
"json",
".",
"get",
"(",
"fieldName",
")",
".",
"intValue",
"(",
")",
";",
"}"
] |
Get an Integer field from the JSON.
@param json JSON document.
@param fieldName Field name to get.
@return Integer value of field or null if not present.
|
[
"Get",
"an",
"Integer",
"field",
"from",
"the",
"JSON",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesisvideo/src/main/java/com/amazonaws/services/kinesisvideo/model/transform/AckEventUnmarshaller.java#L85-L90
|
20,861
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/CopyObjectRequest.java
|
CopyObjectRequest.setDestinationSSECustomerKey
|
public void setDestinationSSECustomerKey(SSECustomerKey sseKey) {
if (sseKey != null && this.sseAwsKeyManagementParams != null) {
throw new IllegalArgumentException(
"Either SSECustomerKey or SSEAwsKeyManagementParams must not be set at the same time.");
}
this.destinationSSECustomerKey = sseKey;
}
|
java
|
public void setDestinationSSECustomerKey(SSECustomerKey sseKey) {
if (sseKey != null && this.sseAwsKeyManagementParams != null) {
throw new IllegalArgumentException(
"Either SSECustomerKey or SSEAwsKeyManagementParams must not be set at the same time.");
}
this.destinationSSECustomerKey = sseKey;
}
|
[
"public",
"void",
"setDestinationSSECustomerKey",
"(",
"SSECustomerKey",
"sseKey",
")",
"{",
"if",
"(",
"sseKey",
"!=",
"null",
"&&",
"this",
".",
"sseAwsKeyManagementParams",
"!=",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Either SSECustomerKey or SSEAwsKeyManagementParams must not be set at the same time.\"",
")",
";",
"}",
"this",
".",
"destinationSSECustomerKey",
"=",
"sseKey",
";",
"}"
] |
Sets the optional customer-provided server-side encryption key to use to
encrypt the destination object being copied.
@param sseKey
The optional customer-provided server-side encryption key to
use to encrypt the destination object being copied.
|
[
"Sets",
"the",
"optional",
"customer",
"-",
"provided",
"server",
"-",
"side",
"encryption",
"key",
"to",
"use",
"to",
"encrypt",
"the",
"destination",
"object",
"being",
"copied",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/CopyObjectRequest.java#L1066-L1072
|
20,862
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/CopyObjectRequest.java
|
CopyObjectRequest.withMetadataDirective
|
public CopyObjectRequest withMetadataDirective(MetadataDirective metadataDirective) {
return withMetadataDirective(metadataDirective == null ? null : metadataDirective.toString());
}
|
java
|
public CopyObjectRequest withMetadataDirective(MetadataDirective metadataDirective) {
return withMetadataDirective(metadataDirective == null ? null : metadataDirective.toString());
}
|
[
"public",
"CopyObjectRequest",
"withMetadataDirective",
"(",
"MetadataDirective",
"metadataDirective",
")",
"{",
"return",
"withMetadataDirective",
"(",
"metadataDirective",
"==",
"null",
"?",
"null",
":",
"metadataDirective",
".",
"toString",
"(",
")",
")",
";",
"}"
] |
Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request.
@param metadataDirective New value for the metadata directive.
@return Returns a reference to this object so that method calls can be chained together.
|
[
"Specifies",
"whether",
"the",
"metadata",
"is",
"copied",
"from",
"the",
"source",
"object",
"or",
"replaced",
"with",
"metadata",
"provided",
"in",
"the",
"request",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/CopyObjectRequest.java#L1249-L1251
|
20,863
|
aws/aws-sdk-java
|
aws-java-sdk-cloudwatchmetrics/src/main/java/com/amazonaws/metrics/internal/cloudwatch/ServiceMetricCollectorSupport.java
|
ServiceMetricCollectorSupport.bytesPerSecond
|
double bytesPerSecond(double byteCount, double durationNano) {
if (byteCount < 0 || durationNano < 0)
throw new IllegalArgumentException();
if (durationNano == 0) {
durationNano = 1.0; // defend against division by zero
if (log.isDebugEnabled()) {
log.debug("Set zero to one to avoid division by zero; but should never get here!");
}
}
double bytesPerSec = (byteCount / durationNano) * NANO_PER_SEC;
if (bytesPerSec == 0) {
if (log.isDebugEnabled()) {
log.debug("zero bytes per sec. Really ?");
}
}
return bytesPerSec;
}
|
java
|
double bytesPerSecond(double byteCount, double durationNano) {
if (byteCount < 0 || durationNano < 0)
throw new IllegalArgumentException();
if (durationNano == 0) {
durationNano = 1.0; // defend against division by zero
if (log.isDebugEnabled()) {
log.debug("Set zero to one to avoid division by zero; but should never get here!");
}
}
double bytesPerSec = (byteCount / durationNano) * NANO_PER_SEC;
if (bytesPerSec == 0) {
if (log.isDebugEnabled()) {
log.debug("zero bytes per sec. Really ?");
}
}
return bytesPerSec;
}
|
[
"double",
"bytesPerSecond",
"(",
"double",
"byteCount",
",",
"double",
"durationNano",
")",
"{",
"if",
"(",
"byteCount",
"<",
"0",
"||",
"durationNano",
"<",
"0",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"if",
"(",
"durationNano",
"==",
"0",
")",
"{",
"durationNano",
"=",
"1.0",
";",
"// defend against division by zero",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"log",
".",
"debug",
"(",
"\"Set zero to one to avoid division by zero; but should never get here!\"",
")",
";",
"}",
"}",
"double",
"bytesPerSec",
"=",
"(",
"byteCount",
"/",
"durationNano",
")",
"*",
"NANO_PER_SEC",
";",
"if",
"(",
"bytesPerSec",
"==",
"0",
")",
"{",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"log",
".",
"debug",
"(",
"\"zero bytes per sec. Really ?\"",
")",
";",
"}",
"}",
"return",
"bytesPerSec",
";",
"}"
] |
Returns the number of bytes per second, given the byte count and
duration in nano seconds. Duration of zero nanosecond will be treated
as 1 nanosecond.
|
[
"Returns",
"the",
"number",
"of",
"bytes",
"per",
"second",
"given",
"the",
"byte",
"count",
"and",
"duration",
"in",
"nano",
"seconds",
".",
"Duration",
"of",
"zero",
"nanosecond",
"will",
"be",
"treated",
"as",
"1",
"nanosecond",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudwatchmetrics/src/main/java/com/amazonaws/metrics/internal/cloudwatch/ServiceMetricCollectorSupport.java#L71-L87
|
20,864
|
aws/aws-sdk-java
|
aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/UpdateConnectivityInfoRequest.java
|
UpdateConnectivityInfoRequest.setConnectivityInfo
|
public void setConnectivityInfo(java.util.Collection<ConnectivityInfo> connectivityInfo) {
if (connectivityInfo == null) {
this.connectivityInfo = null;
return;
}
this.connectivityInfo = new java.util.ArrayList<ConnectivityInfo>(connectivityInfo);
}
|
java
|
public void setConnectivityInfo(java.util.Collection<ConnectivityInfo> connectivityInfo) {
if (connectivityInfo == null) {
this.connectivityInfo = null;
return;
}
this.connectivityInfo = new java.util.ArrayList<ConnectivityInfo>(connectivityInfo);
}
|
[
"public",
"void",
"setConnectivityInfo",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"ConnectivityInfo",
">",
"connectivityInfo",
")",
"{",
"if",
"(",
"connectivityInfo",
"==",
"null",
")",
"{",
"this",
".",
"connectivityInfo",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"connectivityInfo",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"ConnectivityInfo",
">",
"(",
"connectivityInfo",
")",
";",
"}"
] |
A list of connectivity info.
@param connectivityInfo
A list of connectivity info.
|
[
"A",
"list",
"of",
"connectivity",
"info",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/UpdateConnectivityInfoRequest.java#L51-L58
|
20,865
|
aws/aws-sdk-java
|
aws-java-sdk-sts/src/main/java/com/amazonaws/auth/ShouldDoBlockingSessionRefresh.java
|
ShouldDoBlockingSessionRefresh.expiring
|
private static boolean expiring(Date expiry) {
long timeRemaining = expiry.getTime() - System.currentTimeMillis();
return timeRemaining < EXPIRY_TIME_MILLIS;
}
|
java
|
private static boolean expiring(Date expiry) {
long timeRemaining = expiry.getTime() - System.currentTimeMillis();
return timeRemaining < EXPIRY_TIME_MILLIS;
}
|
[
"private",
"static",
"boolean",
"expiring",
"(",
"Date",
"expiry",
")",
"{",
"long",
"timeRemaining",
"=",
"expiry",
".",
"getTime",
"(",
")",
"-",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"return",
"timeRemaining",
"<",
"EXPIRY_TIME_MILLIS",
";",
"}"
] |
Session credentials that expire in less than a minute are considered expiring.
@param expiry expiration time of a session
|
[
"Session",
"credentials",
"that",
"expire",
"in",
"less",
"than",
"a",
"minute",
"are",
"considered",
"expiring",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sts/src/main/java/com/amazonaws/auth/ShouldDoBlockingSessionRefresh.java#L47-L50
|
20,866
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/support/RetryTemplateBuilder.java
|
RetryTemplateBuilder.fixedBackoff
|
public RetryTemplateBuilder fixedBackoff(long interval) {
Assert.isNull(this.backOffPolicy, "You have already selected backoff policy");
Assert.isTrue(interval >= 1, "Interval should be >= 1");
FixedBackOffPolicy policy = new FixedBackOffPolicy();
policy.setBackOffPeriod(interval);
this.backOffPolicy = policy;
return this;
}
|
java
|
public RetryTemplateBuilder fixedBackoff(long interval) {
Assert.isNull(this.backOffPolicy, "You have already selected backoff policy");
Assert.isTrue(interval >= 1, "Interval should be >= 1");
FixedBackOffPolicy policy = new FixedBackOffPolicy();
policy.setBackOffPeriod(interval);
this.backOffPolicy = policy;
return this;
}
|
[
"public",
"RetryTemplateBuilder",
"fixedBackoff",
"(",
"long",
"interval",
")",
"{",
"Assert",
".",
"isNull",
"(",
"this",
".",
"backOffPolicy",
",",
"\"You have already selected backoff policy\"",
")",
";",
"Assert",
".",
"isTrue",
"(",
"interval",
">=",
"1",
",",
"\"Interval should be >= 1\"",
")",
";",
"FixedBackOffPolicy",
"policy",
"=",
"new",
"FixedBackOffPolicy",
"(",
")",
";",
"policy",
".",
"setBackOffPeriod",
"(",
"interval",
")",
";",
"this",
".",
"backOffPolicy",
"=",
"policy",
";",
"return",
"this",
";",
"}"
] |
Perform each retry after fixed amount of time.
@param interval fixed interval in milliseconds
@return this
@see FixedBackOffPolicy
|
[
"Perform",
"each",
"retry",
"after",
"fixed",
"amount",
"of",
"time",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/support/RetryTemplateBuilder.java#L224-L231
|
20,867
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/annotation/RetryConfiguration.java
|
RetryConfiguration.buildPointcut
|
protected Pointcut buildPointcut(
Set<Class<? extends Annotation>> retryAnnotationTypes) {
ComposablePointcut result = null;
for (Class<? extends Annotation> retryAnnotationType : retryAnnotationTypes) {
Pointcut filter = new AnnotationClassOrMethodPointcut(retryAnnotationType);
if (result == null) {
result = new ComposablePointcut(filter);
}
else {
result.union(filter);
}
}
return result;
}
|
java
|
protected Pointcut buildPointcut(
Set<Class<? extends Annotation>> retryAnnotationTypes) {
ComposablePointcut result = null;
for (Class<? extends Annotation> retryAnnotationType : retryAnnotationTypes) {
Pointcut filter = new AnnotationClassOrMethodPointcut(retryAnnotationType);
if (result == null) {
result = new ComposablePointcut(filter);
}
else {
result.union(filter);
}
}
return result;
}
|
[
"protected",
"Pointcut",
"buildPointcut",
"(",
"Set",
"<",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
">",
"retryAnnotationTypes",
")",
"{",
"ComposablePointcut",
"result",
"=",
"null",
";",
"for",
"(",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"retryAnnotationType",
":",
"retryAnnotationTypes",
")",
"{",
"Pointcut",
"filter",
"=",
"new",
"AnnotationClassOrMethodPointcut",
"(",
"retryAnnotationType",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"result",
"=",
"new",
"ComposablePointcut",
"(",
"filter",
")",
";",
"}",
"else",
"{",
"result",
".",
"union",
"(",
"filter",
")",
";",
"}",
"}",
"return",
"result",
";",
"}"
] |
Calculate a pointcut for the given retry annotation types, if any.
@param retryAnnotationTypes the retry annotation types to introspect
@return the applicable Pointcut object, or {@code null} if none
|
[
"Calculate",
"a",
"pointcut",
"for",
"the",
"given",
"retry",
"annotation",
"types",
"if",
"any",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/annotation/RetryConfiguration.java#L158-L171
|
20,868
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/support/RetrySimulation.java
|
RetrySimulation.addSequence
|
public void addSequence(List<Long> sleeps) {
sleepHistogram.addAll(sleeps);
sleepSequences.add(new SleepSequence(sleeps));
}
|
java
|
public void addSequence(List<Long> sleeps) {
sleepHistogram.addAll(sleeps);
sleepSequences.add(new SleepSequence(sleeps));
}
|
[
"public",
"void",
"addSequence",
"(",
"List",
"<",
"Long",
">",
"sleeps",
")",
"{",
"sleepHistogram",
".",
"addAll",
"(",
"sleeps",
")",
";",
"sleepSequences",
".",
"add",
"(",
"new",
"SleepSequence",
"(",
"sleeps",
")",
")",
";",
"}"
] |
Add a sequence of sleeps to the simulation.
@param sleeps the times to be created as a {@link SleepSequence}
|
[
"Add",
"a",
"sequence",
"of",
"sleeps",
"to",
"the",
"simulation",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/support/RetrySimulation.java#L39-L42
|
20,869
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/interceptor/RetryInterceptorBuilder.java
|
RetryInterceptorBuilder.retryOperations
|
public RetryInterceptorBuilder<T> retryOperations(RetryOperations retryOperations) {
Assert.isTrue(!this.templateAltered,
"Cannot set retryOperations when the default has been modified");
this.retryOperations = retryOperations;
return this;
}
|
java
|
public RetryInterceptorBuilder<T> retryOperations(RetryOperations retryOperations) {
Assert.isTrue(!this.templateAltered,
"Cannot set retryOperations when the default has been modified");
this.retryOperations = retryOperations;
return this;
}
|
[
"public",
"RetryInterceptorBuilder",
"<",
"T",
">",
"retryOperations",
"(",
"RetryOperations",
"retryOperations",
")",
"{",
"Assert",
".",
"isTrue",
"(",
"!",
"this",
".",
"templateAltered",
",",
"\"Cannot set retryOperations when the default has been modified\"",
")",
";",
"this",
".",
"retryOperations",
"=",
"retryOperations",
";",
"return",
"this",
";",
"}"
] |
Apply the retry operations - once this is set, other properties can no longer be
set; can't be set if other properties have been applied.
@param retryOperations The retry operations.
@return this.
|
[
"Apply",
"the",
"retry",
"operations",
"-",
"once",
"this",
"is",
"set",
"other",
"properties",
"can",
"no",
"longer",
"be",
"set",
";",
"can",
"t",
"be",
"set",
"if",
"other",
"properties",
"have",
"been",
"applied",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/interceptor/RetryInterceptorBuilder.java#L103-L108
|
20,870
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/interceptor/RetryInterceptorBuilder.java
|
RetryInterceptorBuilder.maxAttempts
|
public RetryInterceptorBuilder<T> maxAttempts(int maxAttempts) {
Assert.isNull(this.retryOperations,
"cannot alter the retry policy when a custom retryOperations has been set");
Assert.isTrue(!this.retryPolicySet,
"cannot alter the retry policy when a custom retryPolicy has been set");
this.simpleRetryPolicy.setMaxAttempts(maxAttempts);
this.retryTemplate.setRetryPolicy(this.simpleRetryPolicy);
this.templateAltered = true;
return this;
}
|
java
|
public RetryInterceptorBuilder<T> maxAttempts(int maxAttempts) {
Assert.isNull(this.retryOperations,
"cannot alter the retry policy when a custom retryOperations has been set");
Assert.isTrue(!this.retryPolicySet,
"cannot alter the retry policy when a custom retryPolicy has been set");
this.simpleRetryPolicy.setMaxAttempts(maxAttempts);
this.retryTemplate.setRetryPolicy(this.simpleRetryPolicy);
this.templateAltered = true;
return this;
}
|
[
"public",
"RetryInterceptorBuilder",
"<",
"T",
">",
"maxAttempts",
"(",
"int",
"maxAttempts",
")",
"{",
"Assert",
".",
"isNull",
"(",
"this",
".",
"retryOperations",
",",
"\"cannot alter the retry policy when a custom retryOperations has been set\"",
")",
";",
"Assert",
".",
"isTrue",
"(",
"!",
"this",
".",
"retryPolicySet",
",",
"\"cannot alter the retry policy when a custom retryPolicy has been set\"",
")",
";",
"this",
".",
"simpleRetryPolicy",
".",
"setMaxAttempts",
"(",
"maxAttempts",
")",
";",
"this",
".",
"retryTemplate",
".",
"setRetryPolicy",
"(",
"this",
".",
"simpleRetryPolicy",
")",
";",
"this",
".",
"templateAltered",
"=",
"true",
";",
"return",
"this",
";",
"}"
] |
Apply the max attempts - a SimpleRetryPolicy will be used. Cannot be used if a
custom retry operations or retry policy has been set.
@param maxAttempts the max attempts (including the initial attempt).
@return this.
|
[
"Apply",
"the",
"max",
"attempts",
"-",
"a",
"SimpleRetryPolicy",
"will",
"be",
"used",
".",
"Cannot",
"be",
"used",
"if",
"a",
"custom",
"retry",
"operations",
"or",
"retry",
"policy",
"has",
"been",
"set",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/interceptor/RetryInterceptorBuilder.java#L116-L125
|
20,871
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/interceptor/RetryInterceptorBuilder.java
|
RetryInterceptorBuilder.backOffOptions
|
public RetryInterceptorBuilder<T> backOffOptions(long initialInterval,
double multiplier, long maxInterval) {
Assert.isNull(this.retryOperations,
"cannot set the back off policy when a custom retryOperations has been set");
Assert.isTrue(!this.backOffPolicySet,
"cannot set the back off options when a back off policy has been set");
ExponentialBackOffPolicy policy = new ExponentialBackOffPolicy();
policy.setInitialInterval(initialInterval);
policy.setMultiplier(multiplier);
policy.setMaxInterval(maxInterval);
this.retryTemplate.setBackOffPolicy(policy);
this.backOffOptionsSet = true;
this.templateAltered = true;
return this;
}
|
java
|
public RetryInterceptorBuilder<T> backOffOptions(long initialInterval,
double multiplier, long maxInterval) {
Assert.isNull(this.retryOperations,
"cannot set the back off policy when a custom retryOperations has been set");
Assert.isTrue(!this.backOffPolicySet,
"cannot set the back off options when a back off policy has been set");
ExponentialBackOffPolicy policy = new ExponentialBackOffPolicy();
policy.setInitialInterval(initialInterval);
policy.setMultiplier(multiplier);
policy.setMaxInterval(maxInterval);
this.retryTemplate.setBackOffPolicy(policy);
this.backOffOptionsSet = true;
this.templateAltered = true;
return this;
}
|
[
"public",
"RetryInterceptorBuilder",
"<",
"T",
">",
"backOffOptions",
"(",
"long",
"initialInterval",
",",
"double",
"multiplier",
",",
"long",
"maxInterval",
")",
"{",
"Assert",
".",
"isNull",
"(",
"this",
".",
"retryOperations",
",",
"\"cannot set the back off policy when a custom retryOperations has been set\"",
")",
";",
"Assert",
".",
"isTrue",
"(",
"!",
"this",
".",
"backOffPolicySet",
",",
"\"cannot set the back off options when a back off policy has been set\"",
")",
";",
"ExponentialBackOffPolicy",
"policy",
"=",
"new",
"ExponentialBackOffPolicy",
"(",
")",
";",
"policy",
".",
"setInitialInterval",
"(",
"initialInterval",
")",
";",
"policy",
".",
"setMultiplier",
"(",
"multiplier",
")",
";",
"policy",
".",
"setMaxInterval",
"(",
"maxInterval",
")",
";",
"this",
".",
"retryTemplate",
".",
"setBackOffPolicy",
"(",
"policy",
")",
";",
"this",
".",
"backOffOptionsSet",
"=",
"true",
";",
"this",
".",
"templateAltered",
"=",
"true",
";",
"return",
"this",
";",
"}"
] |
Apply the backoff options. Cannot be used if a custom retry operations, or back off
policy has been set.
@param initialInterval The initial interval.
@param multiplier The multiplier.
@param maxInterval The max interval.
@return this.
|
[
"Apply",
"the",
"backoff",
"options",
".",
"Cannot",
"be",
"used",
"if",
"a",
"custom",
"retry",
"operations",
"or",
"back",
"off",
"policy",
"has",
"been",
"set",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/interceptor/RetryInterceptorBuilder.java#L135-L149
|
20,872
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/interceptor/RetryInterceptorBuilder.java
|
RetryInterceptorBuilder.retryPolicy
|
public RetryInterceptorBuilder<T> retryPolicy(RetryPolicy policy) {
Assert.isNull(this.retryOperations,
"cannot set the retry policy when a custom retryOperations has been set");
Assert.isTrue(!this.templateAltered,
"cannot set the retry policy if max attempts or back off policy or options changed");
this.retryTemplate.setRetryPolicy(policy);
this.retryPolicySet = true;
this.templateAltered = true;
return this;
}
|
java
|
public RetryInterceptorBuilder<T> retryPolicy(RetryPolicy policy) {
Assert.isNull(this.retryOperations,
"cannot set the retry policy when a custom retryOperations has been set");
Assert.isTrue(!this.templateAltered,
"cannot set the retry policy if max attempts or back off policy or options changed");
this.retryTemplate.setRetryPolicy(policy);
this.retryPolicySet = true;
this.templateAltered = true;
return this;
}
|
[
"public",
"RetryInterceptorBuilder",
"<",
"T",
">",
"retryPolicy",
"(",
"RetryPolicy",
"policy",
")",
"{",
"Assert",
".",
"isNull",
"(",
"this",
".",
"retryOperations",
",",
"\"cannot set the retry policy when a custom retryOperations has been set\"",
")",
";",
"Assert",
".",
"isTrue",
"(",
"!",
"this",
".",
"templateAltered",
",",
"\"cannot set the retry policy if max attempts or back off policy or options changed\"",
")",
";",
"this",
".",
"retryTemplate",
".",
"setRetryPolicy",
"(",
"policy",
")",
";",
"this",
".",
"retryPolicySet",
"=",
"true",
";",
"this",
".",
"templateAltered",
"=",
"true",
";",
"return",
"this",
";",
"}"
] |
Apply the retry policy - cannot be used if a custom retry template has been
provided, or the max attempts or back off options or policy have been applied.
@param policy The policy.
@return this.
|
[
"Apply",
"the",
"retry",
"policy",
"-",
"cannot",
"be",
"used",
"if",
"a",
"custom",
"retry",
"template",
"has",
"been",
"provided",
"or",
"the",
"max",
"attempts",
"or",
"back",
"off",
"options",
"or",
"policy",
"have",
"been",
"applied",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/interceptor/RetryInterceptorBuilder.java#L157-L166
|
20,873
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/interceptor/RetryInterceptorBuilder.java
|
RetryInterceptorBuilder.backOffPolicy
|
public RetryInterceptorBuilder<T> backOffPolicy(BackOffPolicy policy) {
Assert.isNull(this.retryOperations,
"cannot set the back off policy when a custom retryOperations has been set");
Assert.isTrue(!this.backOffOptionsSet,
"cannot set the back off policy when the back off policy options have been set");
this.retryTemplate.setBackOffPolicy(policy);
this.templateAltered = true;
this.backOffPolicySet = true;
return this;
}
|
java
|
public RetryInterceptorBuilder<T> backOffPolicy(BackOffPolicy policy) {
Assert.isNull(this.retryOperations,
"cannot set the back off policy when a custom retryOperations has been set");
Assert.isTrue(!this.backOffOptionsSet,
"cannot set the back off policy when the back off policy options have been set");
this.retryTemplate.setBackOffPolicy(policy);
this.templateAltered = true;
this.backOffPolicySet = true;
return this;
}
|
[
"public",
"RetryInterceptorBuilder",
"<",
"T",
">",
"backOffPolicy",
"(",
"BackOffPolicy",
"policy",
")",
"{",
"Assert",
".",
"isNull",
"(",
"this",
".",
"retryOperations",
",",
"\"cannot set the back off policy when a custom retryOperations has been set\"",
")",
";",
"Assert",
".",
"isTrue",
"(",
"!",
"this",
".",
"backOffOptionsSet",
",",
"\"cannot set the back off policy when the back off policy options have been set\"",
")",
";",
"this",
".",
"retryTemplate",
".",
"setBackOffPolicy",
"(",
"policy",
")",
";",
"this",
".",
"templateAltered",
"=",
"true",
";",
"this",
".",
"backOffPolicySet",
"=",
"true",
";",
"return",
"this",
";",
"}"
] |
Apply the back off policy. Cannot be used if a custom retry operations, or back off
policy has been applied.
@param policy The policy.
@return this.
|
[
"Apply",
"the",
"back",
"off",
"policy",
".",
"Cannot",
"be",
"used",
"if",
"a",
"custom",
"retry",
"operations",
"or",
"back",
"off",
"policy",
"has",
"been",
"applied",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/interceptor/RetryInterceptorBuilder.java#L174-L183
|
20,874
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/annotation/AnnotationAwareRetryOperationsInterceptor.java
|
AnnotationAwareRetryOperationsInterceptor.setListeners
|
public void setListeners(Collection<RetryListener> globalListeners) {
ArrayList<RetryListener> retryListeners = new ArrayList<RetryListener>(
globalListeners);
AnnotationAwareOrderComparator.sort(retryListeners);
this.globalListeners = retryListeners.toArray(new RetryListener[0]);
}
|
java
|
public void setListeners(Collection<RetryListener> globalListeners) {
ArrayList<RetryListener> retryListeners = new ArrayList<RetryListener>(
globalListeners);
AnnotationAwareOrderComparator.sort(retryListeners);
this.globalListeners = retryListeners.toArray(new RetryListener[0]);
}
|
[
"public",
"void",
"setListeners",
"(",
"Collection",
"<",
"RetryListener",
">",
"globalListeners",
")",
"{",
"ArrayList",
"<",
"RetryListener",
">",
"retryListeners",
"=",
"new",
"ArrayList",
"<",
"RetryListener",
">",
"(",
"globalListeners",
")",
";",
"AnnotationAwareOrderComparator",
".",
"sort",
"(",
"retryListeners",
")",
";",
"this",
".",
"globalListeners",
"=",
"retryListeners",
".",
"toArray",
"(",
"new",
"RetryListener",
"[",
"0",
"]",
")",
";",
"}"
] |
Default retry listeners to apply to all operations.
@param globalListeners the default listeners
|
[
"Default",
"retry",
"listeners",
"to",
"apply",
"to",
"all",
"operations",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/annotation/AnnotationAwareRetryOperationsInterceptor.java#L132-L137
|
20,875
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/annotation/AnnotationAwareRetryOperationsInterceptor.java
|
AnnotationAwareRetryOperationsInterceptor.resolve
|
private String resolve(String value) {
if (this.beanFactory != null
&& this.beanFactory instanceof ConfigurableBeanFactory) {
return ((ConfigurableBeanFactory) this.beanFactory)
.resolveEmbeddedValue(value);
}
return value;
}
|
java
|
private String resolve(String value) {
if (this.beanFactory != null
&& this.beanFactory instanceof ConfigurableBeanFactory) {
return ((ConfigurableBeanFactory) this.beanFactory)
.resolveEmbeddedValue(value);
}
return value;
}
|
[
"private",
"String",
"resolve",
"(",
"String",
"value",
")",
"{",
"if",
"(",
"this",
".",
"beanFactory",
"!=",
"null",
"&&",
"this",
".",
"beanFactory",
"instanceof",
"ConfigurableBeanFactory",
")",
"{",
"return",
"(",
"(",
"ConfigurableBeanFactory",
")",
"this",
".",
"beanFactory",
")",
".",
"resolveEmbeddedValue",
"(",
"value",
")",
";",
"}",
"return",
"value",
";",
"}"
] |
Resolve the specified value if possible.
@see ConfigurableBeanFactory#resolveEmbeddedValue
|
[
"Resolve",
"the",
"specified",
"value",
"if",
"possible",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/annotation/AnnotationAwareRetryOperationsInterceptor.java#L431-L438
|
20,876
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/support/RetryTemplate.java
|
RetryTemplate.registerListener
|
public void registerListener(RetryListener listener) {
List<RetryListener> list = new ArrayList<RetryListener>(
Arrays.asList(this.listeners));
list.add(listener);
this.listeners = list.toArray(new RetryListener[list.size()]);
}
|
java
|
public void registerListener(RetryListener listener) {
List<RetryListener> list = new ArrayList<RetryListener>(
Arrays.asList(this.listeners));
list.add(listener);
this.listeners = list.toArray(new RetryListener[list.size()]);
}
|
[
"public",
"void",
"registerListener",
"(",
"RetryListener",
"listener",
")",
"{",
"List",
"<",
"RetryListener",
">",
"list",
"=",
"new",
"ArrayList",
"<",
"RetryListener",
">",
"(",
"Arrays",
".",
"asList",
"(",
"this",
".",
"listeners",
")",
")",
";",
"list",
".",
"add",
"(",
"listener",
")",
";",
"this",
".",
"listeners",
"=",
"list",
".",
"toArray",
"(",
"new",
"RetryListener",
"[",
"list",
".",
"size",
"(",
")",
"]",
")",
";",
"}"
] |
Register an additional listener.
@param listener the {@link RetryListener}
@see #setListeners(RetryListener[])
|
[
"Register",
"an",
"additional",
"listener",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/support/RetryTemplate.java#L151-L156
|
20,877
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/support/RetryTemplate.java
|
RetryTemplate.execute
|
@Override
public final <T, E extends Throwable> T execute(RetryCallback<T, E> retryCallback)
throws E {
return doExecute(retryCallback, null, null);
}
|
java
|
@Override
public final <T, E extends Throwable> T execute(RetryCallback<T, E> retryCallback)
throws E {
return doExecute(retryCallback, null, null);
}
|
[
"@",
"Override",
"public",
"final",
"<",
"T",
",",
"E",
"extends",
"Throwable",
">",
"T",
"execute",
"(",
"RetryCallback",
"<",
"T",
",",
"E",
">",
"retryCallback",
")",
"throws",
"E",
"{",
"return",
"doExecute",
"(",
"retryCallback",
",",
"null",
",",
"null",
")",
";",
"}"
] |
Keep executing the callback until it either succeeds or the policy dictates that we
stop, in which case the most recent exception thrown by the callback will be
rethrown.
@see RetryOperations#execute(RetryCallback)
@param retryCallback the {@link RetryCallback}
@throws TerminatedRetryException if the retry has been manually terminated by a
listener.
|
[
"Keep",
"executing",
"the",
"callback",
"until",
"it",
"either",
"succeeds",
"or",
"the",
"policy",
"dictates",
"that",
"we",
"stop",
"in",
"which",
"case",
"the",
"most",
"recent",
"exception",
"thrown",
"by",
"the",
"callback",
"will",
"be",
"rethrown",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/support/RetryTemplate.java#L184-L188
|
20,878
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/support/RetryTemplate.java
|
RetryTemplate.handleRetryExhausted
|
protected <T> T handleRetryExhausted(RecoveryCallback<T> recoveryCallback,
RetryContext context, RetryState state) throws Throwable {
context.setAttribute(RetryContext.EXHAUSTED, true);
if (state != null && !context.hasAttribute(GLOBAL_STATE)) {
this.retryContextCache.remove(state.getKey());
}
if (recoveryCallback != null) {
T recovered = recoveryCallback.recover(context);
context.setAttribute(RetryContext.RECOVERED, true);
return recovered;
}
if (state != null) {
this.logger
.debug("Retry exhausted after last attempt with no recovery path.");
rethrow(context, "Retry exhausted after last attempt with no recovery path");
}
throw wrapIfNecessary(context.getLastThrowable());
}
|
java
|
protected <T> T handleRetryExhausted(RecoveryCallback<T> recoveryCallback,
RetryContext context, RetryState state) throws Throwable {
context.setAttribute(RetryContext.EXHAUSTED, true);
if (state != null && !context.hasAttribute(GLOBAL_STATE)) {
this.retryContextCache.remove(state.getKey());
}
if (recoveryCallback != null) {
T recovered = recoveryCallback.recover(context);
context.setAttribute(RetryContext.RECOVERED, true);
return recovered;
}
if (state != null) {
this.logger
.debug("Retry exhausted after last attempt with no recovery path.");
rethrow(context, "Retry exhausted after last attempt with no recovery path");
}
throw wrapIfNecessary(context.getLastThrowable());
}
|
[
"protected",
"<",
"T",
">",
"T",
"handleRetryExhausted",
"(",
"RecoveryCallback",
"<",
"T",
">",
"recoveryCallback",
",",
"RetryContext",
"context",
",",
"RetryState",
"state",
")",
"throws",
"Throwable",
"{",
"context",
".",
"setAttribute",
"(",
"RetryContext",
".",
"EXHAUSTED",
",",
"true",
")",
";",
"if",
"(",
"state",
"!=",
"null",
"&&",
"!",
"context",
".",
"hasAttribute",
"(",
"GLOBAL_STATE",
")",
")",
"{",
"this",
".",
"retryContextCache",
".",
"remove",
"(",
"state",
".",
"getKey",
"(",
")",
")",
";",
"}",
"if",
"(",
"recoveryCallback",
"!=",
"null",
")",
"{",
"T",
"recovered",
"=",
"recoveryCallback",
".",
"recover",
"(",
"context",
")",
";",
"context",
".",
"setAttribute",
"(",
"RetryContext",
".",
"RECOVERED",
",",
"true",
")",
";",
"return",
"recovered",
";",
"}",
"if",
"(",
"state",
"!=",
"null",
")",
"{",
"this",
".",
"logger",
".",
"debug",
"(",
"\"Retry exhausted after last attempt with no recovery path.\"",
")",
";",
"rethrow",
"(",
"context",
",",
"\"Retry exhausted after last attempt with no recovery path\"",
")",
";",
"}",
"throw",
"wrapIfNecessary",
"(",
"context",
".",
"getLastThrowable",
"(",
")",
")",
";",
"}"
] |
Actions to take after final attempt has failed. If there is state clean up the
cache. If there is a recovery callback, execute that and return its result.
Otherwise throw an exception.
@param recoveryCallback the callback for recovery (might be null)
@param context the current retry context
@param state the {@link RetryState}
@param <T> the type to classify
@throws Exception if the callback does, and if there is no callback and the state
is null then the last exception from the context
@throws ExhaustedRetryException if the state is not null and there is no recovery
callback
@return T the payload to return
@throws Throwable if there is an error
|
[
"Actions",
"to",
"take",
"after",
"final",
"attempt",
"has",
"failed",
".",
"If",
"there",
"is",
"state",
"clean",
"up",
"the",
"cache",
".",
"If",
"there",
"is",
"a",
"recovery",
"callback",
"execute",
"that",
"and",
"return",
"its",
"result",
".",
"Otherwise",
"throw",
"an",
"exception",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/support/RetryTemplate.java#L524-L541
|
20,879
|
spring-projects/spring-retry
|
src/main/java/org/springframework/classify/util/MethodInvokerUtils.java
|
MethodInvokerUtils.getParamTypesString
|
public static String getParamTypesString(Class<?>... paramTypes) {
StringBuilder paramTypesList = new StringBuilder("(");
for (int i = 0; i < paramTypes.length; i++) {
paramTypesList.append(paramTypes[i].getSimpleName());
if (i + 1 < paramTypes.length) {
paramTypesList.append(", ");
}
}
return paramTypesList.append(")").toString();
}
|
java
|
public static String getParamTypesString(Class<?>... paramTypes) {
StringBuilder paramTypesList = new StringBuilder("(");
for (int i = 0; i < paramTypes.length; i++) {
paramTypesList.append(paramTypes[i].getSimpleName());
if (i + 1 < paramTypes.length) {
paramTypesList.append(", ");
}
}
return paramTypesList.append(")").toString();
}
|
[
"public",
"static",
"String",
"getParamTypesString",
"(",
"Class",
"<",
"?",
">",
"...",
"paramTypes",
")",
"{",
"StringBuilder",
"paramTypesList",
"=",
"new",
"StringBuilder",
"(",
"\"(\"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"paramTypes",
".",
"length",
";",
"i",
"++",
")",
"{",
"paramTypesList",
".",
"append",
"(",
"paramTypes",
"[",
"i",
"]",
".",
"getSimpleName",
"(",
")",
")",
";",
"if",
"(",
"i",
"+",
"1",
"<",
"paramTypes",
".",
"length",
")",
"{",
"paramTypesList",
".",
"append",
"(",
"\", \"",
")",
";",
"}",
"}",
"return",
"paramTypesList",
".",
"append",
"(",
"\")\"",
")",
".",
"toString",
"(",
")",
";",
"}"
] |
Create a String representation of the array of parameter types.
@param paramTypes the types of parameters
@return the paramTypes as String representation
|
[
"Create",
"a",
"String",
"representation",
"of",
"the",
"array",
"of",
"parameter",
"types",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/classify/util/MethodInvokerUtils.java#L76-L85
|
20,880
|
spring-projects/spring-retry
|
src/main/java/org/springframework/classify/util/MethodInvokerUtils.java
|
MethodInvokerUtils.getMethodInvokerByAnnotation
|
public static MethodInvoker getMethodInvokerByAnnotation(
final Class<? extends Annotation> annotationType, final Object target,
final Class<?>... expectedParamTypes) {
MethodInvoker mi = MethodInvokerUtils.getMethodInvokerByAnnotation(annotationType,
target);
final Class<?> targetClass = (target instanceof Advised)
? ((Advised) target).getTargetSource().getTargetClass()
: target.getClass();
if (mi != null) {
ReflectionUtils.doWithMethods(targetClass,
new ReflectionUtils.MethodCallback() {
public void doWith(Method method)
throws IllegalArgumentException, IllegalAccessException {
Annotation annotation = AnnotationUtils.findAnnotation(method,
annotationType);
if (annotation != null) {
Class<?>[] paramTypes = method.getParameterTypes();
if (paramTypes.length > 0) {
String errorMsg = "The method [" + method.getName()
+ "] on target class ["
+ targetClass.getSimpleName()
+ "] is incompatable with the signature ["
+ getParamTypesString(expectedParamTypes)
+ "] expected for the annotation ["
+ annotationType.getSimpleName() + "].";
Assert.isTrue(
paramTypes.length == expectedParamTypes.length,
errorMsg);
for (int i = 0; i < paramTypes.length; i++) {
Assert.isTrue(expectedParamTypes[i]
.isAssignableFrom(paramTypes[i]),
errorMsg);
}
}
}
}
});
}
return mi;
}
|
java
|
public static MethodInvoker getMethodInvokerByAnnotation(
final Class<? extends Annotation> annotationType, final Object target,
final Class<?>... expectedParamTypes) {
MethodInvoker mi = MethodInvokerUtils.getMethodInvokerByAnnotation(annotationType,
target);
final Class<?> targetClass = (target instanceof Advised)
? ((Advised) target).getTargetSource().getTargetClass()
: target.getClass();
if (mi != null) {
ReflectionUtils.doWithMethods(targetClass,
new ReflectionUtils.MethodCallback() {
public void doWith(Method method)
throws IllegalArgumentException, IllegalAccessException {
Annotation annotation = AnnotationUtils.findAnnotation(method,
annotationType);
if (annotation != null) {
Class<?>[] paramTypes = method.getParameterTypes();
if (paramTypes.length > 0) {
String errorMsg = "The method [" + method.getName()
+ "] on target class ["
+ targetClass.getSimpleName()
+ "] is incompatable with the signature ["
+ getParamTypesString(expectedParamTypes)
+ "] expected for the annotation ["
+ annotationType.getSimpleName() + "].";
Assert.isTrue(
paramTypes.length == expectedParamTypes.length,
errorMsg);
for (int i = 0; i < paramTypes.length; i++) {
Assert.isTrue(expectedParamTypes[i]
.isAssignableFrom(paramTypes[i]),
errorMsg);
}
}
}
}
});
}
return mi;
}
|
[
"public",
"static",
"MethodInvoker",
"getMethodInvokerByAnnotation",
"(",
"final",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"annotationType",
",",
"final",
"Object",
"target",
",",
"final",
"Class",
"<",
"?",
">",
"...",
"expectedParamTypes",
")",
"{",
"MethodInvoker",
"mi",
"=",
"MethodInvokerUtils",
".",
"getMethodInvokerByAnnotation",
"(",
"annotationType",
",",
"target",
")",
";",
"final",
"Class",
"<",
"?",
">",
"targetClass",
"=",
"(",
"target",
"instanceof",
"Advised",
")",
"?",
"(",
"(",
"Advised",
")",
"target",
")",
".",
"getTargetSource",
"(",
")",
".",
"getTargetClass",
"(",
")",
":",
"target",
".",
"getClass",
"(",
")",
";",
"if",
"(",
"mi",
"!=",
"null",
")",
"{",
"ReflectionUtils",
".",
"doWithMethods",
"(",
"targetClass",
",",
"new",
"ReflectionUtils",
".",
"MethodCallback",
"(",
")",
"{",
"public",
"void",
"doWith",
"(",
"Method",
"method",
")",
"throws",
"IllegalArgumentException",
",",
"IllegalAccessException",
"{",
"Annotation",
"annotation",
"=",
"AnnotationUtils",
".",
"findAnnotation",
"(",
"method",
",",
"annotationType",
")",
";",
"if",
"(",
"annotation",
"!=",
"null",
")",
"{",
"Class",
"<",
"?",
">",
"[",
"]",
"paramTypes",
"=",
"method",
".",
"getParameterTypes",
"(",
")",
";",
"if",
"(",
"paramTypes",
".",
"length",
">",
"0",
")",
"{",
"String",
"errorMsg",
"=",
"\"The method [\"",
"+",
"method",
".",
"getName",
"(",
")",
"+",
"\"] on target class [\"",
"+",
"targetClass",
".",
"getSimpleName",
"(",
")",
"+",
"\"] is incompatable with the signature [\"",
"+",
"getParamTypesString",
"(",
"expectedParamTypes",
")",
"+",
"\"] expected for the annotation [\"",
"+",
"annotationType",
".",
"getSimpleName",
"(",
")",
"+",
"\"].\"",
";",
"Assert",
".",
"isTrue",
"(",
"paramTypes",
".",
"length",
"==",
"expectedParamTypes",
".",
"length",
",",
"errorMsg",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"paramTypes",
".",
"length",
";",
"i",
"++",
")",
"{",
"Assert",
".",
"isTrue",
"(",
"expectedParamTypes",
"[",
"i",
"]",
".",
"isAssignableFrom",
"(",
"paramTypes",
"[",
"i",
"]",
")",
",",
"errorMsg",
")",
";",
"}",
"}",
"}",
"}",
"}",
")",
";",
"}",
"return",
"mi",
";",
"}"
] |
Create a MethodInvoker from the delegate based on the annotationType. Ensure that
the annotated method has a valid set of parameters.
@param annotationType the annotation to scan for
@param target the target object
@param expectedParamTypes the expected parameter types for the method
@return a MethodInvoker
|
[
"Create",
"a",
"MethodInvoker",
"from",
"the",
"delegate",
"based",
"on",
"the",
"annotationType",
".",
"Ensure",
"that",
"the",
"annotated",
"method",
"has",
"a",
"valid",
"set",
"of",
"parameters",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/classify/util/MethodInvokerUtils.java#L116-L156
|
20,881
|
spring-projects/spring-retry
|
src/main/java/org/springframework/classify/SubclassClassifier.java
|
SubclassClassifier.setTypeMap
|
public void setTypeMap(Map<Class<? extends T>, C> map) {
this.classified = new ConcurrentHashMap<Class<? extends T>, C>(map);
}
|
java
|
public void setTypeMap(Map<Class<? extends T>, C> map) {
this.classified = new ConcurrentHashMap<Class<? extends T>, C>(map);
}
|
[
"public",
"void",
"setTypeMap",
"(",
"Map",
"<",
"Class",
"<",
"?",
"extends",
"T",
">",
",",
"C",
">",
"map",
")",
"{",
"this",
".",
"classified",
"=",
"new",
"ConcurrentHashMap",
"<",
"Class",
"<",
"?",
"extends",
"T",
">",
",",
"C",
">",
"(",
"map",
")",
";",
"}"
] |
Set the classifications up as a map. The keys are types and these will be mapped
along with all their subclasses to the corresponding value. The most specific types
will match first.
@param map a map from type to class
|
[
"Set",
"the",
"classifications",
"up",
"as",
"a",
"map",
".",
"The",
"keys",
"are",
"types",
"and",
"these",
"will",
"be",
"mapped",
"along",
"with",
"all",
"their",
"subclasses",
"to",
"the",
"corresponding",
"value",
".",
"The",
"most",
"specific",
"types",
"will",
"match",
"first",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/classify/SubclassClassifier.java#L84-L86
|
20,882
|
spring-projects/spring-retry
|
src/main/java/org/springframework/classify/SubclassClassifier.java
|
SubclassClassifier.classify
|
@Override
public C classify(T classifiable) {
if (classifiable == null) {
return this.defaultValue;
}
@SuppressWarnings("unchecked")
Class<? extends T> exceptionClass = (Class<? extends T>) classifiable.getClass();
if (this.classified.containsKey(exceptionClass)) {
return this.classified.get(exceptionClass);
}
// check for subclasses
C value = null;
for (Class<?> cls = exceptionClass; !cls.equals(Object.class)
&& value == null; cls = cls.getSuperclass()) {
value = this.classified.get(cls);
}
// ConcurrentHashMap doesn't allow nulls
if (value != null) {
this.classified.put(exceptionClass, value);
}
if (value == null) {
value = this.defaultValue;
}
return value;
}
|
java
|
@Override
public C classify(T classifiable) {
if (classifiable == null) {
return this.defaultValue;
}
@SuppressWarnings("unchecked")
Class<? extends T> exceptionClass = (Class<? extends T>) classifiable.getClass();
if (this.classified.containsKey(exceptionClass)) {
return this.classified.get(exceptionClass);
}
// check for subclasses
C value = null;
for (Class<?> cls = exceptionClass; !cls.equals(Object.class)
&& value == null; cls = cls.getSuperclass()) {
value = this.classified.get(cls);
}
// ConcurrentHashMap doesn't allow nulls
if (value != null) {
this.classified.put(exceptionClass, value);
}
if (value == null) {
value = this.defaultValue;
}
return value;
}
|
[
"@",
"Override",
"public",
"C",
"classify",
"(",
"T",
"classifiable",
")",
"{",
"if",
"(",
"classifiable",
"==",
"null",
")",
"{",
"return",
"this",
".",
"defaultValue",
";",
"}",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"Class",
"<",
"?",
"extends",
"T",
">",
"exceptionClass",
"=",
"(",
"Class",
"<",
"?",
"extends",
"T",
">",
")",
"classifiable",
".",
"getClass",
"(",
")",
";",
"if",
"(",
"this",
".",
"classified",
".",
"containsKey",
"(",
"exceptionClass",
")",
")",
"{",
"return",
"this",
".",
"classified",
".",
"get",
"(",
"exceptionClass",
")",
";",
"}",
"// check for subclasses",
"C",
"value",
"=",
"null",
";",
"for",
"(",
"Class",
"<",
"?",
">",
"cls",
"=",
"exceptionClass",
";",
"!",
"cls",
".",
"equals",
"(",
"Object",
".",
"class",
")",
"&&",
"value",
"==",
"null",
";",
"cls",
"=",
"cls",
".",
"getSuperclass",
"(",
")",
")",
"{",
"value",
"=",
"this",
".",
"classified",
".",
"get",
"(",
"cls",
")",
";",
"}",
"// ConcurrentHashMap doesn't allow nulls",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"this",
".",
"classified",
".",
"put",
"(",
"exceptionClass",
",",
"value",
")",
";",
"}",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"value",
"=",
"this",
".",
"defaultValue",
";",
"}",
"return",
"value",
";",
"}"
] |
Return the value from the type map whose key is the class of the given Throwable,
or its nearest ancestor if a subclass.
@return C the classified value
@param classifiable the classifiable thing
|
[
"Return",
"the",
"value",
"from",
"the",
"type",
"map",
"whose",
"key",
"is",
"the",
"class",
"of",
"the",
"given",
"Throwable",
"or",
"its",
"nearest",
"ancestor",
"if",
"a",
"subclass",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/classify/SubclassClassifier.java#L94-L124
|
20,883
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/support/RetrySimulator.java
|
RetrySimulator.executeSingleSimulation
|
public List<Long> executeSingleSimulation() {
StealingSleeper stealingSleeper = new StealingSleeper();
SleepingBackOffPolicy<?> stealingBackoff = backOffPolicy
.withSleeper(stealingSleeper);
RetryTemplate template = new RetryTemplate();
template.setBackOffPolicy(stealingBackoff);
template.setRetryPolicy(retryPolicy);
try {
template.execute(new FailingRetryCallback());
}
catch (FailingRetryException e) {
}
catch (Throwable e) {
throw new RuntimeException("Unexpected exception", e);
}
return stealingSleeper.getSleeps();
}
|
java
|
public List<Long> executeSingleSimulation() {
StealingSleeper stealingSleeper = new StealingSleeper();
SleepingBackOffPolicy<?> stealingBackoff = backOffPolicy
.withSleeper(stealingSleeper);
RetryTemplate template = new RetryTemplate();
template.setBackOffPolicy(stealingBackoff);
template.setRetryPolicy(retryPolicy);
try {
template.execute(new FailingRetryCallback());
}
catch (FailingRetryException e) {
}
catch (Throwable e) {
throw new RuntimeException("Unexpected exception", e);
}
return stealingSleeper.getSleeps();
}
|
[
"public",
"List",
"<",
"Long",
">",
"executeSingleSimulation",
"(",
")",
"{",
"StealingSleeper",
"stealingSleeper",
"=",
"new",
"StealingSleeper",
"(",
")",
";",
"SleepingBackOffPolicy",
"<",
"?",
">",
"stealingBackoff",
"=",
"backOffPolicy",
".",
"withSleeper",
"(",
"stealingSleeper",
")",
";",
"RetryTemplate",
"template",
"=",
"new",
"RetryTemplate",
"(",
")",
";",
"template",
".",
"setBackOffPolicy",
"(",
"stealingBackoff",
")",
";",
"template",
".",
"setRetryPolicy",
"(",
"retryPolicy",
")",
";",
"try",
"{",
"template",
".",
"execute",
"(",
"new",
"FailingRetryCallback",
"(",
")",
")",
";",
"}",
"catch",
"(",
"FailingRetryException",
"e",
")",
"{",
"}",
"catch",
"(",
"Throwable",
"e",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"Unexpected exception\"",
",",
"e",
")",
";",
"}",
"return",
"stealingSleeper",
".",
"getSleeps",
"(",
")",
";",
"}"
] |
Execute a single simulation
@return The sleeps which occurred within the single simulation.
|
[
"Execute",
"a",
"single",
"simulation"
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/support/RetrySimulator.java#L79-L99
|
20,884
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/policy/CompositeRetryPolicy.java
|
CompositeRetryPolicy.setPolicies
|
public void setPolicies(RetryPolicy[] policies) {
this.policies = Arrays.asList(policies).toArray(new RetryPolicy[policies.length]);
}
|
java
|
public void setPolicies(RetryPolicy[] policies) {
this.policies = Arrays.asList(policies).toArray(new RetryPolicy[policies.length]);
}
|
[
"public",
"void",
"setPolicies",
"(",
"RetryPolicy",
"[",
"]",
"policies",
")",
"{",
"this",
".",
"policies",
"=",
"Arrays",
".",
"asList",
"(",
"policies",
")",
".",
"toArray",
"(",
"new",
"RetryPolicy",
"[",
"policies",
".",
"length",
"]",
")",
";",
"}"
] |
Setter for policies.
@param policies the {@link RetryPolicy} policies
|
[
"Setter",
"for",
"policies",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/policy/CompositeRetryPolicy.java#L54-L56
|
20,885
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/policy/CompositeRetryPolicy.java
|
CompositeRetryPolicy.canRetry
|
@Override
public boolean canRetry(RetryContext context) {
RetryContext[] contexts = ((CompositeRetryContext) context).contexts;
RetryPolicy[] policies = ((CompositeRetryContext) context).policies;
boolean retryable = true;
if (this.optimistic) {
retryable = false;
for (int i = 0; i < contexts.length; i++) {
if (policies[i].canRetry(contexts[i])) {
retryable = true;
}
}
}
else {
for (int i = 0; i < contexts.length; i++) {
if (!policies[i].canRetry(contexts[i])) {
retryable = false;
}
}
}
return retryable;
}
|
java
|
@Override
public boolean canRetry(RetryContext context) {
RetryContext[] contexts = ((CompositeRetryContext) context).contexts;
RetryPolicy[] policies = ((CompositeRetryContext) context).policies;
boolean retryable = true;
if (this.optimistic) {
retryable = false;
for (int i = 0; i < contexts.length; i++) {
if (policies[i].canRetry(contexts[i])) {
retryable = true;
}
}
}
else {
for (int i = 0; i < contexts.length; i++) {
if (!policies[i].canRetry(contexts[i])) {
retryable = false;
}
}
}
return retryable;
}
|
[
"@",
"Override",
"public",
"boolean",
"canRetry",
"(",
"RetryContext",
"context",
")",
"{",
"RetryContext",
"[",
"]",
"contexts",
"=",
"(",
"(",
"CompositeRetryContext",
")",
"context",
")",
".",
"contexts",
";",
"RetryPolicy",
"[",
"]",
"policies",
"=",
"(",
"(",
"CompositeRetryContext",
")",
"context",
")",
".",
"policies",
";",
"boolean",
"retryable",
"=",
"true",
";",
"if",
"(",
"this",
".",
"optimistic",
")",
"{",
"retryable",
"=",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"contexts",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"policies",
"[",
"i",
"]",
".",
"canRetry",
"(",
"contexts",
"[",
"i",
"]",
")",
")",
"{",
"retryable",
"=",
"true",
";",
"}",
"}",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"contexts",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"!",
"policies",
"[",
"i",
"]",
".",
"canRetry",
"(",
"contexts",
"[",
"i",
"]",
")",
")",
"{",
"retryable",
"=",
"false",
";",
"}",
"}",
"}",
"return",
"retryable",
";",
"}"
] |
Delegate to the policies that were in operation when the context was created. If
any of them cannot retry then return false, otherwise return true.
@param context the {@link RetryContext}
@see org.springframework.retry.RetryPolicy#canRetry(org.springframework.retry.RetryContext)
|
[
"Delegate",
"to",
"the",
"policies",
"that",
"were",
"in",
"operation",
"when",
"the",
"context",
"was",
"created",
".",
"If",
"any",
"of",
"them",
"cannot",
"retry",
"then",
"return",
"false",
"otherwise",
"return",
"true",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/policy/CompositeRetryPolicy.java#L64-L88
|
20,886
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/policy/CompositeRetryPolicy.java
|
CompositeRetryPolicy.open
|
@Override
public RetryContext open(RetryContext parent) {
List<RetryContext> list = new ArrayList<RetryContext>();
for (RetryPolicy policy : this.policies) {
list.add(policy.open(parent));
}
return new CompositeRetryContext(parent, list, this.policies);
}
|
java
|
@Override
public RetryContext open(RetryContext parent) {
List<RetryContext> list = new ArrayList<RetryContext>();
for (RetryPolicy policy : this.policies) {
list.add(policy.open(parent));
}
return new CompositeRetryContext(parent, list, this.policies);
}
|
[
"@",
"Override",
"public",
"RetryContext",
"open",
"(",
"RetryContext",
"parent",
")",
"{",
"List",
"<",
"RetryContext",
">",
"list",
"=",
"new",
"ArrayList",
"<",
"RetryContext",
">",
"(",
")",
";",
"for",
"(",
"RetryPolicy",
"policy",
":",
"this",
".",
"policies",
")",
"{",
"list",
".",
"add",
"(",
"policy",
".",
"open",
"(",
"parent",
")",
")",
";",
"}",
"return",
"new",
"CompositeRetryContext",
"(",
"parent",
",",
"list",
",",
"this",
".",
"policies",
")",
";",
"}"
] |
Creates a new context that copies the existing policies and keeps a list of the
contexts from each one.
@see org.springframework.retry.RetryPolicy#open(RetryContext)
|
[
"Creates",
"a",
"new",
"context",
"that",
"copies",
"the",
"existing",
"policies",
"and",
"keeps",
"a",
"list",
"of",
"the",
"contexts",
"from",
"each",
"one",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/policy/CompositeRetryPolicy.java#L124-L131
|
20,887
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/policy/CompositeRetryPolicy.java
|
CompositeRetryPolicy.registerThrowable
|
@Override
public void registerThrowable(RetryContext context, Throwable throwable) {
RetryContext[] contexts = ((CompositeRetryContext) context).contexts;
RetryPolicy[] policies = ((CompositeRetryContext) context).policies;
for (int i = 0; i < contexts.length; i++) {
policies[i].registerThrowable(contexts[i], throwable);
}
((RetryContextSupport) context).registerThrowable(throwable);
}
|
java
|
@Override
public void registerThrowable(RetryContext context, Throwable throwable) {
RetryContext[] contexts = ((CompositeRetryContext) context).contexts;
RetryPolicy[] policies = ((CompositeRetryContext) context).policies;
for (int i = 0; i < contexts.length; i++) {
policies[i].registerThrowable(contexts[i], throwable);
}
((RetryContextSupport) context).registerThrowable(throwable);
}
|
[
"@",
"Override",
"public",
"void",
"registerThrowable",
"(",
"RetryContext",
"context",
",",
"Throwable",
"throwable",
")",
"{",
"RetryContext",
"[",
"]",
"contexts",
"=",
"(",
"(",
"CompositeRetryContext",
")",
"context",
")",
".",
"contexts",
";",
"RetryPolicy",
"[",
"]",
"policies",
"=",
"(",
"(",
"CompositeRetryContext",
")",
"context",
")",
".",
"policies",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"contexts",
".",
"length",
";",
"i",
"++",
")",
"{",
"policies",
"[",
"i",
"]",
".",
"registerThrowable",
"(",
"contexts",
"[",
"i",
"]",
",",
"throwable",
")",
";",
"}",
"(",
"(",
"RetryContextSupport",
")",
"context",
")",
".",
"registerThrowable",
"(",
"throwable",
")",
";",
"}"
] |
Delegate to the policies that were in operation when the context was created.
@see org.springframework.retry.RetryPolicy#close(org.springframework.retry.RetryContext)
|
[
"Delegate",
"to",
"the",
"policies",
"that",
"were",
"in",
"operation",
"when",
"the",
"context",
"was",
"created",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/policy/CompositeRetryPolicy.java#L138-L146
|
20,888
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/policy/ExceptionClassifierRetryPolicy.java
|
ExceptionClassifierRetryPolicy.setPolicyMap
|
public void setPolicyMap(Map<Class<? extends Throwable>, RetryPolicy> policyMap) {
this.exceptionClassifier = new SubclassClassifier<Throwable, RetryPolicy>(
policyMap, new NeverRetryPolicy());
}
|
java
|
public void setPolicyMap(Map<Class<? extends Throwable>, RetryPolicy> policyMap) {
this.exceptionClassifier = new SubclassClassifier<Throwable, RetryPolicy>(
policyMap, new NeverRetryPolicy());
}
|
[
"public",
"void",
"setPolicyMap",
"(",
"Map",
"<",
"Class",
"<",
"?",
"extends",
"Throwable",
">",
",",
"RetryPolicy",
">",
"policyMap",
")",
"{",
"this",
".",
"exceptionClassifier",
"=",
"new",
"SubclassClassifier",
"<",
"Throwable",
",",
"RetryPolicy",
">",
"(",
"policyMap",
",",
"new",
"NeverRetryPolicy",
"(",
")",
")",
";",
"}"
] |
Setter for policy map used to create a classifier. Either this property or the
exception classifier directly should be set, but not both.
@param policyMap a map of Throwable class to {@link RetryPolicy} that will be used
to create a {@link Classifier} to locate a policy.
|
[
"Setter",
"for",
"policy",
"map",
"used",
"to",
"create",
"a",
"classifier",
".",
"Either",
"this",
"property",
"or",
"the",
"exception",
"classifier",
"directly",
"should",
"be",
"set",
"but",
"not",
"both",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/policy/ExceptionClassifierRetryPolicy.java#L49-L52
|
20,889
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/policy/SimpleRetryPolicy.java
|
SimpleRetryPolicy.canRetry
|
@Override
public boolean canRetry(RetryContext context) {
Throwable t = context.getLastThrowable();
return (t == null || retryForException(t))
&& context.getRetryCount() < this.maxAttempts;
}
|
java
|
@Override
public boolean canRetry(RetryContext context) {
Throwable t = context.getLastThrowable();
return (t == null || retryForException(t))
&& context.getRetryCount() < this.maxAttempts;
}
|
[
"@",
"Override",
"public",
"boolean",
"canRetry",
"(",
"RetryContext",
"context",
")",
"{",
"Throwable",
"t",
"=",
"context",
".",
"getLastThrowable",
"(",
")",
";",
"return",
"(",
"t",
"==",
"null",
"||",
"retryForException",
"(",
"t",
")",
")",
"&&",
"context",
".",
"getRetryCount",
"(",
")",
"<",
"this",
".",
"maxAttempts",
";",
"}"
] |
Test for retryable operation based on the status.
@see org.springframework.retry.RetryPolicy#canRetry(org.springframework.retry.RetryContext)
@return true if the last exception was retryable and the number of attempts so far
is less than the limit.
|
[
"Test",
"for",
"retryable",
"operation",
"based",
"on",
"the",
"status",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/policy/SimpleRetryPolicy.java#L166-L171
|
20,890
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/policy/SimpleRetryPolicy.java
|
SimpleRetryPolicy.registerThrowable
|
@Override
public void registerThrowable(RetryContext context, Throwable throwable) {
SimpleRetryContext simpleContext = ((SimpleRetryContext) context);
simpleContext.registerThrowable(throwable);
}
|
java
|
@Override
public void registerThrowable(RetryContext context, Throwable throwable) {
SimpleRetryContext simpleContext = ((SimpleRetryContext) context);
simpleContext.registerThrowable(throwable);
}
|
[
"@",
"Override",
"public",
"void",
"registerThrowable",
"(",
"RetryContext",
"context",
",",
"Throwable",
"throwable",
")",
"{",
"SimpleRetryContext",
"simpleContext",
"=",
"(",
"(",
"SimpleRetryContext",
")",
"context",
")",
";",
"simpleContext",
".",
"registerThrowable",
"(",
"throwable",
")",
";",
"}"
] |
Update the status with another attempted retry and the latest exception.
@see RetryPolicy#registerThrowable(RetryContext, Throwable)
|
[
"Update",
"the",
"status",
"with",
"another",
"attempted",
"retry",
"and",
"the",
"latest",
"exception",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/policy/SimpleRetryPolicy.java#L185-L189
|
20,891
|
spring-projects/spring-retry
|
src/main/java/org/springframework/classify/BackToBackPatternClassifier.java
|
BackToBackPatternClassifier.classify
|
@Override
public T classify(C classifiable) {
return this.matcher.classify(this.router.classify(classifiable));
}
|
java
|
@Override
public T classify(C classifiable) {
return this.matcher.classify(this.router.classify(classifiable));
}
|
[
"@",
"Override",
"public",
"T",
"classify",
"(",
"C",
"classifiable",
")",
"{",
"return",
"this",
".",
"matcher",
".",
"classify",
"(",
"this",
".",
"router",
".",
"classify",
"(",
"classifiable",
")",
")",
";",
"}"
] |
Classify the input and map to a String, then take that and put it into a pattern
matcher to match to an output value.
|
[
"Classify",
"the",
"input",
"and",
"map",
"to",
"a",
"String",
"then",
"take",
"that",
"and",
"put",
"it",
"into",
"a",
"pattern",
"matcher",
"to",
"match",
"to",
"an",
"output",
"value",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/classify/BackToBackPatternClassifier.java#L78-L81
|
20,892
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/policy/NeverRetryPolicy.java
|
NeverRetryPolicy.registerThrowable
|
public void registerThrowable(RetryContext context, Throwable throwable) {
((NeverRetryContext) context).setFinished();
((RetryContextSupport) context).registerThrowable(throwable);
}
|
java
|
public void registerThrowable(RetryContext context, Throwable throwable) {
((NeverRetryContext) context).setFinished();
((RetryContextSupport) context).registerThrowable(throwable);
}
|
[
"public",
"void",
"registerThrowable",
"(",
"RetryContext",
"context",
",",
"Throwable",
"throwable",
")",
"{",
"(",
"(",
"NeverRetryContext",
")",
"context",
")",
".",
"setFinished",
"(",
")",
";",
"(",
"(",
"RetryContextSupport",
")",
"context",
")",
".",
"registerThrowable",
"(",
"throwable",
")",
";",
"}"
] |
Make the throwable available for downstream use through the context.
@see org.springframework.retry.RetryPolicy#registerThrowable(org.springframework.retry.RetryContext,
Throwable)
|
[
"Make",
"the",
"throwable",
"available",
"for",
"downstream",
"use",
"through",
"the",
"context",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/policy/NeverRetryPolicy.java#L67-L70
|
20,893
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/policy/ExpressionRetryPolicy.java
|
ExpressionRetryPolicy.getExpression
|
private static Expression getExpression(String expression) {
if (isTemplate(expression)) {
logger.warn("#{...} syntax is not required for this run-time expression "
+ "and is deprecated in favor of a simple expression string");
return new SpelExpressionParser().parseExpression(expression, PARSER_CONTEXT);
}
return new SpelExpressionParser().parseExpression(expression);
}
|
java
|
private static Expression getExpression(String expression) {
if (isTemplate(expression)) {
logger.warn("#{...} syntax is not required for this run-time expression "
+ "and is deprecated in favor of a simple expression string");
return new SpelExpressionParser().parseExpression(expression, PARSER_CONTEXT);
}
return new SpelExpressionParser().parseExpression(expression);
}
|
[
"private",
"static",
"Expression",
"getExpression",
"(",
"String",
"expression",
")",
"{",
"if",
"(",
"isTemplate",
"(",
"expression",
")",
")",
"{",
"logger",
".",
"warn",
"(",
"\"#{...} syntax is not required for this run-time expression \"",
"+",
"\"and is deprecated in favor of a simple expression string\"",
")",
";",
"return",
"new",
"SpelExpressionParser",
"(",
")",
".",
"parseExpression",
"(",
"expression",
",",
"PARSER_CONTEXT",
")",
";",
"}",
"return",
"new",
"SpelExpressionParser",
"(",
")",
".",
"parseExpression",
"(",
"expression",
")",
";",
"}"
] |
Get expression based on the expression string. At the moment supports both literal
and template expressions. Template expressions are deprecated.
@param expression the expression string
@return literal expression or template expression
|
[
"Get",
"expression",
"based",
"on",
"the",
"expression",
"string",
".",
"At",
"the",
"moment",
"supports",
"both",
"literal",
"and",
"template",
"expressions",
".",
"Template",
"expressions",
"are",
"deprecated",
"."
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/policy/ExpressionRetryPolicy.java#L130-L137
|
20,894
|
spring-projects/spring-retry
|
src/main/java/org/springframework/retry/policy/ExpressionRetryPolicy.java
|
ExpressionRetryPolicy.isTemplate
|
private static boolean isTemplate(String expression) {
return expression.contains(PARSER_CONTEXT.getExpressionPrefix())
&& expression.contains(PARSER_CONTEXT.getExpressionSuffix());
}
|
java
|
private static boolean isTemplate(String expression) {
return expression.contains(PARSER_CONTEXT.getExpressionPrefix())
&& expression.contains(PARSER_CONTEXT.getExpressionSuffix());
}
|
[
"private",
"static",
"boolean",
"isTemplate",
"(",
"String",
"expression",
")",
"{",
"return",
"expression",
".",
"contains",
"(",
"PARSER_CONTEXT",
".",
"getExpressionPrefix",
"(",
")",
")",
"&&",
"expression",
".",
"contains",
"(",
"PARSER_CONTEXT",
".",
"getExpressionSuffix",
"(",
")",
")",
";",
"}"
] |
Check if the expression is a template
@param expression the expression string
@return true if the expression string is a template
|
[
"Check",
"if",
"the",
"expression",
"is",
"a",
"template"
] |
e2b0555f96594c2321990d0deeac45fc44d4f123
|
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/policy/ExpressionRetryPolicy.java#L144-L147
|
20,895
|
joelittlejohn/jsonschema2pojo
|
jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/Jsonschema2Pojo.java
|
Jsonschema2Pojo.generate
|
public static void generate(GenerationConfig config) throws IOException {
Annotator annotator = getAnnotator(config);
RuleFactory ruleFactory = createRuleFactory(config);
ruleFactory.setAnnotator(annotator);
ruleFactory.setGenerationConfig(config);
ruleFactory.setSchemaStore(new SchemaStore(createContentResolver(config)));
SchemaMapper mapper = new SchemaMapper(ruleFactory, createSchemaGenerator(config));
JCodeModel codeModel = new JCodeModel();
if (config.isRemoveOldOutput()) {
removeOldOutput(config.getTargetDirectory());
}
for (Iterator<URL> sources = config.getSource(); sources.hasNext();) {
URL source = sources.next();
if (URLUtil.parseProtocol(source.toString()) == URLProtocol.FILE && URLUtil.getFileFromURL(source).isDirectory()) {
generateRecursive(config, mapper, codeModel, defaultString(config.getTargetPackage()), Arrays.asList(URLUtil.getFileFromURL(source).listFiles(config.getFileFilter())));
} else {
mapper.generate(codeModel, getNodeName(source, config), defaultString(config.getTargetPackage()), source);
}
}
if (config.getTargetDirectory().exists() || config.getTargetDirectory().mkdirs()) {
if (config.getTargetLanguage() == Language.SCALA) {
CodeWriter sourcesWriter = new ScalaFileCodeWriter(config.getTargetDirectory(), config.getOutputEncoding());
CodeWriter resourcesWriter = new FileCodeWriterWithEncoding(config.getTargetDirectory(), config.getOutputEncoding());
codeModel.build(sourcesWriter, resourcesWriter);
} else {
CodeWriter sourcesWriter = new FileCodeWriterWithEncoding(config.getTargetDirectory(), config.getOutputEncoding());
CodeWriter resourcesWriter = new FileCodeWriterWithEncoding(config.getTargetDirectory(), config.getOutputEncoding());
codeModel.build(sourcesWriter, resourcesWriter);
}
} else {
throw new GenerationException("Could not create or access target directory " + config.getTargetDirectory().getAbsolutePath());
}
}
|
java
|
public static void generate(GenerationConfig config) throws IOException {
Annotator annotator = getAnnotator(config);
RuleFactory ruleFactory = createRuleFactory(config);
ruleFactory.setAnnotator(annotator);
ruleFactory.setGenerationConfig(config);
ruleFactory.setSchemaStore(new SchemaStore(createContentResolver(config)));
SchemaMapper mapper = new SchemaMapper(ruleFactory, createSchemaGenerator(config));
JCodeModel codeModel = new JCodeModel();
if (config.isRemoveOldOutput()) {
removeOldOutput(config.getTargetDirectory());
}
for (Iterator<URL> sources = config.getSource(); sources.hasNext();) {
URL source = sources.next();
if (URLUtil.parseProtocol(source.toString()) == URLProtocol.FILE && URLUtil.getFileFromURL(source).isDirectory()) {
generateRecursive(config, mapper, codeModel, defaultString(config.getTargetPackage()), Arrays.asList(URLUtil.getFileFromURL(source).listFiles(config.getFileFilter())));
} else {
mapper.generate(codeModel, getNodeName(source, config), defaultString(config.getTargetPackage()), source);
}
}
if (config.getTargetDirectory().exists() || config.getTargetDirectory().mkdirs()) {
if (config.getTargetLanguage() == Language.SCALA) {
CodeWriter sourcesWriter = new ScalaFileCodeWriter(config.getTargetDirectory(), config.getOutputEncoding());
CodeWriter resourcesWriter = new FileCodeWriterWithEncoding(config.getTargetDirectory(), config.getOutputEncoding());
codeModel.build(sourcesWriter, resourcesWriter);
} else {
CodeWriter sourcesWriter = new FileCodeWriterWithEncoding(config.getTargetDirectory(), config.getOutputEncoding());
CodeWriter resourcesWriter = new FileCodeWriterWithEncoding(config.getTargetDirectory(), config.getOutputEncoding());
codeModel.build(sourcesWriter, resourcesWriter);
}
} else {
throw new GenerationException("Could not create or access target directory " + config.getTargetDirectory().getAbsolutePath());
}
}
|
[
"public",
"static",
"void",
"generate",
"(",
"GenerationConfig",
"config",
")",
"throws",
"IOException",
"{",
"Annotator",
"annotator",
"=",
"getAnnotator",
"(",
"config",
")",
";",
"RuleFactory",
"ruleFactory",
"=",
"createRuleFactory",
"(",
"config",
")",
";",
"ruleFactory",
".",
"setAnnotator",
"(",
"annotator",
")",
";",
"ruleFactory",
".",
"setGenerationConfig",
"(",
"config",
")",
";",
"ruleFactory",
".",
"setSchemaStore",
"(",
"new",
"SchemaStore",
"(",
"createContentResolver",
"(",
"config",
")",
")",
")",
";",
"SchemaMapper",
"mapper",
"=",
"new",
"SchemaMapper",
"(",
"ruleFactory",
",",
"createSchemaGenerator",
"(",
"config",
")",
")",
";",
"JCodeModel",
"codeModel",
"=",
"new",
"JCodeModel",
"(",
")",
";",
"if",
"(",
"config",
".",
"isRemoveOldOutput",
"(",
")",
")",
"{",
"removeOldOutput",
"(",
"config",
".",
"getTargetDirectory",
"(",
")",
")",
";",
"}",
"for",
"(",
"Iterator",
"<",
"URL",
">",
"sources",
"=",
"config",
".",
"getSource",
"(",
")",
";",
"sources",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"URL",
"source",
"=",
"sources",
".",
"next",
"(",
")",
";",
"if",
"(",
"URLUtil",
".",
"parseProtocol",
"(",
"source",
".",
"toString",
"(",
")",
")",
"==",
"URLProtocol",
".",
"FILE",
"&&",
"URLUtil",
".",
"getFileFromURL",
"(",
"source",
")",
".",
"isDirectory",
"(",
")",
")",
"{",
"generateRecursive",
"(",
"config",
",",
"mapper",
",",
"codeModel",
",",
"defaultString",
"(",
"config",
".",
"getTargetPackage",
"(",
")",
")",
",",
"Arrays",
".",
"asList",
"(",
"URLUtil",
".",
"getFileFromURL",
"(",
"source",
")",
".",
"listFiles",
"(",
"config",
".",
"getFileFilter",
"(",
")",
")",
")",
")",
";",
"}",
"else",
"{",
"mapper",
".",
"generate",
"(",
"codeModel",
",",
"getNodeName",
"(",
"source",
",",
"config",
")",
",",
"defaultString",
"(",
"config",
".",
"getTargetPackage",
"(",
")",
")",
",",
"source",
")",
";",
"}",
"}",
"if",
"(",
"config",
".",
"getTargetDirectory",
"(",
")",
".",
"exists",
"(",
")",
"||",
"config",
".",
"getTargetDirectory",
"(",
")",
".",
"mkdirs",
"(",
")",
")",
"{",
"if",
"(",
"config",
".",
"getTargetLanguage",
"(",
")",
"==",
"Language",
".",
"SCALA",
")",
"{",
"CodeWriter",
"sourcesWriter",
"=",
"new",
"ScalaFileCodeWriter",
"(",
"config",
".",
"getTargetDirectory",
"(",
")",
",",
"config",
".",
"getOutputEncoding",
"(",
")",
")",
";",
"CodeWriter",
"resourcesWriter",
"=",
"new",
"FileCodeWriterWithEncoding",
"(",
"config",
".",
"getTargetDirectory",
"(",
")",
",",
"config",
".",
"getOutputEncoding",
"(",
")",
")",
";",
"codeModel",
".",
"build",
"(",
"sourcesWriter",
",",
"resourcesWriter",
")",
";",
"}",
"else",
"{",
"CodeWriter",
"sourcesWriter",
"=",
"new",
"FileCodeWriterWithEncoding",
"(",
"config",
".",
"getTargetDirectory",
"(",
")",
",",
"config",
".",
"getOutputEncoding",
"(",
")",
")",
";",
"CodeWriter",
"resourcesWriter",
"=",
"new",
"FileCodeWriterWithEncoding",
"(",
"config",
".",
"getTargetDirectory",
"(",
")",
",",
"config",
".",
"getOutputEncoding",
"(",
")",
")",
";",
"codeModel",
".",
"build",
"(",
"sourcesWriter",
",",
"resourcesWriter",
")",
";",
"}",
"}",
"else",
"{",
"throw",
"new",
"GenerationException",
"(",
"\"Could not create or access target directory \"",
"+",
"config",
".",
"getTargetDirectory",
"(",
")",
".",
"getAbsolutePath",
"(",
")",
")",
";",
"}",
"}"
] |
Reads the contents of the given source and initiates schema generation.
@param config
the configuration options (including source and target paths,
and other behavioural options) that will control code
generation
@throws FileNotFoundException
if the source path is not found
@throws IOException
if the application is unable to read data from the source
|
[
"Reads",
"the",
"contents",
"of",
"the",
"given",
"source",
"and",
"initiates",
"schema",
"generation",
"."
] |
0552b80db93214eb186e4ae45b40866cc1e7eb84
|
https://github.com/joelittlejohn/jsonschema2pojo/blob/0552b80db93214eb186e4ae45b40866cc1e7eb84/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/Jsonschema2Pojo.java#L55-L94
|
20,896
|
joelittlejohn/jsonschema2pojo
|
jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/util/ReflectionHelper.java
|
ReflectionHelper.searchSuperClassesForField
|
public JFieldVar searchSuperClassesForField(String property, JDefinedClass jclass) {
JClass superClass = jclass._extends();
JDefinedClass definedSuperClass = definedClassOrNullFromType(superClass);
if (definedSuperClass == null) {
return null;
}
return searchClassAndSuperClassesForField(property, definedSuperClass);
}
|
java
|
public JFieldVar searchSuperClassesForField(String property, JDefinedClass jclass) {
JClass superClass = jclass._extends();
JDefinedClass definedSuperClass = definedClassOrNullFromType(superClass);
if (definedSuperClass == null) {
return null;
}
return searchClassAndSuperClassesForField(property, definedSuperClass);
}
|
[
"public",
"JFieldVar",
"searchSuperClassesForField",
"(",
"String",
"property",
",",
"JDefinedClass",
"jclass",
")",
"{",
"JClass",
"superClass",
"=",
"jclass",
".",
"_extends",
"(",
")",
";",
"JDefinedClass",
"definedSuperClass",
"=",
"definedClassOrNullFromType",
"(",
"superClass",
")",
";",
"if",
"(",
"definedSuperClass",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"searchClassAndSuperClassesForField",
"(",
"property",
",",
"definedSuperClass",
")",
";",
"}"
] |
This is recursive with searchClassAndSuperClassesForField
|
[
"This",
"is",
"recursive",
"with",
"searchClassAndSuperClassesForField"
] |
0552b80db93214eb186e4ae45b40866cc1e7eb84
|
https://github.com/joelittlejohn/jsonschema2pojo/blob/0552b80db93214eb186e4ae45b40866cc1e7eb84/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/util/ReflectionHelper.java#L83-L90
|
20,897
|
joelittlejohn/jsonschema2pojo
|
jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/ObjectRule.java
|
ObjectRule.createClass
|
private JDefinedClass createClass(String nodeName, JsonNode node, JPackage _package) throws ClassAlreadyExistsException {
JDefinedClass newType;
Annotator annotator = ruleFactory.getAnnotator();
try {
if (node.has("existingJavaType")) {
String fqn = substringBefore(node.get("existingJavaType").asText(), "<");
if (isPrimitive(fqn, _package.owner())) {
throw new ClassAlreadyExistsException(primitiveType(fqn, _package.owner()));
}
JClass existingClass = resolveType(_package, fqn + (node.get("existingJavaType").asText().contains("<") ? "<" + substringAfter(node.get("existingJavaType").asText(), "<") : ""));
throw new ClassAlreadyExistsException(existingClass);
}
boolean usePolymorphicDeserialization = annotator.isPolymorphicDeserializationSupported(node);
if (node.has("javaType")) {
String fqn = node.path("javaType").asText();
if (isPrimitive(fqn, _package.owner())) {
throw new GenerationException("javaType cannot refer to a primitive type (" + fqn + "), did you mean to use existingJavaType?");
}
if (fqn.contains("<")) {
throw new GenerationException("javaType does not support generic args (" + fqn + "), did you mean to use existingJavaType?");
}
int index = fqn.lastIndexOf(".") + 1;
if (index >= 0 && index < fqn.length()) {
fqn = fqn.substring(0, index) + ruleFactory.getGenerationConfig().getClassNamePrefix() + fqn.substring(index) + ruleFactory.getGenerationConfig().getClassNameSuffix();
}
if (usePolymorphicDeserialization) {
newType = _package.owner()._class(JMod.PUBLIC, fqn, ClassType.CLASS);
} else {
newType = _package.owner()._class(fqn);
}
} else {
if (usePolymorphicDeserialization) {
newType = _package._class(JMod.PUBLIC, ruleFactory.getNameHelper().getUniqueClassName(nodeName, node, _package), ClassType.CLASS);
} else {
newType = _package._class(ruleFactory.getNameHelper().getUniqueClassName(nodeName, node, _package));
}
}
} catch (JClassAlreadyExistsException e) {
throw new ClassAlreadyExistsException(e.getExistingClass());
}
annotator.typeInfo(newType, node);
annotator.propertyInclusion(newType, node);
return newType;
}
|
java
|
private JDefinedClass createClass(String nodeName, JsonNode node, JPackage _package) throws ClassAlreadyExistsException {
JDefinedClass newType;
Annotator annotator = ruleFactory.getAnnotator();
try {
if (node.has("existingJavaType")) {
String fqn = substringBefore(node.get("existingJavaType").asText(), "<");
if (isPrimitive(fqn, _package.owner())) {
throw new ClassAlreadyExistsException(primitiveType(fqn, _package.owner()));
}
JClass existingClass = resolveType(_package, fqn + (node.get("existingJavaType").asText().contains("<") ? "<" + substringAfter(node.get("existingJavaType").asText(), "<") : ""));
throw new ClassAlreadyExistsException(existingClass);
}
boolean usePolymorphicDeserialization = annotator.isPolymorphicDeserializationSupported(node);
if (node.has("javaType")) {
String fqn = node.path("javaType").asText();
if (isPrimitive(fqn, _package.owner())) {
throw new GenerationException("javaType cannot refer to a primitive type (" + fqn + "), did you mean to use existingJavaType?");
}
if (fqn.contains("<")) {
throw new GenerationException("javaType does not support generic args (" + fqn + "), did you mean to use existingJavaType?");
}
int index = fqn.lastIndexOf(".") + 1;
if (index >= 0 && index < fqn.length()) {
fqn = fqn.substring(0, index) + ruleFactory.getGenerationConfig().getClassNamePrefix() + fqn.substring(index) + ruleFactory.getGenerationConfig().getClassNameSuffix();
}
if (usePolymorphicDeserialization) {
newType = _package.owner()._class(JMod.PUBLIC, fqn, ClassType.CLASS);
} else {
newType = _package.owner()._class(fqn);
}
} else {
if (usePolymorphicDeserialization) {
newType = _package._class(JMod.PUBLIC, ruleFactory.getNameHelper().getUniqueClassName(nodeName, node, _package), ClassType.CLASS);
} else {
newType = _package._class(ruleFactory.getNameHelper().getUniqueClassName(nodeName, node, _package));
}
}
} catch (JClassAlreadyExistsException e) {
throw new ClassAlreadyExistsException(e.getExistingClass());
}
annotator.typeInfo(newType, node);
annotator.propertyInclusion(newType, node);
return newType;
}
|
[
"private",
"JDefinedClass",
"createClass",
"(",
"String",
"nodeName",
",",
"JsonNode",
"node",
",",
"JPackage",
"_package",
")",
"throws",
"ClassAlreadyExistsException",
"{",
"JDefinedClass",
"newType",
";",
"Annotator",
"annotator",
"=",
"ruleFactory",
".",
"getAnnotator",
"(",
")",
";",
"try",
"{",
"if",
"(",
"node",
".",
"has",
"(",
"\"existingJavaType\"",
")",
")",
"{",
"String",
"fqn",
"=",
"substringBefore",
"(",
"node",
".",
"get",
"(",
"\"existingJavaType\"",
")",
".",
"asText",
"(",
")",
",",
"\"<\"",
")",
";",
"if",
"(",
"isPrimitive",
"(",
"fqn",
",",
"_package",
".",
"owner",
"(",
")",
")",
")",
"{",
"throw",
"new",
"ClassAlreadyExistsException",
"(",
"primitiveType",
"(",
"fqn",
",",
"_package",
".",
"owner",
"(",
")",
")",
")",
";",
"}",
"JClass",
"existingClass",
"=",
"resolveType",
"(",
"_package",
",",
"fqn",
"+",
"(",
"node",
".",
"get",
"(",
"\"existingJavaType\"",
")",
".",
"asText",
"(",
")",
".",
"contains",
"(",
"\"<\"",
")",
"?",
"\"<\"",
"+",
"substringAfter",
"(",
"node",
".",
"get",
"(",
"\"existingJavaType\"",
")",
".",
"asText",
"(",
")",
",",
"\"<\"",
")",
":",
"\"\"",
")",
")",
";",
"throw",
"new",
"ClassAlreadyExistsException",
"(",
"existingClass",
")",
";",
"}",
"boolean",
"usePolymorphicDeserialization",
"=",
"annotator",
".",
"isPolymorphicDeserializationSupported",
"(",
"node",
")",
";",
"if",
"(",
"node",
".",
"has",
"(",
"\"javaType\"",
")",
")",
"{",
"String",
"fqn",
"=",
"node",
".",
"path",
"(",
"\"javaType\"",
")",
".",
"asText",
"(",
")",
";",
"if",
"(",
"isPrimitive",
"(",
"fqn",
",",
"_package",
".",
"owner",
"(",
")",
")",
")",
"{",
"throw",
"new",
"GenerationException",
"(",
"\"javaType cannot refer to a primitive type (\"",
"+",
"fqn",
"+",
"\"), did you mean to use existingJavaType?\"",
")",
";",
"}",
"if",
"(",
"fqn",
".",
"contains",
"(",
"\"<\"",
")",
")",
"{",
"throw",
"new",
"GenerationException",
"(",
"\"javaType does not support generic args (\"",
"+",
"fqn",
"+",
"\"), did you mean to use existingJavaType?\"",
")",
";",
"}",
"int",
"index",
"=",
"fqn",
".",
"lastIndexOf",
"(",
"\".\"",
")",
"+",
"1",
";",
"if",
"(",
"index",
">=",
"0",
"&&",
"index",
"<",
"fqn",
".",
"length",
"(",
")",
")",
"{",
"fqn",
"=",
"fqn",
".",
"substring",
"(",
"0",
",",
"index",
")",
"+",
"ruleFactory",
".",
"getGenerationConfig",
"(",
")",
".",
"getClassNamePrefix",
"(",
")",
"+",
"fqn",
".",
"substring",
"(",
"index",
")",
"+",
"ruleFactory",
".",
"getGenerationConfig",
"(",
")",
".",
"getClassNameSuffix",
"(",
")",
";",
"}",
"if",
"(",
"usePolymorphicDeserialization",
")",
"{",
"newType",
"=",
"_package",
".",
"owner",
"(",
")",
".",
"_class",
"(",
"JMod",
".",
"PUBLIC",
",",
"fqn",
",",
"ClassType",
".",
"CLASS",
")",
";",
"}",
"else",
"{",
"newType",
"=",
"_package",
".",
"owner",
"(",
")",
".",
"_class",
"(",
"fqn",
")",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"usePolymorphicDeserialization",
")",
"{",
"newType",
"=",
"_package",
".",
"_class",
"(",
"JMod",
".",
"PUBLIC",
",",
"ruleFactory",
".",
"getNameHelper",
"(",
")",
".",
"getUniqueClassName",
"(",
"nodeName",
",",
"node",
",",
"_package",
")",
",",
"ClassType",
".",
"CLASS",
")",
";",
"}",
"else",
"{",
"newType",
"=",
"_package",
".",
"_class",
"(",
"ruleFactory",
".",
"getNameHelper",
"(",
")",
".",
"getUniqueClassName",
"(",
"nodeName",
",",
"node",
",",
"_package",
")",
")",
";",
"}",
"}",
"}",
"catch",
"(",
"JClassAlreadyExistsException",
"e",
")",
"{",
"throw",
"new",
"ClassAlreadyExistsException",
"(",
"e",
".",
"getExistingClass",
"(",
")",
")",
";",
"}",
"annotator",
".",
"typeInfo",
"(",
"newType",
",",
"node",
")",
";",
"annotator",
".",
"propertyInclusion",
"(",
"newType",
",",
"node",
")",
";",
"return",
"newType",
";",
"}"
] |
Creates a new Java class that will be generated.
@param nodeName
the node name which may be used to dictate the new class name
@param node
the node representing the schema that caused the need for a
new class. This node may include a 'javaType' property which
if present will override the fully qualified name of the newly
generated class.
@param _package
the package which may contain a new class after this method
call
@return a reference to a newly created class
@throws ClassAlreadyExistsException
if the given arguments cause an attempt to create a class
that already exists, either on the classpath or in the
current map of classes to be generated.
|
[
"Creates",
"a",
"new",
"Java",
"class",
"that",
"will",
"be",
"generated",
"."
] |
0552b80db93214eb186e4ae45b40866cc1e7eb84
|
https://github.com/joelittlejohn/jsonschema2pojo/blob/0552b80db93214eb186e4ae45b40866cc1e7eb84/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/ObjectRule.java#L190-L247
|
20,898
|
joelittlejohn/jsonschema2pojo
|
jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/util/NameHelper.java
|
NameHelper.getPropertyName
|
public String getPropertyName(String jsonFieldName, JsonNode node) {
jsonFieldName = getFieldName(jsonFieldName, node);
jsonFieldName = replaceIllegalCharacters(jsonFieldName);
jsonFieldName = normalizeName(jsonFieldName);
jsonFieldName = makeLowerCamelCase(jsonFieldName);
if (isKeyword(jsonFieldName)) {
jsonFieldName = "_" + jsonFieldName;
}
if (isKeyword(jsonFieldName)) {
jsonFieldName += "_";
}
return jsonFieldName;
}
|
java
|
public String getPropertyName(String jsonFieldName, JsonNode node) {
jsonFieldName = getFieldName(jsonFieldName, node);
jsonFieldName = replaceIllegalCharacters(jsonFieldName);
jsonFieldName = normalizeName(jsonFieldName);
jsonFieldName = makeLowerCamelCase(jsonFieldName);
if (isKeyword(jsonFieldName)) {
jsonFieldName = "_" + jsonFieldName;
}
if (isKeyword(jsonFieldName)) {
jsonFieldName += "_";
}
return jsonFieldName;
}
|
[
"public",
"String",
"getPropertyName",
"(",
"String",
"jsonFieldName",
",",
"JsonNode",
"node",
")",
"{",
"jsonFieldName",
"=",
"getFieldName",
"(",
"jsonFieldName",
",",
"node",
")",
";",
"jsonFieldName",
"=",
"replaceIllegalCharacters",
"(",
"jsonFieldName",
")",
";",
"jsonFieldName",
"=",
"normalizeName",
"(",
"jsonFieldName",
")",
";",
"jsonFieldName",
"=",
"makeLowerCamelCase",
"(",
"jsonFieldName",
")",
";",
"if",
"(",
"isKeyword",
"(",
"jsonFieldName",
")",
")",
"{",
"jsonFieldName",
"=",
"\"_\"",
"+",
"jsonFieldName",
";",
"}",
"if",
"(",
"isKeyword",
"(",
"jsonFieldName",
")",
")",
"{",
"jsonFieldName",
"+=",
"\"_\"",
";",
"}",
"return",
"jsonFieldName",
";",
"}"
] |
Convert jsonFieldName into the equivalent Java fieldname by replacing
illegal characters and normalizing it.
@param jsonFieldName
@param node
@return
|
[
"Convert",
"jsonFieldName",
"into",
"the",
"equivalent",
"Java",
"fieldname",
"by",
"replacing",
"illegal",
"characters",
"and",
"normalizing",
"it",
"."
] |
0552b80db93214eb186e4ae45b40866cc1e7eb84
|
https://github.com/joelittlejohn/jsonschema2pojo/blob/0552b80db93214eb186e4ae45b40866cc1e7eb84/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/util/NameHelper.java#L103-L119
|
20,899
|
joelittlejohn/jsonschema2pojo
|
jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/util/NameHelper.java
|
NameHelper.getSetterName
|
public String getSetterName(String propertyName, JsonNode node) {
propertyName = getPropertyNameForAccessor(propertyName, node);
String prefix = "set";
String setterName;
if (propertyName.length() > 1 && Character.isUpperCase(propertyName.charAt(1))) {
setterName = prefix + propertyName;
} else {
setterName = prefix + capitalize(propertyName);
}
if (setterName.equals("setClass")) {
setterName = "setClass_";
}
return setterName;
}
|
java
|
public String getSetterName(String propertyName, JsonNode node) {
propertyName = getPropertyNameForAccessor(propertyName, node);
String prefix = "set";
String setterName;
if (propertyName.length() > 1 && Character.isUpperCase(propertyName.charAt(1))) {
setterName = prefix + propertyName;
} else {
setterName = prefix + capitalize(propertyName);
}
if (setterName.equals("setClass")) {
setterName = "setClass_";
}
return setterName;
}
|
[
"public",
"String",
"getSetterName",
"(",
"String",
"propertyName",
",",
"JsonNode",
"node",
")",
"{",
"propertyName",
"=",
"getPropertyNameForAccessor",
"(",
"propertyName",
",",
"node",
")",
";",
"String",
"prefix",
"=",
"\"set\"",
";",
"String",
"setterName",
";",
"if",
"(",
"propertyName",
".",
"length",
"(",
")",
">",
"1",
"&&",
"Character",
".",
"isUpperCase",
"(",
"propertyName",
".",
"charAt",
"(",
"1",
")",
")",
")",
"{",
"setterName",
"=",
"prefix",
"+",
"propertyName",
";",
"}",
"else",
"{",
"setterName",
"=",
"prefix",
"+",
"capitalize",
"(",
"propertyName",
")",
";",
"}",
"if",
"(",
"setterName",
".",
"equals",
"(",
"\"setClass\"",
")",
")",
"{",
"setterName",
"=",
"\"setClass_\"",
";",
"}",
"return",
"setterName",
";",
"}"
] |
Generate setter method name for property.
@param propertyName
@param node
@return
|
[
"Generate",
"setter",
"method",
"name",
"for",
"property",
"."
] |
0552b80db93214eb186e4ae45b40866cc1e7eb84
|
https://github.com/joelittlejohn/jsonschema2pojo/blob/0552b80db93214eb186e4ae45b40866cc1e7eb84/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/util/NameHelper.java#L128-L145
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.