Skip to content

Commit 2fa939f

Browse files
committed
remove func interface
1 parent eb0e45a commit 2fa939f

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureBlobStore.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
import org.apache.logging.log4j.Logger;
5151
import org.apache.logging.log4j.core.util.Throwables;
5252
import org.elasticsearch.cluster.metadata.RepositoryMetadata;
53-
import org.elasticsearch.common.CheckedBiFunction;
5453
import org.elasticsearch.common.UUIDs;
5554
import org.elasticsearch.common.blobstore.BlobContainer;
5655
import org.elasticsearch.common.blobstore.BlobPath;
@@ -477,7 +476,7 @@ void writeBlobAtomic(
477476
final OperationPurpose purpose,
478477
final String blobName,
479478
final long blobSize,
480-
final CheckedBiFunction<Long, Long, InputStream, IOException> provider,
479+
final BlobContainer.BlobMultiPartInputStreamProvider provider,
481480
final boolean failIfAlreadyExists
482481
) throws IOException {
483482
try {
@@ -559,7 +558,7 @@ private static Mono<String> stageBlock(
559558
BlockBlobAsyncClient asyncClient,
560559
String blobName,
561560
MultiPart multiPart,
562-
CheckedBiFunction<Long, Long, InputStream, IOException> provider
561+
BlobContainer.BlobMultiPartInputStreamProvider provider
563562
) {
564563
logger.debug(
565564
"{}: staging part [{}] of size [{}] from offset [{}]",

server/src/main/java/org/elasticsearch/common/blobstore/BlobContainer.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
package org.elasticsearch.common.blobstore;
1111

1212
import org.elasticsearch.action.ActionListener;
13-
import org.elasticsearch.common.CheckedBiFunction;
1413
import org.elasticsearch.common.blobstore.support.BlobMetadata;
1514
import org.elasticsearch.common.bytes.BytesArray;
1615
import org.elasticsearch.common.bytes.BytesReference;
@@ -156,8 +155,7 @@ default boolean supportsConcurrentMultipartUploads() {
156155
/**
157156
* Provides an {@link InputStream} to read a part of the blob content.
158157
*/
159-
@FunctionalInterface
160-
interface BlobMultiPartInputStreamProvider extends CheckedBiFunction<Long, Long, InputStream, IOException> {
158+
interface BlobMultiPartInputStreamProvider {
161159
/**
162160
* Provides an {@link InputStream} to read a part of the blob content.
163161
*
@@ -166,8 +164,7 @@ interface BlobMultiPartInputStreamProvider extends CheckedBiFunction<Long, Long,
166164
* @return an {@link InputStream} to read a part of the blob content.
167165
* @throws IOException if something goes wrong opening the input stream
168166
*/
169-
@Override
170-
InputStream apply(Long offset, Long length) throws IOException;
167+
InputStream apply(long offset, long length) throws IOException;
171168
}
172169

173170
/**

0 commit comments

Comments
 (0)