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
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public interface AsyncBufferedMutator extends Closeable {
* @param mutation The data to send.
*/
default CompletableFuture<Void> mutate(Mutation mutation) {
if (!(mutation instanceof Put) && !(mutation instanceof Delete)) {
throw new UnsupportedOperationException("Only supports Put and Delete mutation");
}
return Iterables.getOnlyElement(mutate(Collections.singletonList(mutation)));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ public Configuration getConfiguration() {

@Override
public void mutate(Mutation mutation) throws IOException {
if (!(mutation instanceof Put) && !(mutation instanceof Delete)) {
throw new UnsupportedOperationException("Only supports Put and Delete mutation");
}
mutate(Collections.singletonList(mutation));
}

Expand Down