-
Notifications
You must be signed in to change notification settings - Fork 26
Feature/http2 #32
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
Open
liujoey
wants to merge
14
commits into
main
Choose a base branch
from
feature/http2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/http2 #32
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
739762d
Added Http2 support
liujoey 1cff196
remove unused http2 setting
liujoey 5ddaf98
Add HttpProtocolNegotiationHandler
liujoey 4e39324
Add http protocols list configuration
liujoey 9f467f4
Support Clear Text Http protocol negotiation
liujoey 1a271f1
A better way to select fallback http protocol
liujoey a1cb224
fix: writing message before upgrade is finished
liujoey eaf3f3c
writeBufferedMessages now takes channle object
liujoey b067963
Map Netty protocol names to NoSQL HttpConstants
liujoey 457d288
Add javadoc for the config public API
liujoey 740812c
H2C works with both old and new Httpproxy
liujoey 80d2523
fix: wrong class name for the http2 frame logger
liujoey 7495015
Replace more instances of ApplicationProtocolNames
liujoey 788cb1e
protect method visibility
liujoey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
|
||
import oracle.nosql.driver.Region.RegionProvider; | ||
import oracle.nosql.driver.iam.SignatureProvider; | ||
import oracle.nosql.driver.util.HttpConstants; | ||
import io.netty.handler.ssl.SslContext; | ||
|
||
/** | ||
|
@@ -142,6 +143,13 @@ public class NoSQLHandleConfig implements Cloneable { | |
*/ | ||
private int maxChunkSize = 0; | ||
|
||
/** | ||
* Default http protocols | ||
* | ||
* Default: prefer H2 but fallback to Http1.1 | ||
*/ | ||
private List<String> httpProtocols = new ArrayList<>(Arrays.asList(HttpConstants.HTTP_2, HttpConstants.HTTP_1_1)); | ||
|
||
/** | ||
* A RetryHandler, or null if not configured by the user. | ||
*/ | ||
|
@@ -553,6 +561,18 @@ public int getDefaultRequestTimeout() { | |
return timeout == 0 ? DEFAULT_TIMEOUT : timeout; | ||
} | ||
|
||
/** | ||
* Returns the list of Http Protocols. If there is no configured | ||
* protocol, a "default" value of | ||
* List({@link HttpConstants#HTTP_2}, {@link HttpConstants#HTTP_1_1}) | ||
* is used. | ||
* | ||
* @return Http protocol settings | ||
*/ | ||
public List<String> getHttpProtocols() { | ||
return httpProtocols; | ||
} | ||
|
||
/** | ||
* Returns the configured table request timeout value, in milliseconds. | ||
* The table request timeout default can be specified independently to allow | ||
|
@@ -631,6 +651,22 @@ public NoSQLHandleConfig setRequestTimeout(int timeout) { | |
return this; | ||
} | ||
|
||
/** | ||
* Sets the default http protocol(s). The default is {@link HttpConstants#HTTP_2} | ||
* and fall back to {@link HttpConstants#HTTP_1_1} | ||
* | ||
* @param protocols Protocol list | ||
* | ||
* @return this | ||
*/ | ||
public NoSQLHandleConfig setHttpProtocols(String ... protocols) { | ||
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. This needs javadoc comment |
||
this.httpProtocols = new ArrayList<>(2); | ||
for (String p : protocols) { | ||
this.httpProtocols.add(p); | ||
} | ||
return this; | ||
} | ||
|
||
/** | ||
* Sets the default table request timeout. | ||
* The table request timeout can be specified independently | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
needs an actual explanation of what's being returned