Search in sources :

Example 1 with ExecutorAsyncOperations

use of io.micronaut.data.runtime.operations.ExecutorAsyncOperations in project micronaut-data by micronaut-projects.

the class HibernateJpaOperations method async.

@NonNull
@Override
public ExecutorAsyncOperations async() {
    ExecutorAsyncOperations asyncOperations = this.asyncOperations;
    if (asyncOperations == null) {
        synchronized (this) {
            // double check
            asyncOperations = this.asyncOperations;
            if (asyncOperations == null) {
                asyncOperations = new ExecutorAsyncOperations(this, executorService != null ? executorService : newLocalThreadPool());
                this.asyncOperations = asyncOperations;
            }
        }
    }
    return asyncOperations;
}
Also used : ExecutorAsyncOperations(io.micronaut.data.runtime.operations.ExecutorAsyncOperations) NonNull(io.micronaut.core.annotation.NonNull)

Example 2 with ExecutorAsyncOperations

use of io.micronaut.data.runtime.operations.ExecutorAsyncOperations in project micronaut-data by micronaut-projects.

the class DefaultJdbcRepositoryOperations method async.

@NonNull
@Override
public ExecutorAsyncOperations async() {
    ExecutorAsyncOperations asyncOperations = this.asyncOperations;
    if (asyncOperations == null) {
        synchronized (this) {
            // double check
            asyncOperations = this.asyncOperations;
            if (asyncOperations == null) {
                asyncOperations = new ExecutorAsyncOperations(this, executorService != null ? executorService : newLocalThreadPool());
                this.asyncOperations = asyncOperations;
            }
        }
    }
    return asyncOperations;
}
Also used : ExecutorAsyncOperations(io.micronaut.data.runtime.operations.ExecutorAsyncOperations) NonNull(io.micronaut.core.annotation.NonNull)

Example 3 with ExecutorAsyncOperations

use of io.micronaut.data.runtime.operations.ExecutorAsyncOperations in project micronaut-data by micronaut-projects.

the class DefaultMongoRepositoryOperations method async.

@NonNull
@Override
public ExecutorAsyncOperations async() {
    ExecutorAsyncOperations asyncOperations = this.asyncOperations;
    if (asyncOperations == null) {
        synchronized (this) {
            // double check
            asyncOperations = this.asyncOperations;
            if (asyncOperations == null) {
                asyncOperations = new ExecutorAsyncOperations(this, executorService != null ? executorService : newLocalThreadPool());
                this.asyncOperations = asyncOperations;
            }
        }
    }
    return asyncOperations;
}
Also used : ExecutorAsyncOperations(io.micronaut.data.runtime.operations.ExecutorAsyncOperations) NonNull(io.micronaut.core.annotation.NonNull)

Aggregations

NonNull (io.micronaut.core.annotation.NonNull)3 ExecutorAsyncOperations (io.micronaut.data.runtime.operations.ExecutorAsyncOperations)3