tech.ytsaurus.client.ImmutableTransactionalClient Maven / Gradle / Ivy
The newest version!
package tech.ytsaurus.client;
import java.time.Duration;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import javax.annotation.Nullable;
import tech.ytsaurus.client.request.AbstractLookupRowsRequest;
import tech.ytsaurus.client.request.MultiLookupRowsRequest;
import tech.ytsaurus.client.request.SelectRowsRequest;
import tech.ytsaurus.client.rows.ConsumerSource;
import tech.ytsaurus.client.rows.UnversionedRowset;
import tech.ytsaurus.client.rows.VersionedRowset;
import tech.ytsaurus.core.rows.YTreeRowSerializer;
public interface ImmutableTransactionalClient {
CompletableFuture lookupRows(AbstractLookupRowsRequest, ?> request);
@Deprecated
default CompletableFuture lookupRows(
AbstractLookupRowsRequest.Builder, ?> request) {
return lookupRows(request.build());
}
CompletableFuture> lookupRows(
AbstractLookupRowsRequest, ?> request,
YTreeRowSerializer serializer
);
@Deprecated
default CompletableFuture> lookupRows(
AbstractLookupRowsRequest.Builder, ?> request,
YTreeRowSerializer serializer
) {
return lookupRows(request.build(), serializer);
}
CompletableFuture> multiLookupRows(MultiLookupRowsRequest request);
CompletableFuture>> multiLookupRows(
MultiLookupRowsRequest request,
YTreeRowSerializer serializer
);
CompletableFuture versionedLookupRows(AbstractLookupRowsRequest, ?> request);
@Deprecated
default CompletableFuture versionedLookupRows(
AbstractLookupRowsRequest.Builder, ?> request) {
return versionedLookupRows(request.build());
}
CompletableFuture selectRows(SelectRowsRequest request);
CompletableFuture> selectRows(
SelectRowsRequest request,
YTreeRowSerializer serializer
);
CompletableFuture selectRows(SelectRowsRequest request, YTreeRowSerializer serializer,
ConsumerSource consumer);
CompletableFuture selectRowsV2(SelectRowsRequest request);
default CompletableFuture selectRows(
SelectRowsRequest.BuilderBase> request) {
return selectRows(request.build());
}
default CompletableFuture> selectRows(
SelectRowsRequest.BuilderBase> request,
YTreeRowSerializer serializer
) {
return selectRows(request.build(), serializer);
}
default CompletableFuture selectRows(
SelectRowsRequest.BuilderBase> request,
YTreeRowSerializer serializer,
ConsumerSource consumer
) {
return selectRows(request.build(), serializer, consumer);
}
default CompletableFuture selectRowsV2(
SelectRowsRequest.BuilderBase> request) {
return selectRowsV2(request.build());
}
default CompletableFuture selectRows(String query) {
return selectRows(query, null);
}
default CompletableFuture selectRows(String query, @Nullable Duration requestTimeout) {
return selectRows(SelectRowsRequest.builder().setQuery(query).setTimeout(requestTimeout).build());
}
}