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
3 changes: 3 additions & 0 deletions driver/src/main/java/oracle/nosql/driver/http/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -1842,6 +1842,9 @@ private boolean requireContentSigned(Request request) {
* because in the client it's not known if the operation is on a
* multi-region table or not. This is a small bit of overhead and
* is ignored if the table is not multi-region
*
* The Request.oboToken is not required by non Java SDKs, remove
* request.getOboToken() != null if there is no Request.oboToken
*/
return request instanceof AddReplicaRequest ||
request instanceof DropReplicaRequest ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,14 @@ private SignatureDetails getSignatureWithContent(Request request,
return sigDetails;
}

/*
* Since Request.oboToken is not required by non Java SDKs, if there
* is no Request.oboToken, simplify this method as following:
*
* private String getDelegationToken(Request req) {
* return delegationToken;
* }
*/
private String getDelegationToken(Request req) {
return (req != null && req.getOboToken() != null) ?
req.getOboToken() : delegationToken;
Expand Down
11 changes: 8 additions & 3 deletions driver/src/main/java/oracle/nosql/driver/ops/Request.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ public abstract class Request {

/**
* @hidden
* This is only used by internal, cross-region requests
* This is only required by Java SDK for internal cross-region request, not
* by other drivers.
*/
private String oboToken;

Expand Down Expand Up @@ -569,7 +570,9 @@ public boolean getDRLOptIn() {

/**
* @hidden
* internal use only
* This is only required by Java SDK for internal cross-region request, not
* by other drivers.
*
* @param token the on-behalf-of token
*/
public void setOboTokenInternal(String token) {
Expand All @@ -578,7 +581,9 @@ public void setOboTokenInternal(String token) {

/**
* @hidden
* internal use only
* This is only required by Java SDK for internal cross-region request, not
* by other drivers.
*
* @return the on-behalf-of token
*/
public String getOboToken() {
Expand Down