private Observable<Indexable> getOrCreateStorageAccountContainer(final StorageAccount storageAccount, final String containerName, final String fileName, final FunctionalTaskItem.Context context) { final SqlDatabaseImportRequestImpl self = this; return storageAccount.getKeysAsync() .flatMap(new Func1<List<StorageAccountKey>, Observable<StorageAccountKey>>() { @Override public Observable<StorageAccountKey> call(List<StorageAccountKey> storageAccountKeys) { return Observable.from(storageAccountKeys).first(); } }) .flatMap(new Func1<StorageAccountKey, Observable<Indexable>>() { @Override public Observable<Indexable> call(StorageAccountKey storageAccountKey) { self.inner.withStorageUri(String.format("%s%s/%s", storageAccount.endPoints().primary().blob(), containerName, fileName)); self.inner.withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY); self.inner.withStorageKey(storageAccountKey.value()); return context.voidObservable(); } }); }
@Override public Observable<Indexable> call(final Context context) { return storageAccount.getKeysAsync() .flatMap(new Func1<List<StorageAccountKey>, Observable<StorageAccountKey>>() { @Override public Observable<StorageAccountKey> call(List<StorageAccountKey> storageAccountKeys) { return Observable.from(storageAccountKeys).first(); } }) .flatMap(new Func1<StorageAccountKey, Observable<Indexable>>() { @Override public Observable<Indexable> call(StorageAccountKey storageAccountKey) { self.importRequestInner.withStorageUri(String.format("%s%s/%s", storageAccount.endPoints().primary().blob(), containerName, fileName)); self.importRequestInner.withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY); self.importRequestInner.withStorageKey(storageAccountKey.value()); return context.voidObservable(); } }); } });
@Override public Observable<Indexable> call(final Context context) { return storageAccount.getKeysAsync() .flatMap(new Func1<List<StorageAccountKey>, Observable<StorageAccountKey>>() { @Override public Observable<StorageAccountKey> call(List<StorageAccountKey> storageAccountKeys) { return Observable.from(storageAccountKeys).first(); } }) .flatMap(new Func1<StorageAccountKey, Observable<Indexable>>() { @Override public Observable<Indexable> call(StorageAccountKey storageAccountKey) { self.importRequestInner.withStorageUri(String.format("%s%s/%s", storageAccount.endPoints().primary().blob(), containerName, fileName)); self.importRequestInner.withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY); self.importRequestInner.withStorageKey(storageAccountKey.value()); return context.voidObservable(); } }); } });
private Observable<Indexable> getOrCreateStorageAccountContainer(final StorageAccount storageAccount, final String containerName, final String fileName, final FunctionalTaskItem.Context context) { final SqlDatabaseImportRequestImpl self = this; return storageAccount.getKeysAsync() .flatMap(new Func1<List<StorageAccountKey>, Observable<StorageAccountKey>>() { @Override public Observable<StorageAccountKey> call(List<StorageAccountKey> storageAccountKeys) { return Observable.from(storageAccountKeys).first(); } }) .flatMap(new Func1<StorageAccountKey, Observable<Indexable>>() { @Override public Observable<Indexable> call(StorageAccountKey storageAccountKey) { self.inner.withStorageUri(String.format("%s%s/%s", storageAccount.endPoints().primary().blob(), containerName, fileName)); self.inner.withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY); self.inner.withStorageKey(storageAccountKey.value()); return context.voidObservable(); } }); }
private Observable<Indexable> getOrCreateStorageAccountContainer(final StorageAccount storageAccount, final String containerName, final String fileName, final FunctionalTaskItem.Context context) { final SqlDatabaseExportRequestImpl self = this; return storageAccount.getKeysAsync() .flatMap(new Func1<List<StorageAccountKey>, Observable<StorageAccountKey>>() { @Override
private Observable<Triple<String, String, String>> createFileShareAsync(final StorageAccount storageAccount) { return storageAccount.getKeysAsync() .map(new Func1<List<StorageAccountKey>, String>() { @Override
private Observable<Triple<String, String, String>> createFileShareAsync(final StorageAccount storageAccount) { return storageAccount.getKeysAsync() .map(new Func1<List<StorageAccountKey>, String>() { @Override
private Observable<Indexable> getOrCreateStorageAccountContainer(final StorageAccount storageAccount, final String containerName, final String fileName, final FunctionalTaskItem.Context context) { final SqlDatabaseExportRequestImpl self = this; return storageAccount.getKeysAsync() .flatMap(new Func1<List<StorageAccountKey>, Observable<StorageAccountKey>>() { @Override
private Observable<CloudStorageAccount> getCloudStorageAsync(final StorageAccount storageAccount) { return storageAccount.getKeysAsync() .flatMapIterable(new Func1<List<StorageAccountKey>, Iterable<StorageAccountKey>>() { @Override public Iterable<StorageAccountKey> call(List<StorageAccountKey> storageAccountKeys) { return storageAccountKeys; } }) .last() .map(new Func1<StorageAccountKey, CloudStorageAccount>() { @Override public CloudStorageAccount call(StorageAccountKey storageAccountKey) { try { return CloudStorageAccount.parse(String.format("DefaultEndpointsProtocol=https;AccountName=%s;AccountKey=%s;EndpointSuffix=core.windows.net", storageAccount.name(), storageAccountKey.value())); } catch (URISyntaxException syntaxException) { throw Exceptions.propagate(syntaxException); } catch (InvalidKeyException keyException) { throw Exceptions.propagate(keyException); } } }); }
private Observable<CloudStorageAccount> getCloudStorageAsync(final StorageAccount storageAccount) { return storageAccount.getKeysAsync() .flatMapIterable(new Func1<List<StorageAccountKey>, Iterable<StorageAccountKey>>() { @Override public Iterable<StorageAccountKey> call(List<StorageAccountKey> storageAccountKeys) { return storageAccountKeys; } }) .last() .map(new Func1<StorageAccountKey, CloudStorageAccount>() { @Override public CloudStorageAccount call(StorageAccountKey storageAccountKey) { try { return CloudStorageAccount.parse(String.format("DefaultEndpointsProtocol=https;AccountName=%s;AccountKey=%s;EndpointSuffix=core.windows.net", storageAccount.name(), storageAccountKey.value())); } catch (URISyntaxException syntaxException) { throw Exceptions.propagate(syntaxException); } catch (InvalidKeyException keyException) { throw Exceptions.propagate(keyException); } } }); }
return super.submitAppSettings(); } else { return storageAccountToSet.getKeysAsync() .flatMapIterable(new Func1<List<StorageAccountKey>, Iterable<StorageAccountKey>>() { @Override