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
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,8 @@ public void compareAndExchangeRegister(
listener.onFailure(new UnsupportedOperationException("URL repositories do not support this operation"));
}

@Override
public void getRegister(OperationPurpose purpose, String key, ActionListener<OptionalBytesReference> listener) {
listener.onFailure(new UnsupportedOperationException("URL repositories do not support this operation"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,11 @@ public void compareAndExchangeRegister(
listener.onFailure(new UnsupportedOperationException("HDFS repositories do not support this operation"));
}

@Override
public void getRegister(OperationPurpose purpose, String key, ActionListener<OptionalBytesReference> listener) {
listener.onFailure(new UnsupportedOperationException("HDFS repositories do not support this operation"));
}

private static CreateOpts[] addOptionToArray(final CreateOpts[] opts, final CreateOpts opt) {
if (opts == null) {
return new CreateOpts[] { opt };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import org.elasticsearch.action.ActionListener;
import org.elasticsearch.common.blobstore.support.BlobMetadata;
import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.core.CheckedConsumer;
import org.elasticsearch.repositories.blobstore.BlobStoreRepository;
Expand Down Expand Up @@ -377,9 +376,7 @@ default void compareAndSetRegister(
* @param listener a listener, completed with the value read from the register or {@code OptionalBytesReference#MISSING} if the value
* could not be read due to concurrent activity (which should not happen).
*/
default void getRegister(OperationPurpose purpose, String key, ActionListener<OptionalBytesReference> listener) {
compareAndExchangeRegister(purpose, key, BytesArray.EMPTY, BytesArray.EMPTY, listener);
}
void getRegister(OperationPurpose purpose, String key, ActionListener<OptionalBytesReference> listener);

/**
* Verify that the {@link OperationPurpose} is (somewhat) suitable for the name of the blob to which it applies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,11 @@ public void compareAndExchangeRegister(
listener.onFailure(unsupportedException());
}

@Override
public void getRegister(OperationPurpose purpose, String key, ActionListener<OptionalBytesReference> listener) {
listener.onFailure(unsupportedException());
}

private UnsupportedOperationException unsupportedException() {
assert false : "this operation is not supported and should have not be called";
return new UnsupportedOperationException("This operation is not supported");
Expand Down