use of rx.Completable in project storio by pushtorefresh.
the class PreparedPutContentValuesIterableTest method putMultipleCompletableWithTransaction.
@Test
public void putMultipleCompletableWithTransaction() {
final PutContentValuesStub putStub = PutContentValuesStub.newPutStubForMultipleContentValues(true);
final Completable completable = putStub.storIOSQLite.put().contentValues(putStub.contentValues).withPutResolver(putStub.putResolver).useTransaction(true).prepare().asRxCompletable();
putStub.verifyBehaviorForMultipleContentValues(completable);
}
use of rx.Completable in project storio by pushtorefresh.
the class PreparedPutContentValuesIterableTest method putMultipleCompletableWithoutTransaction.
@Test
public void putMultipleCompletableWithoutTransaction() {
final PutContentValuesStub putStub = PutContentValuesStub.newPutStubForMultipleContentValues(false);
final Completable completable = putStub.storIOSQLite.put().contentValues(putStub.contentValues).withPutResolver(putStub.putResolver).useTransaction(false).prepare().asRxCompletable();
putStub.verifyBehaviorForMultipleContentValues(completable);
}
use of rx.Completable in project azure-sdk-for-java by Azure.
the class SqlServerImpl method deleteChildResources.
private void deleteChildResources() {
Completable deleteFirewallRules = deleteFirewallRule();
Completable deleteDatabasesAndElasticPools = deleteDatabasesAndElasticPools();
Completable.merge(deleteFirewallRules, deleteDatabasesAndElasticPools).await();
}
use of rx.Completable in project azure-sdk-for-java by Azure.
the class SqlServerImpl method deleteDatabasesAndElasticPools.
private Completable deleteDatabasesAndElasticPools() {
List<Completable> deleteDBList = new ArrayList<>();
for (String databaseName : this.databasesToDelete) {
deleteDBList.add(this.databases().deleteAsync(databaseName));
}
Completable deleteDBs = Completable.merge(deleteDBList);
List<Completable> deleteElasticPoolList = new ArrayList<>();
for (String elasticPoolName : this.elasticPoolsToDelete) {
deleteElasticPoolList.add(this.elasticPools().deleteAsync(elasticPoolName));
}
Completable deletePools = Completable.merge(deleteElasticPoolList);
return Completable.concat(deleteDBs, deletePools);
}
use of rx.Completable in project azure-sdk-for-java by Azure.
the class QueueImpl method createChildResourceAsync.
@Override
protected Observable<Queue> createChildResourceAsync() {
Completable createQueueCompletable = this.manager().inner().queues().createOrUpdateAsync(this.resourceGroupName(), this.parentName, this.name(), this.inner()).map(new Func1<QueueInner, QueueInner>() {
@Override
public QueueInner call(QueueInner inner) {
setInner(inner);
return inner;
}
}).toCompletable();
Completable childrenOperationsCompletable = submitChildrenOperationsAsync();
final Queue self = this;
return Completable.concat(createQueueCompletable, childrenOperationsCompletable).doOnTerminate(new Action0() {
@Override
public void call() {
initChildrenOperationsCache();
}
}).andThen(Observable.just(self));
}
Aggregations