Skip to content
Open
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ target
*.diff
Fortify*
logging.properties
.idea
.oca
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/).

## [6.0.0] [Unreleased]

### TODO

## [5.4.18] 2025-10-01

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ project. The version changes with each release.
<dependency>
<groupId>com.oracle.nosql.sdk</groupId>
<artifactId>nosqldriver</artifactId>
<version>5.4.18</version>
<version>6.0.0</version>
</dependency>
```

Expand Down
10 changes: 5 additions & 5 deletions driver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<groupId>com.oracle.nosql.sdk</groupId>
<artifactId>nosqldriver</artifactId>
<version>5.4.18</version>
<version>6.0.0</version>
<packaging>jar</packaging>

<organization>
Expand All @@ -39,8 +39,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>d-MMMM-yyyy</maven.build.timestamp.format>
<copyright>Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.</copyright>
Expand Down Expand Up @@ -274,8 +274,8 @@
<version>3.11.0</version>
<configuration>
<fork>true</fork>
<source>1.8</source>
<target>1.8</target>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<compilerArgument>-Xlint:all</compilerArgument>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import io.netty.handler.codec.http.HttpHeaders;
import oracle.nosql.driver.ops.Request;

import java.util.concurrent.CompletableFuture;

/**
* A callback interface used by the driver to obtain an authorization string
* for a request. {@link NoSQLHandle} calls this interface when and
Expand All @@ -34,6 +36,21 @@ public interface AuthorizationProvider {
*/
public String getAuthorizationString(Request request);

/**
* Returns an authorization string for specified request. This is sent to
* the server in the request for authorization. Authorization information
* can be request-dependent.
*
* @param request the request being processed
*
* @return a CompletableFuture of a string indicating that the application
* is authorized to perform the request
*/
public default CompletableFuture<String>
getAuthorizationStringAsync(Request request) {
return CompletableFuture.completedFuture(null);
}

/**
* Release resources provider is using.
*/
Expand Down Expand Up @@ -75,6 +92,27 @@ public default void setRequiredHeaders(String authString,
}
}

/**
* Set HTTP headers required by the provider asynchronously.
*
* @param authString the authorization string for the request
*
* @param request the request being processed
*
* @param headers the HTTP headers
*
* @param content the request content bytes
*/
default CompletableFuture<Void> setRequiredHeadersAsync(String authString,
Request request,
HttpHeaders headers,
byte[] content) {
if (authString != null) {
headers.set(AUTHORIZATION, authString);
}
return CompletableFuture.completedFuture(null);
}

/**
* Invalidate any cached authorization strings.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ public void delay(Request request,
request.addRetryDelayMs(delayMs);
}

@Override
public int delayTime(Request request,
int numRetries,
RetryableException re) {
return Math.max(0, computeBackoffDelay(request, fixedDelayMs));
}

/**
* Compute an incremental backoff delay in milliseconds.
* This method also checks the request's timeout and ensures the
Expand Down
Loading