Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ public boolean needsExecutor() {
return delegate.needsExecutor();
}

@Nullable
@Override
public Executor getExecutor() {
return delegate.getExecutor();
}

@Override
@Deprecated
public BigtableTransportChannelProvider withExecutor(ScheduledExecutorService executor) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,12 @@ public boolean needsExecutor() {
return executor == null;
}

@Nullable
@Override
public Executor getExecutor() {
return executor;
}

@Deprecated
@Override
public TransportChannelProvider withExecutor(ScheduledExecutorService executor) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ public boolean needsExecutor() {
return executor == null;
}

@Nullable
@Override
public Executor getExecutor() {
return executor;
}

@Deprecated
@Override
public TransportChannelProvider withExecutor(ScheduledExecutorService executor) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import java.util.Map;
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledExecutorService;
import javax.annotation.Nullable;

/**
* Provides an interface to either build a TransportChannel or provide a fixed TransportChannel that
Expand Down Expand Up @@ -70,6 +71,15 @@ public interface TransportChannelProvider {
@Deprecated
boolean needsExecutor();

/**
* @return the user provided executor. This can be null if the user didn't override the executor
* and/or the TransportProvider is using its internal executor.
*/
@Nullable
default Executor getExecutor() {
return null;
}

/** Sets the executor to use when constructing a new {@link TransportChannel}. */
TransportChannelProvider withExecutor(Executor executor);

Expand Down
Loading