-
Notifications
You must be signed in to change notification settings - Fork 143
cache: respond to watches in parallel v2 #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package io.envoyproxy.controlplane.server; | ||
|
||
import com.google.common.util.concurrent.MoreExecutors; | ||
|
||
import java.util.concurrent.Executor; | ||
|
||
/** | ||
* Default implementation of {@link ExecutorGroup} which | ||
* always returns {@link MoreExecutors#directExecutor}. | ||
*/ | ||
public class DefaultExecutorGroup implements ExecutorGroup { | ||
/** | ||
* Returns the next {@link Executor} to use, which in this case is | ||
* always {@link MoreExecutors#directExecutor}. | ||
*/ | ||
@Override | ||
public Executor next() { | ||
return MoreExecutors.directExecutor(); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package io.envoyproxy.controlplane.server; | ||
|
||
import java.util.concurrent.Executor; | ||
|
||
/** | ||
* The {@link ExecutorGroup} is responsible for providing the {@link Executor}'s to use | ||
* via its {@link #next()} method. | ||
*/ | ||
public interface ExecutorGroup { | ||
/** | ||
* Returns the next {@link Executor} to use. | ||
*/ | ||
Executor next(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it make sense to also pass some contextual information about the request stream here? Would there be use-cases where e.g. a particular type would need to have affinity to a specific cc: @snowp There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought about this as well, but there's not much contextual information we can send at the moment There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think having each stream always using the same executor is good enough for now |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.