idx
int64
0
41.2k
question
stringlengths
74
4.21k
target
stringlengths
5
888
30,400
public void saveIfExists ( T object ) throws ConditionalCheckFailedException { final DynamoDBSaveExpression saveExpression = new DynamoDBSaveExpression ( ) ; for ( final DynamoDBMapperFieldModel < T , Object > key : model . keys ( ) ) { saveExpression . withExpectedEntry ( key . name ( ) , new ExpectedAttributeValue ( ) . withExists ( true ) . withValue ( key . convert ( key . get ( object ) ) ) ) ; } mapper . < T > save ( object , saveExpression ) ; }
Saves the object given into DynamoDB with the condition that the hash and if applicable the range key already exist .
30,401
public void deleteIfExists ( T object ) throws ConditionalCheckFailedException { final DynamoDBDeleteExpression deleteExpression = new DynamoDBDeleteExpression ( ) ; for ( final DynamoDBMapperFieldModel < T , Object > key : model . keys ( ) ) { deleteExpression . withExpectedEntry ( key . name ( ) , new ExpectedAttributeValue ( ) . withExists ( true ) . withValue ( key . convert ( key . get ( object ) ) ) ) ; } mapper . delete ( object , deleteExpression ) ; }
Deletes the given object from its DynamoDB table with the condition that the hash and if applicable the range key already exist .
30,402
public int count ( DynamoDBQueryExpression < T > queryExpression ) { return mapper . < T > count ( model . targetType ( ) , queryExpression ) ; }
Evaluates the specified query expression and returns the count of matching items without returning any of the actual item data
30,403
public PaginatedQueryList < T > query ( DynamoDBQueryExpression < T > queryExpression ) { return mapper . < T > query ( model . targetType ( ) , queryExpression ) ; }
Queries an Amazon DynamoDB table and returns the matching results as an unmodifiable list of instantiated objects .
30,404
public QueryResultPage < T > queryPage ( DynamoDBQueryExpression < T > queryExpression ) { return mapper . < T > queryPage ( model . targetType ( ) , queryExpression ) ; }
Queries an Amazon DynamoDB table and returns a single page of matching results .
30,405
public PaginatedScanList < T > scan ( DynamoDBScanExpression scanExpression ) { return mapper . < T > scan ( model . targetType ( ) , scanExpression ) ; }
Scans through an Amazon DynamoDB table and returns the matching results as an unmodifiable list of instantiated objects .
30,406
public ScanResultPage < T > scanPage ( DynamoDBScanExpression scanExpression ) { return mapper . < T > scanPage ( model . targetType ( ) , scanExpression ) ; }
Scans through an Amazon DynamoDB table and returns a single page of matching results .
30,407
public PaginatedParallelScanList < T > parallelScan ( DynamoDBScanExpression scanExpression , int totalSegments ) { return mapper . < T > parallelScan ( model . targetType ( ) , scanExpression , totalSegments ) ; }
Scans through an Amazon DynamoDB table on logically partitioned segments in parallel and returns the matching results in one unmodifiable list of instantiated objects .
30,408
public TableDescription describeTable ( ) { return db . describeTable ( mapper . getTableName ( model . targetType ( ) , config ) ) . getTable ( ) ; }
Returns information about the table including the current status of the table when it was created the primary key schema and any indexes on the table .
30,409
public TableDescription createTable ( ProvisionedThroughput throughput ) { final CreateTableRequest request = mapper . generateCreateTableRequest ( model . targetType ( ) ) ; request . setProvisionedThroughput ( throughput ) ; if ( request . getGlobalSecondaryIndexes ( ) != null ) { for ( final GlobalSecondaryIndex gsi : request . getGlobalSecondaryIndexes ( ) ) { gsi . setProvisionedThroughput ( throughput ) ; } } return db . createTable ( request ) . getTableDescription ( ) ; }
Creates the table with the specified throughput ; also populates the same throughput for all global secondary indexes .
30,410
public EventsResponse withResults ( java . util . Map < String , ItemResponse > results ) { setResults ( results ) ; return this ; }
A map that contains a multipart response for each endpoint . Each item in this object uses the endpoint ID as the key and the item response as the value .
30,411
static ConfirmSubscriptionResult confirmSubscription ( HttpClient httpClient , String subscribeUrl ) { try { HttpGet request = new HttpGet ( subscribeUrl ) ; HttpResponse response = httpClient . execute ( request ) ; if ( ApacheUtils . isRequestSuccessful ( response ) ) { return new StaxResponseHandler < ConfirmSubscriptionResult > ( ConfirmSubscriptionResultStaxUnmarshaller . getInstance ( ) ) . handle ( ApacheUtils . createResponse ( null , request , response , null ) ) . getResult ( ) ; } else { throw new HttpException ( "Could not confirm subscription" , response ) ; } } catch ( Exception e ) { throw new SdkClientException ( e ) ; } }
Confirms a subscription by visiting the provided URL .
30,412
public java . util . concurrent . Future < DescribeFileSystemsResult > describeFileSystemsAsync ( com . amazonaws . handlers . AsyncHandler < DescribeFileSystemsRequest , DescribeFileSystemsResult > asyncHandler ) { return describeFileSystemsAsync ( new DescribeFileSystemsRequest ( ) , asyncHandler ) ; }
Simplified method form for invoking the DescribeFileSystems operation with an AsyncHandler .
30,413
public boolean isNull ( String attrName ) { return attributes . containsKey ( attrName ) && attributes . get ( attrName ) == null ; }
Returns true if the specified attribute exists with a null value ; false otherwise .
30,414
public String getString ( String attrName ) { Object val = attributes . get ( attrName ) ; return valToString ( val ) ; }
Returns the value of the specified attribute in the current item as a string ; or null if the attribute either doesn t exist or the attribute value is null .
30,415
public Item withString ( String attrName , String val ) { checkInvalidAttribute ( attrName , val ) ; attributes . put ( attrName , val ) ; return this ; }
Sets the value of the specified attribute in the current item to the given string value .
30,416
public byte [ ] getBinary ( String attrName ) { Object val = attributes . get ( attrName ) ; return toByteArray ( val ) ; }
Returns the value of the specified attribute in the current item as a byte array ; or null if the attribute either doesn t exist or the attribute value is null .
30,417
private byte [ ] toByteArray ( Object val ) { if ( val == null ) return null ; if ( val instanceof byte [ ] ) return ( byte [ ] ) val ; if ( val instanceof ByteBuffer ) { return copyAllBytesFrom ( ( ByteBuffer ) val ) ; } throw new IncompatibleTypeException ( val . getClass ( ) + " cannot be converted into a byte array" ) ; }
This method is assumed to be only called from a getter method but NOT from a setter method .
30,418
public final void configureRegion ( Regions region ) { checkMutability ( ) ; if ( region == null ) throw new IllegalArgumentException ( "No region provided" ) ; this . setRegion ( Region . getRegion ( region ) ) ; }
Convenient method for setting region .
30,419
public void removeRequestHandler ( RequestHandler requestHandler ) { checkMutability ( ) ; requestHandler2s . remove ( RequestHandler2 . adapt ( requestHandler ) ) ; }
Removes a request handler from the list of registered handlers that are run as part of a request s lifecycle .
30,420
protected final boolean isRequestMetricsEnabled ( AmazonWebServiceRequest req ) { RequestMetricCollector c = req . getRequestMetricCollector ( ) ; if ( c != null && c . isEnabled ( ) ) { return true ; } return isRMCEnabledAtClientOrSdkLevel ( ) ; }
Returns true if request metric collection is applicable to the given request ; false otherwise .
30,421
protected RequestMetricCollector requestMetricCollector ( ) { RequestMetricCollector mc = client . getRequestMetricCollector ( ) ; return mc == null ? AwsSdkMetrics . getRequestMetricCollector ( ) : mc ; }
Returns the client specific request metric collector if there is one ; or the one at the AWS SDK level otherwise .
30,422
protected final < T extends AmazonWebServiceRequest > T beforeClientExecution ( T request ) { T local = request ; for ( RequestHandler2 handler : requestHandler2s ) { local = ( T ) handler . beforeExecution ( local ) ; } return local ; }
Notify request handlers that we are about to start execution .
30,423
public final void setSignerRegionOverride ( String signerRegionOverride ) { checkMutability ( ) ; Signer signer = computeSignerByURI ( endpoint , signerRegionOverride , true ) ; synchronized ( this ) { this . signerRegionOverride = signerRegionOverride ; this . signerProvider = createSignerProvider ( signer ) ; this . signingRegion = signerRegionOverride ; } }
An internal method used to explicitly override the internal signer region computed by the default implementation . This method is not expected to be normally called except for AWS internal development purposes .
30,424
public < T extends AmazonWebServiceClient > T withRegion ( Regions region ) { configureRegion ( region ) ; @ SuppressWarnings ( "unchecked" ) T t = ( T ) this ; return t ; }
Convenient fluent method for setting region .
30,425
public static void modifyOrInsertProfiles ( File destination , Profile ... profiles ) { final Map < String , Profile > modifications = new LinkedHashMap < String , Profile > ( ) ; for ( Profile profile : profiles ) { modifications . put ( profile . getProfileName ( ) , profile ) ; } modifyProfiles ( destination , modifications ) ; }
Modify or insert new profiles into an existing credentials file by in - place modification . Only the properties of the affected profiles will be modified ; all the unaffected profiles and comment lines will remain the same . This method does not support renaming a profile .
30,426
public static void modifyOneProfile ( File destination , String profileName , Profile newProfile ) { final Map < String , Profile > modifications = Collections . singletonMap ( profileName , newProfile ) ; modifyProfiles ( destination , modifications ) ; }
Modify one profile in the existing credentials file by in - place modification . This method will rename the existing profile if the specified Profile has a different name .
30,427
public static void deleteProfiles ( File destination , String ... profileNames ) { final Map < String , Profile > modifications = new LinkedHashMap < String , Profile > ( ) ; for ( String profileName : profileNames ) { modifications . put ( profileName , null ) ; } modifyProfiles ( destination , modifications ) ; }
Remove one or more profiles from the existing credentials file by in - place modification .
30,428
static void modifyProfiles ( File destination , Map < String , Profile > modifications ) { final boolean inPlaceModify = destination . exists ( ) ; File stashLocation = null ; if ( inPlaceModify ) { boolean stashed = false ; try { stashLocation = new File ( destination . getParentFile ( ) , destination . getName ( ) + ".bak." + UUID . randomUUID ( ) . toString ( ) ) ; stashed = destination . renameTo ( stashLocation ) ; if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( String . format ( "The original credentials file is stashed to loaction (%s)." , stashLocation . getAbsolutePath ( ) ) ) ; } } finally { if ( ! stashed ) { throw new SdkClientException ( "Failed to stash the existing credentials file " + "before applying the changes." ) ; } } } OutputStreamWriter writer = null ; try { writer = new OutputStreamWriter ( new FileOutputStream ( destination ) , StringUtils . UTF8 ) ; ProfilesConfigFileWriterHelper writerHelper = new ProfilesConfigFileWriterHelper ( writer , modifications ) ; if ( inPlaceModify ) { Scanner existingContent = new Scanner ( stashLocation , StringUtils . UTF8 . name ( ) ) ; writerHelper . writeWithExistingContent ( existingContent ) ; } else { writerHelper . writeWithoutExistingContent ( ) ; } new ProfilesConfigFile ( destination ) ; if ( inPlaceModify && ! stashLocation . delete ( ) ) { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( String . format ( "Successfully modified the credentials file. But failed to " + "delete the stashed copy of the original file (%s)." , stashLocation . getAbsolutePath ( ) ) ) ; } } } catch ( Exception e ) { if ( inPlaceModify ) { boolean restored = false ; try { if ( ! destination . delete ( ) ) { LOG . debug ( "Unable to remove the credentials file " + "before restoring the original one." ) ; } restored = stashLocation . renameTo ( destination ) ; } finally { if ( ! restored ) { throw new SdkClientException ( "Unable to restore the original credentials file. " + "File content stashed in " + stashLocation . getAbsolutePath ( ) ) ; } } } throw new SdkClientException ( "Unable to modify the credentials file. " + "(The original file has been restored.)" , e ) ; } finally { try { if ( writer != null ) writer . close ( ) ; } catch ( IOException e ) { } } }
A package - private method that supports all kinds of profile modification including renaming or deleting one or more profiles .
30,429
public DeleteMarkerReplication withStatus ( DeleteMarkerReplicationStatus status ) { setStatus ( status == null ? null : status . toString ( ) ) ; return this ; }
Sets the replication status for delete markers . Delete markers are not replicated if status is Disabled .
30,430
public AndCondition and ( Condition that ) { return new AndCondition ( this , that . atomic ( ) ? that : _ ( that ) ) ; }
Returns a new condition based on the conjunction of the current condition and the given condition .
30,431
public OrCondition or ( Condition that ) { return new OrCondition ( this , that . atomic ( ) ? that : _ ( that ) ) ; }
Returns a new condition based on the disjunction of the current condition and the given condition .
30,432
private void marshallBinaryPayload ( Object val ) { if ( val instanceof ByteBuffer ) { request . setContent ( BinaryUtils . toStream ( ( ByteBuffer ) val ) ) ; } else if ( val instanceof InputStream ) { request . setContent ( ( InputStream ) val ) ; } }
Binary data should be placed as is directly into the content .
30,433
protected String signAndBase64Encode ( String data , String key , SigningAlgorithm algorithm ) throws SdkClientException { return signAndBase64Encode ( data . getBytes ( UTF8 ) , key , algorithm ) ; }
Computes an RFC 2104 - compliant HMAC signature and returns the result as a Base64 encoded string .
30,434
protected String signAndBase64Encode ( byte [ ] data , String key , SigningAlgorithm algorithm ) throws SdkClientException { try { byte [ ] signature = sign ( data , key . getBytes ( UTF8 ) , algorithm ) ; return Base64 . encodeAsString ( signature ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to calculate a request signature: " + e . getMessage ( ) , e ) ; } }
Computes an RFC 2104 - compliant HMAC signature for an array of bytes and returns the result as a Base64 encoded string .
30,435
public byte [ ] hash ( byte [ ] data ) throws SdkClientException { try { MessageDigest md = getMessageDigestInstance ( ) ; md . update ( data ) ; return md . digest ( ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to compute hash while signing request: " + e . getMessage ( ) , e ) ; } }
Hashes the binary data using the SHA - 256 algorithm .
30,436
protected byte [ ] getBinaryRequestPayload ( SignableRequest < ? > request ) { if ( SdkHttpUtils . usePayloadForQueryParameters ( request ) ) { String encodedParameters = SdkHttpUtils . encodeParameters ( request ) ; if ( encodedParameters == null ) return new byte [ 0 ] ; return encodedParameters . getBytes ( UTF8 ) ; } return getBinaryRequestPayloadWithoutQueryParams ( request ) ; }
Returns the request s payload as binary data .
30,437
protected int getTimeOffset ( SignableRequest < ? > request ) { final int globleOffset = SDKGlobalTime . getGlobalTimeOffset ( ) ; return globleOffset == 0 ? request . getTimeOffset ( ) : globleOffset ; }
Returns the time offset in seconds .
30,438
public CreateConfigurationSetResult createConfigurationSet ( CreateConfigurationSetRequest request ) { request = beforeClientExecution ( request ) ; return executeCreateConfigurationSet ( request ) ; }
Create a new configuration set . After you create the configuration set you can add one or more event destinations to it .
30,439
public CreateConfigurationSetEventDestinationResult createConfigurationSetEventDestination ( CreateConfigurationSetEventDestinationRequest request ) { request = beforeClientExecution ( request ) ; return executeCreateConfigurationSetEventDestination ( request ) ; }
Create a new event destination in a configuration set .
30,440
public DeleteConfigurationSetResult deleteConfigurationSet ( DeleteConfigurationSetRequest request ) { request = beforeClientExecution ( request ) ; return executeDeleteConfigurationSet ( request ) ; }
Deletes an existing configuration set .
30,441
public DeleteConfigurationSetEventDestinationResult deleteConfigurationSetEventDestination ( DeleteConfigurationSetEventDestinationRequest request ) { request = beforeClientExecution ( request ) ; return executeDeleteConfigurationSetEventDestination ( request ) ; }
Deletes an event destination in a configuration set .
30,442
public ListConfigurationSetsResult listConfigurationSets ( ListConfigurationSetsRequest request ) { request = beforeClientExecution ( request ) ; return executeListConfigurationSets ( request ) ; }
List all of the configuration sets associated with your Amazon Pinpoint account in the current region .
30,443
public SendVoiceMessageResult sendVoiceMessage ( SendVoiceMessageRequest request ) { request = beforeClientExecution ( request ) ; return executeSendVoiceMessage ( request ) ; }
Create a new voice message and send it to a recipient s phone number .
30,444
public UpdateConfigurationSetEventDestinationResult updateConfigurationSetEventDestination ( UpdateConfigurationSetEventDestinationRequest request ) { request = beforeClientExecution ( request ) ; return executeUpdateConfigurationSetEventDestination ( request ) ; }
Update an event destination in a configuration set . An event destination is a location that you publish information about your voice calls to . For example you can log an event to an Amazon CloudWatch destination when a call fails .
30,445
public void setCaptionLanguageMappings ( java . util . Collection < CaptionLanguageMapping > captionLanguageMappings ) { if ( captionLanguageMappings == null ) { this . captionLanguageMappings = null ; return ; } this . captionLanguageMappings = new java . util . ArrayList < CaptionLanguageMapping > ( captionLanguageMappings ) ; }
Mapping of up to 4 caption channels to caption languages . Is only meaningful if captionLanguageSetting is set to insert .
30,446
private static String parseVersionId ( String query ) { if ( query != null ) { String [ ] params = VERSION_ID_PATTERN . split ( query ) ; for ( String param : params ) { if ( param . startsWith ( "versionId=" ) ) { return decode ( param . substring ( 10 ) ) ; } } } return null ; }
Attempts to parse a versionId parameter from the query string .
30,447
private static String preprocessUrlStr ( final String str , final boolean encode ) { if ( encode ) { try { return ( URLEncoder . encode ( str , "UTF-8" ) . replace ( "%3A" , ":" ) . replace ( "%2F" , "/" ) . replace ( "+" , "%20" ) ) ; } catch ( UnsupportedEncodingException e ) { throw new RuntimeException ( e ) ; } } return str ; }
URL encodes the given string . This allows us to pass special characters that would otherwise be rejected when building a URI instance . Because we need to retain the URI s path structure we subsequently need to replace percent encoded path delimiters back to their decoded counterparts .
30,448
private static String decode ( final String str ) { if ( str == null ) { return null ; } for ( int i = 0 ; i < str . length ( ) ; ++ i ) { if ( str . charAt ( i ) == '%' ) { return decode ( str , i ) ; } } return str ; }
Percent - decodes the given string with a fast path for strings that are not percent - encoded .
30,449
private static String decode ( final String str , final int firstPercent ) { StringBuilder builder = new StringBuilder ( ) ; builder . append ( str . substring ( 0 , firstPercent ) ) ; appendDecoded ( builder , str , firstPercent ) ; for ( int i = firstPercent + 3 ; i < str . length ( ) ; ++ i ) { if ( str . charAt ( i ) == '%' ) { appendDecoded ( builder , str , i ) ; i += 2 ; } else { builder . append ( str . charAt ( i ) ) ; } } return builder . toString ( ) ; }
Percent - decodes the given string .
30,450
private static File createSampleFile ( ) throws IOException { File file = File . createTempFile ( "aws-java-sdk-" , ".txt" ) ; file . deleteOnExit ( ) ; Writer writer = new OutputStreamWriter ( new FileOutputStream ( file ) ) ; writer . write ( "abcdefghijklmnopqrstuvwxyz\n" ) ; writer . write ( "01234567890112345678901234\n" ) ; writer . write ( "!@#$%^&*()-=[]{};':',.<>/?\n" ) ; writer . write ( "01234567890112345678901234\n" ) ; writer . write ( "abcdefghijklmnopqrstuvwxyz\n" ) ; writer . close ( ) ; return file ; }
Creates a temporary file with text data to demonstrate uploading a file to Amazon S3
30,451
private static void displayTextInputStream ( InputStream input ) throws IOException { BufferedReader reader = new BufferedReader ( new InputStreamReader ( input ) ) ; while ( true ) { String line = reader . readLine ( ) ; if ( line == null ) break ; System . out . println ( " " + line ) ; } System . out . println ( ) ; }
Displays the contents of the specified input stream as text .
30,452
@ SuppressWarnings ( "unchecked" ) public < H > DynamoDBMapperFieldModel < T , H > hashKey ( ) { final DynamoDBMapperFieldModel < T , H > field = ( DynamoDBMapperFieldModel < T , H > ) keys . get ( HASH ) ; if ( field == null ) { throw new DynamoDBMappingException ( targetType . getSimpleName ( ) + "; no mapping for HASH key" ) ; } return field ; }
Gets the hash key field model for the specified type .
30,453
public Collection < GlobalSecondaryIndex > globalSecondaryIndexes ( ) { if ( globalSecondaryIndexes . isEmpty ( ) ) { return null ; } final Collection < GlobalSecondaryIndex > copies = new ArrayList < GlobalSecondaryIndex > ( globalSecondaryIndexes . size ( ) ) ; for ( final String indexName : globalSecondaryIndexes . keySet ( ) ) { copies . add ( globalSecondaryIndex ( indexName ) ) ; } return copies ; }
Gets the global secondary indexes for the given class .
30,454
public GlobalSecondaryIndex globalSecondaryIndex ( final String indexName ) { if ( ! globalSecondaryIndexes . containsKey ( indexName ) ) { return null ; } final GlobalSecondaryIndex gsi = globalSecondaryIndexes . get ( indexName ) ; final GlobalSecondaryIndex copy = new GlobalSecondaryIndex ( ) . withIndexName ( gsi . getIndexName ( ) ) ; copy . withProjection ( new Projection ( ) . withProjectionType ( gsi . getProjection ( ) . getProjectionType ( ) ) ) ; for ( final KeySchemaElement key : gsi . getKeySchema ( ) ) { copy . withKeySchema ( new KeySchemaElement ( key . getAttributeName ( ) , key . getKeyType ( ) ) ) ; } return copy ; }
Gets the global secondary index .
30,455
public Collection < LocalSecondaryIndex > localSecondaryIndexes ( ) { if ( localSecondaryIndexes . isEmpty ( ) ) { return null ; } final Collection < LocalSecondaryIndex > copies = new ArrayList < LocalSecondaryIndex > ( localSecondaryIndexes . size ( ) ) ; for ( final String indexName : localSecondaryIndexes . keySet ( ) ) { copies . add ( localSecondaryIndex ( indexName ) ) ; } return copies ; }
Gets the local secondary indexes for the given class .
30,456
public LocalSecondaryIndex localSecondaryIndex ( final String indexName ) { if ( ! localSecondaryIndexes . containsKey ( indexName ) ) { return null ; } final LocalSecondaryIndex lsi = localSecondaryIndexes . get ( indexName ) ; final LocalSecondaryIndex copy = new LocalSecondaryIndex ( ) . withIndexName ( lsi . getIndexName ( ) ) ; copy . withProjection ( new Projection ( ) . withProjectionType ( lsi . getProjection ( ) . getProjectionType ( ) ) ) ; for ( final KeySchemaElement key : lsi . getKeySchema ( ) ) { copy . withKeySchema ( new KeySchemaElement ( key . getAttributeName ( ) , key . getKeyType ( ) ) ) ; } return copy ; }
Gets the local secondary index by name .
30,457
public < H , R > T createKey ( final H hashKey , final R rangeKey ) { final T key = StandardBeanProperties . DeclaringReflect . < T > newInstance ( targetType ) ; if ( hashKey != null ) { final DynamoDBMapperFieldModel < T , H > hk = hashKey ( ) ; hk . set ( key , hashKey ) ; } if ( rangeKey != null ) { final DynamoDBMapperFieldModel < T , R > rk = rangeKey ( ) ; rk . set ( key , rangeKey ) ; } return key ; }
Creates a new object instance with the keys populated .
30,458
public < H , R > Map < String , AttributeValue > convertKey ( final T key ) { final DynamoDBMapperFieldModel < T , H > hk = this . < H > hashKey ( ) ; final DynamoDBMapperFieldModel < T , R > rk = this . < R > rangeKeyIfExists ( ) ; return this . < H , R > convertKey ( hk . get ( key ) , ( rk == null ? ( R ) null : rk . get ( key ) ) ) ; }
Creates a new key map from the specified object .
30,459
public < H , R > Map < String , AttributeValue > convertKey ( final H hashKey , final R rangeKey ) { final Map < String , AttributeValue > key = new LinkedHashMap < String , AttributeValue > ( 4 ) ; final DynamoDBMapperFieldModel < T , H > hk = this . < H > hashKey ( ) ; final AttributeValue hkValue = hashKey == null ? null : hk . convert ( hashKey ) ; if ( hkValue != null ) { key . put ( hk . name ( ) , hkValue ) ; } else { throw new DynamoDBMappingException ( targetType . getSimpleName ( ) + "[" + hk . name ( ) + "]; no HASH key value present" ) ; } final DynamoDBMapperFieldModel < T , R > rk = this . < R > rangeKeyIfExists ( ) ; final AttributeValue rkValue = rangeKey == null ? null : rk . convert ( rangeKey ) ; if ( rkValue != null ) { key . put ( rk . name ( ) , rkValue ) ; } else if ( rk != null ) { throw new DynamoDBMappingException ( targetType . getSimpleName ( ) + "[" + rk . name ( ) + "]; no RANGE key value present" ) ; } return key ; }
Creates a new key map from the specified hash and range key .
30,460
private PutObjectResult putObjectUsingInstructionFile ( PutObjectRequest putObjectRequest ) { final File fileOrig = putObjectRequest . getFile ( ) ; final InputStream isOrig = putObjectRequest . getInputStream ( ) ; final PutObjectRequest putInstFileRequest = putObjectRequest . clone ( ) . withFile ( null ) . withInputStream ( null ) ; putInstFileRequest . setKey ( putInstFileRequest . getKey ( ) + DOT + DEFAULT_INSTRUCTION_FILE_SUFFIX ) ; ContentCryptoMaterial cekMaterial = createContentCryptoMaterial ( putObjectRequest ) ; PutObjectRequest req = wrapWithCipher ( putObjectRequest , cekMaterial ) ; final PutObjectResult result ; try { result = s3 . putObject ( req ) ; } finally { cleanupDataSource ( putObjectRequest , fileOrig , isOrig , req . getInputStream ( ) , log ) ; } s3 . putObject ( updateInstructionPutRequest ( putInstFileRequest , cekMaterial ) ) ; return result ; }
Puts an encrypted object into S3 and puts an instruction file into S3 . Encryption info is stored in the instruction file .
30,461
protected final ContentCryptoMaterial createContentCryptoMaterial ( AmazonWebServiceRequest req ) { if ( req instanceof EncryptionMaterialsFactory ) { EncryptionMaterialsFactory f = ( EncryptionMaterialsFactory ) req ; final EncryptionMaterials materials = f . getEncryptionMaterials ( ) ; if ( materials != null ) { return buildContentCryptoMaterial ( materials , req ) ; } } if ( req instanceof MaterialsDescriptionProvider ) { MaterialsDescriptionProvider mdp = ( MaterialsDescriptionProvider ) req ; Map < String , String > matdesc_req = mdp . getMaterialsDescription ( ) ; ContentCryptoMaterial ccm = newContentCryptoMaterial ( kekMaterialsProvider , matdesc_req , cryptoConfig . getCryptoProvider ( ) , req ) ; if ( ccm != null ) return ccm ; if ( matdesc_req != null ) { EncryptionMaterials material = kekMaterialsProvider . getEncryptionMaterials ( ) ; if ( ! material . isKMSEnabled ( ) ) { throw new SdkClientException ( "No material available from the encryption material provider for description " + matdesc_req ) ; } } } return newContentCryptoMaterial ( this . kekMaterialsProvider , cryptoConfig . getCryptoProvider ( ) , req ) ; }
Creates and returns a non - null content crypto material for the given request .
30,462
protected final long plaintextLength ( AbstractPutObjectRequest request , ObjectMetadata metadata ) { if ( request . getFile ( ) != null ) { return request . getFile ( ) . length ( ) ; } else if ( request . getInputStream ( ) != null && metadata . getRawMetadataValue ( Headers . CONTENT_LENGTH ) != null ) { return metadata . getContentLength ( ) ; } return - 1 ; }
Returns the plaintext length from the request and metadata ; or - 1 if unknown .
30,463
protected final PutObjectRequest updateInstructionPutRequest ( PutObjectRequest req , ContentCryptoMaterial cekMaterial ) { byte [ ] bytes = cekMaterial . toJsonString ( cryptoConfig . getCryptoMode ( ) ) . getBytes ( UTF8 ) ; ObjectMetadata metadata = req . getMetadata ( ) ; if ( metadata == null ) { metadata = new ObjectMetadata ( ) ; req . setMetadata ( metadata ) ; } metadata . setContentLength ( bytes . length ) ; metadata . addUserMetadata ( Headers . CRYPTO_INSTRUCTION_FILE , "" ) ; req . setMetadata ( metadata ) ; req . setInputStream ( new ByteArrayInputStream ( bytes ) ) ; return req ; }
Updates put request to store the specified instruction object in S3 .
30,464
final S3ObjectWrapper fetchInstructionFile ( S3ObjectId s3ObjectId , String instFileSuffix ) { try { S3Object o = s3 . getObject ( createInstructionGetRequest ( s3ObjectId , instFileSuffix ) ) ; return o == null ? null : new S3ObjectWrapper ( o , s3ObjectId ) ; } catch ( AmazonServiceException e ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "Unable to retrieve instruction file : " + e . getMessage ( ) ) ; } return null ; } }
Retrieves an instruction file from S3 ; or null if no instruction file is found .
30,465
private ContentCryptoMaterial contentCryptoMaterialOf ( S3ObjectWrapper s3w ) { if ( s3w . hasEncryptionInfo ( ) ) { return ContentCryptoMaterial . fromObjectMetadata ( s3w . getObjectMetadata ( ) , kekMaterialsProvider , cryptoConfig . getCryptoProvider ( ) , cryptoConfig . getAlwaysUseCryptoProvider ( ) , false , kms ) ; } S3ObjectWrapper orig_ifile = fetchInstructionFile ( s3w . getS3ObjectId ( ) , null ) ; if ( orig_ifile == null ) { throw new IllegalArgumentException ( "S3 object is not encrypted: " + s3w ) ; } String json = orig_ifile . toJsonString ( ) ; return ccmFromJson ( json ) ; }
Returns the content crypto material of an existing S3 object .
30,466
final GetObjectRequest createInstructionGetRequest ( S3ObjectId s3objectId , String instFileSuffix ) { return new GetObjectRequest ( s3objectId . instructionFileId ( instFileSuffix ) ) ; }
Creates and return a get object request for an instruction file .
30,467
private void assertIsFromSns ( URI certUrl ) { if ( ! endpoint . equals ( certUrl . getHost ( ) ) ) { throw new SdkClientException ( String . format ( "SigningCertUrl does not match expected endpoint. Expected %s but received endpoint was %s." , endpoint , certUrl . getHost ( ) ) ) ; } }
If the signing cert URL is not from SNS fail .
30,468
public Waiter < DescribeTasksRequest > tasksRunning ( ) { return new WaiterBuilder < DescribeTasksRequest , DescribeTasksResult > ( ) . withSdkFunction ( new DescribeTasksFunction ( client ) ) . withAcceptors ( new TasksRunning . IsSTOPPEDMatcher ( ) , new TasksRunning . IsMISSINGMatcher ( ) , new TasksRunning . IsRUNNINGMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 100 ) , new FixedDelayStrategy ( 6 ) ) ) . withExecutorService ( executorService ) . build ( ) ; }
Builds a TasksRunning 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 .
30,469
public Waiter < DescribeServicesRequest > servicesStable ( ) { return new WaiterBuilder < DescribeServicesRequest , DescribeServicesResult > ( ) . withSdkFunction ( new DescribeServicesFunction ( client ) ) . withAcceptors ( new ServicesStable . IsMISSINGMatcher ( ) , new ServicesStable . IsDRAININGMatcher ( ) , new ServicesStable . IsINACTIVEMatcher ( ) , new ServicesStable . IsTrueMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 40 ) , new FixedDelayStrategy ( 15 ) ) ) . withExecutorService ( executorService ) . build ( ) ; }
Builds a ServicesStable 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 .
30,470
public Waiter < DescribeServicesRequest > servicesInactive ( ) { return new WaiterBuilder < DescribeServicesRequest , DescribeServicesResult > ( ) . withSdkFunction ( new DescribeServicesFunction ( client ) ) . withAcceptors ( new ServicesInactive . IsMISSINGMatcher ( ) , new ServicesInactive . IsINACTIVEMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 40 ) , new FixedDelayStrategy ( 15 ) ) ) . withExecutorService ( executorService ) . build ( ) ; }
Builds a ServicesInactive 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 .
30,471
public Waiter < DescribeTasksRequest > tasksStopped ( ) { return new WaiterBuilder < DescribeTasksRequest , DescribeTasksResult > ( ) . withSdkFunction ( new DescribeTasksFunction ( client ) ) . withAcceptors ( new TasksStopped . IsSTOPPEDMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 100 ) , new FixedDelayStrategy ( 6 ) ) ) . withExecutorService ( executorService ) . build ( ) ; }
Builds a TasksStopped 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 .
30,472
public < X extends AmazonWebServiceRequest > DryRunResult < X > dryRun ( DryRunSupportedRequest < X > request ) throws AmazonServiceException , AmazonClientException { Request < X > dryRunRequest = request . getDryRunRequest ( ) ; ExecutionContext executionContext = createExecutionContext ( dryRunRequest ) ; try { invoke ( dryRunRequest , new StaxResponseHandler < Void > ( new VoidStaxUnmarshaller < Void > ( ) ) , executionContext ) ; throw new AmazonClientException ( "Unrecognized service response for the dry-run request." ) ; } catch ( AmazonServiceException ase ) { if ( ase . getErrorCode ( ) . equals ( "DryRunOperation" ) && ase . getStatusCode ( ) == 412 ) { return new DryRunResult < X > ( true , request , ase . getMessage ( ) , ase ) ; } else if ( ase . getErrorCode ( ) . equals ( "UnauthorizedOperation" ) && ase . getStatusCode ( ) == 403 ) { return new DryRunResult < X > ( false , request , ase . getMessage ( ) , ase ) ; } else if ( ase . getErrorCode ( ) . equals ( "AuthFailure" ) ) { return new DryRunResult < X > ( false , request , ase . getMessage ( ) , ase ) ; } throw new AmazonClientException ( "Unrecognized service response for the dry-run request." , ase ) ; } }
Checks whether you have the required permissions for the provided Amazon EC2 operation without actually running it . The returned DryRunResult object contains the information of whether the dry - run was successful . This method will throw exception when the service response does not clearly indicate whether you have the permission .
30,473
static final String fieldNameOf ( Method getter ) { final String name = getter . getName ( ) . replaceFirst ( "^(get|is)" , "" ) ; return StringUtils . lowerCase ( name . substring ( 0 , 1 ) ) + name . substring ( 1 ) ; }
Gets the field name given the getter method .
30,474
public void setCaptionDescriptions ( java . util . Collection < CaptionDescriptionPreset > captionDescriptions ) { if ( captionDescriptions == null ) { this . captionDescriptions = null ; return ; } this . captionDescriptions = new java . util . ArrayList < CaptionDescriptionPreset > ( captionDescriptions ) ; }
Caption settings for this preset . There can be multiple caption settings in a single output .
30,475
public void setUsers ( java . util . Collection < UserSummary > users ) { if ( users == null ) { this . users = null ; return ; } this . users = new java . util . ArrayList < UserSummary > ( users ) ; }
Required . The list of all ActiveMQ usernames for the specified broker .
30,476
public void setConnectors ( java . util . Collection < Connector > connectors ) { if ( connectors == null ) { this . connectors = null ; return ; } this . connectors = new java . util . ArrayList < Connector > ( connectors ) ; }
A list of references to connectors in this version with their corresponding configuration settings .
30,477
public Waiter < GetRoleRequest > roleExists ( ) { return new WaiterBuilder < GetRoleRequest , GetRoleResult > ( ) . withSdkFunction ( new GetRoleFunction ( client ) ) . withAcceptors ( new HttpSuccessStatusAcceptor ( WaiterState . SUCCESS ) , new RoleExists . IsNoSuchEntityMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 20 ) , new FixedDelayStrategy ( 1 ) ) ) . withExecutorService ( executorService ) . build ( ) ; }
Builds a RoleExists 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 .
30,478
public Waiter < GetInstanceProfileRequest > instanceProfileExists ( ) { return new WaiterBuilder < GetInstanceProfileRequest , GetInstanceProfileResult > ( ) . withSdkFunction ( new GetInstanceProfileFunction ( client ) ) . withAcceptors ( new HttpSuccessStatusAcceptor ( WaiterState . SUCCESS ) , new HttpFailureStatusAcceptor ( 404 , WaiterState . RETRY ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 40 ) , new FixedDelayStrategy ( 1 ) ) ) . withExecutorService ( executorService ) . build ( ) ; }
Builds a InstanceProfileExists 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 .
30,479
public Waiter < GetPolicyRequest > policyExists ( ) { return new WaiterBuilder < GetPolicyRequest , GetPolicyResult > ( ) . withSdkFunction ( new GetPolicyFunction ( client ) ) . withAcceptors ( new HttpSuccessStatusAcceptor ( WaiterState . SUCCESS ) , new PolicyExists . IsNoSuchEntityMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 20 ) , new FixedDelayStrategy ( 1 ) ) ) . withExecutorService ( executorService ) . build ( ) ; }
Builds a PolicyExists 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 .
30,480
public Waiter < GetUserRequest > userExists ( ) { return new WaiterBuilder < GetUserRequest , GetUserResult > ( ) . withSdkFunction ( new GetUserFunction ( client ) ) . withAcceptors ( new HttpSuccessStatusAcceptor ( WaiterState . SUCCESS ) , new UserExists . IsNoSuchEntityMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 20 ) , new FixedDelayStrategy ( 1 ) ) ) . withExecutorService ( executorService ) . build ( ) ; }
Builds a UserExists 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 .
30,481
public Policy createPolicyFromJsonString ( String jsonString ) { if ( jsonString == null ) { throw new IllegalArgumentException ( "JSON string cannot be null" ) ; } JsonNode policyNode ; JsonNode idNode ; JsonNode statementsNode ; Policy policy = new Policy ( ) ; List < Statement > statements = new LinkedList < Statement > ( ) ; try { policyNode = Jackson . jsonNodeOf ( jsonString ) ; idNode = policyNode . get ( JsonDocumentFields . POLICY_ID ) ; if ( isNotNull ( idNode ) ) { policy . setId ( idNode . asText ( ) ) ; } statementsNode = policyNode . get ( JsonDocumentFields . STATEMENT ) ; if ( isNotNull ( statementsNode ) ) { if ( statementsNode . isObject ( ) ) { statements . add ( statementOf ( statementsNode ) ) ; } else if ( statementsNode . isArray ( ) ) { for ( JsonNode statementNode : statementsNode ) { statements . add ( statementOf ( statementNode ) ) ; } } } } catch ( Exception e ) { String message = "Unable to generate policy object fron JSON string " + e . getMessage ( ) ; throw new IllegalArgumentException ( message , e ) ; } policy . setStatements ( statements ) ; return policy ; }
Converts the specified JSON string to an AWS policy object .
30,482
private List < Action > actionsOf ( JsonNode actionNodes ) { List < Action > actions = new LinkedList < Action > ( ) ; if ( actionNodes . isArray ( ) ) { for ( JsonNode action : actionNodes ) { actions . add ( new NamedAction ( action . asText ( ) ) ) ; } } else { actions . add ( new NamedAction ( actionNodes . asText ( ) ) ) ; } return actions ; }
Generates a list of actions from the Action Json Node .
30,483
private List < Resource > resourcesOf ( JsonNode resourceNodes ) { List < Resource > resources = new LinkedList < Resource > ( ) ; if ( resourceNodes . isArray ( ) ) { for ( JsonNode resource : resourceNodes ) { resources . add ( new Resource ( resource . asText ( ) ) ) ; } } else { resources . add ( new Resource ( resourceNodes . asText ( ) ) ) ; } return resources ; }
Generates a list of resources from the Resource Json Node .
30,484
private List < Principal > principalOf ( JsonNode principalNodes ) { List < Principal > principals = new LinkedList < Principal > ( ) ; if ( principalNodes . asText ( ) . equals ( "*" ) ) { principals . add ( Principal . All ) ; return principals ; } Iterator < Map . Entry < String , JsonNode > > mapOfPrincipals = principalNodes . fields ( ) ; String schema ; JsonNode principalNode ; Entry < String , JsonNode > principal ; Iterator < JsonNode > elements ; while ( mapOfPrincipals . hasNext ( ) ) { principal = mapOfPrincipals . next ( ) ; schema = principal . getKey ( ) ; principalNode = principal . getValue ( ) ; if ( principalNode . isArray ( ) ) { elements = principalNode . elements ( ) ; while ( elements . hasNext ( ) ) { principals . add ( createPrincipal ( schema , elements . next ( ) ) ) ; } } else { principals . add ( createPrincipal ( schema , principalNode ) ) ; } } return principals ; }
Generates a list of principals from the Principal Json Node
30,485
private Principal createPrincipal ( String schema , JsonNode principalNode ) { if ( schema . equalsIgnoreCase ( PRINCIPAL_SCHEMA_USER ) ) { return new Principal ( PRINCIPAL_SCHEMA_USER , principalNode . asText ( ) , options . isStripAwsPrincipalIdHyphensEnabled ( ) ) ; } else if ( schema . equalsIgnoreCase ( PRINCIPAL_SCHEMA_SERVICE ) ) { return new Principal ( schema , principalNode . asText ( ) ) ; } else if ( schema . equalsIgnoreCase ( PRINCIPAL_SCHEMA_FEDERATED ) ) { if ( WebIdentityProviders . fromString ( principalNode . asText ( ) ) != null ) { return new Principal ( WebIdentityProviders . fromString ( principalNode . asText ( ) ) ) ; } else { return new Principal ( PRINCIPAL_SCHEMA_FEDERATED , principalNode . asText ( ) ) ; } } throw new SdkClientException ( "Schema " + schema + " is not a valid value for the principal." ) ; }
Creates a new principal instance for the given schema and the Json node .
30,486
private List < Condition > conditionsOf ( JsonNode conditionNodes ) { List < Condition > conditionList = new LinkedList < Condition > ( ) ; Iterator < Map . Entry < String , JsonNode > > mapOfConditions = conditionNodes . fields ( ) ; Entry < String , JsonNode > condition ; while ( mapOfConditions . hasNext ( ) ) { condition = mapOfConditions . next ( ) ; convertConditionRecord ( conditionList , condition . getKey ( ) , condition . getValue ( ) ) ; } return conditionList ; }
Generates a list of condition from the Json node .
30,487
private void convertConditionRecord ( List < Condition > conditions , String conditionType , JsonNode conditionNode ) { Iterator < Map . Entry < String , JsonNode > > mapOfFields = conditionNode . fields ( ) ; List < String > values ; Entry < String , JsonNode > field ; JsonNode fieldValue ; Iterator < JsonNode > elements ; while ( mapOfFields . hasNext ( ) ) { values = new LinkedList < String > ( ) ; field = mapOfFields . next ( ) ; fieldValue = field . getValue ( ) ; if ( fieldValue . isArray ( ) ) { elements = fieldValue . elements ( ) ; while ( elements . hasNext ( ) ) { values . add ( elements . next ( ) . asText ( ) ) ; } } else { values . add ( fieldValue . asText ( ) ) ; } conditions . add ( new Condition ( ) . withType ( conditionType ) . withConditionKey ( field . getKey ( ) ) . withValues ( values ) ) ; } }
Generates a condition instance for each condition type under the Condition Json node .
30,488
final < t > ConvertibleType < t > param ( final int index ) { return this . params . length > index ? ( ConvertibleType < t > ) this . params [ index ] : null ; }
Gets the scalar parameter types .
30,489
final boolean is ( ScalarAttributeType scalarAttributeType , Vector vector ) { return param ( 0 ) != null && param ( 0 ) . is ( scalarAttributeType ) && is ( vector ) ; }
Returns true if the types match .
30,490
static < T > ConvertibleType < T > of ( Method getter , TypedMap < T > annotations ) { return new ConvertibleType < T > ( getter . getGenericReturnType ( ) , annotations , getter ) ; }
Returns the conversion type for the method and annotations .
30,491
private static < T > ConvertibleType < T > of ( final DynamoDBTypeConverter < ? , T > converter ) { final Class < ? > clazz = converter . getClass ( ) ; if ( ! clazz . isInterface ( ) ) { for ( Class < ? > c = clazz ; Object . class != c ; c = c . getSuperclass ( ) ) { for ( final Type genericType : c . getGenericInterfaces ( ) ) { final ConvertibleType < T > type = ConvertibleType . < T > of ( genericType ) ; if ( type . is ( DynamoDBTypeConverter . class ) ) { if ( type . params . length == 2 && type . param ( 0 ) . targetType ( ) != Object . class ) { return type . param ( 0 ) ; } } } } final ConvertibleType < T > type = ConvertibleType . < T > of ( clazz . getGenericSuperclass ( ) ) ; if ( type . is ( DynamoDBTypeConverter . class ) ) { if ( type . params . length > 0 && type . param ( 0 ) . targetType ( ) != Object . class ) { return type . param ( 0 ) ; } } } throw new DynamoDBMappingException ( "could not resolve type of " + clazz ) ; }
Returns the conversion type for the converter .
30,492
private static < T > ConvertibleType < T > of ( Type genericType ) { final Class < T > targetType ; if ( genericType instanceof Class ) { targetType = ( Class < T > ) genericType ; } else if ( genericType instanceof ParameterizedType ) { targetType = ( Class < T > ) ( ( ParameterizedType ) genericType ) . getRawType ( ) ; } else if ( genericType . toString ( ) . equals ( "byte[]" ) ) { targetType = ( Class < T > ) byte [ ] . class ; } else { targetType = ( Class < T > ) Object . class ; } final TypedMap < T > annotations = StandardAnnotationMaps . < T > of ( targetType ) ; return new ConvertibleType < T > ( genericType , annotations , null ) ; }
Returns the conversion type for the generic type .
30,493
public void setFindingIds ( java . util . Collection < String > findingIds ) { if ( findingIds == null ) { this . findingIds = null ; return ; } this . findingIds = new java . util . ArrayList < String > ( findingIds ) ; }
IDs of the findings that you want to unarchive .
30,494
public Map < String , String > getMaterialsDescription ( ) { return matDesc == null ? encryptionMaterials . getMaterialsDescription ( ) : matDesc ; }
Returns the material description for the new instruction file .
30,495
public WaiterState accepts ( Output response ) { for ( WaiterAcceptor < Output > acceptor : acceptors ) { if ( acceptor . matches ( response ) ) { return acceptor . getState ( ) ; } } return WaiterState . RETRY ; }
Compares the response against each response acceptor and returns the state of the acceptor it matches on . If none is matched returns retry state by default
30,496
public WaiterState accepts ( AmazonServiceException exception ) throws AmazonServiceException { for ( WaiterAcceptor < Output > acceptor : acceptors ) { if ( acceptor . matches ( exception ) ) { return acceptor . getState ( ) ; } } throw exception ; }
Compares the exception thrown against each exception acceptor and returns the state of the acceptor it matches on . If none is matched it rethrows the exception to the caller
30,497
public java . util . concurrent . Future < DescribeApplicationVersionsResult > describeApplicationVersionsAsync ( com . amazonaws . handlers . AsyncHandler < DescribeApplicationVersionsRequest , DescribeApplicationVersionsResult > asyncHandler ) { return describeApplicationVersionsAsync ( new DescribeApplicationVersionsRequest ( ) , asyncHandler ) ; }
Simplified method form for invoking the DescribeApplicationVersions operation with an AsyncHandler .
30,498
public java . util . concurrent . Future < DescribeApplicationsResult > describeApplicationsAsync ( com . amazonaws . handlers . AsyncHandler < DescribeApplicationsRequest , DescribeApplicationsResult > asyncHandler ) { return describeApplicationsAsync ( new DescribeApplicationsRequest ( ) , asyncHandler ) ; }
Simplified method form for invoking the DescribeApplications operation with an AsyncHandler .
30,499
public java . util . concurrent . Future < DescribeEnvironmentsResult > describeEnvironmentsAsync ( com . amazonaws . handlers . AsyncHandler < DescribeEnvironmentsRequest , DescribeEnvironmentsResult > asyncHandler ) { return describeEnvironmentsAsync ( new DescribeEnvironmentsRequest ( ) , asyncHandler ) ; }
Simplified method form for invoking the DescribeEnvironments operation with an AsyncHandler .