com.google.cloud.bigtable.grpc
Class BigtableDataGCJClient
- java.lang.Object
-
- com.google.cloud.bigtable.grpc.BigtableDataGCJClient
-
- All Implemented Interfaces:
- IBigtableDataClient, AutoCloseable
public class BigtableDataGCJClient extends Object implements IBigtableDataClient, AutoCloseable
This class implements existingIBigtableDataClient
operations with Google-cloud-java'sBigtableDataClient
.
-
-
Constructor Summary
Constructors Constructor and Description BigtableDataGCJClient(com.google.cloud.bigtable.data.v2.BigtableDataClient delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Boolean
checkAndMutateRow(com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation conditionalRowMutation)
Mutate a row atomically dependent on a precondition.com.google.api.core.ApiFuture<Boolean>
checkAndMutateRowAsync(com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation conditionalRowMutation)
Mutate a row atomically dependent on a precondition.void
close()
IBulkMutation
createBulkMutationBatcher()
CreatesIBulkMutation
batcher.void
mutateRow(com.google.cloud.bigtable.data.v2.models.RowMutation rowMutation)
Mutate a row atomically.com.google.api.core.ApiFuture<Void>
mutateRowAsync(com.google.cloud.bigtable.data.v2.models.RowMutation rowMutation)
Mutate a row atomically.ResultScanner<FlatRow>
readFlatRows(com.google.cloud.bigtable.data.v2.models.Query request)
Perform a scan overFlatRow
s, in key order.com.google.api.core.ApiFuture<List<FlatRow>>
readFlatRowsAsync(com.google.cloud.bigtable.data.v2.models.Query request)
Read multipleFlatRow
s into an in-memory list, in key order.void
readFlatRowsAsync(com.google.cloud.bigtable.data.v2.models.Query request, io.grpc.stub.StreamObserver<FlatRow> observer)
ReadFlatRow
asynchronously, and pass them to a stream observer to be processed.List<FlatRow>
readFlatRowsList(com.google.cloud.bigtable.data.v2.models.Query request)
Returns a list ofFlatRow
s, in key order.com.google.cloud.bigtable.data.v2.models.Row
readModifyWriteRow(com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow readModifyWriteRow)
Perform an atomic read-modify-write operation on a row.com.google.api.core.ApiFuture<com.google.cloud.bigtable.data.v2.models.Row>
readModifyWriteRowAsync(com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow readModifyWriteRow)
Perform an atomic read-modify-write operation on a row.ResultScanner<com.google.cloud.bigtable.data.v2.models.Row>
readRows(com.google.cloud.bigtable.data.v2.models.Query request)
Perform a scan overRow
s, in key order.com.google.api.core.ApiFuture<List<com.google.cloud.bigtable.data.v2.models.Row>>
readRowsAsync(com.google.cloud.bigtable.data.v2.models.Query request)
Read multipleRow
s into an in-memory list, in key order.List<com.google.cloud.bigtable.data.v2.models.KeyOffset>
sampleRowKeys(String tableId)
Sample row keys from a table.com.google.api.core.ApiFuture<List<com.google.cloud.bigtable.data.v2.models.KeyOffset>>
sampleRowKeysAsync(String tableId)
Sample row keys from a table, returning a Future that will complete when the sampling has completed.
-
-
-
Constructor Detail
-
BigtableDataGCJClient
public BigtableDataGCJClient(com.google.cloud.bigtable.data.v2.BigtableDataClient delegate)
-
-
Method Detail
-
mutateRow
public void mutateRow(com.google.cloud.bigtable.data.v2.models.RowMutation rowMutation)
Description copied from interface:IBigtableDataClient
Mutate a row atomically.- Specified by:
mutateRow
in interfaceIBigtableDataClient
- Parameters:
rowMutation
- aRowMutation
model object.
-
mutateRowAsync
public com.google.api.core.ApiFuture<Void> mutateRowAsync(com.google.cloud.bigtable.data.v2.models.RowMutation rowMutation)
Description copied from interface:IBigtableDataClient
Mutate a row atomically.- Specified by:
mutateRowAsync
in interfaceIBigtableDataClient
- Parameters:
rowMutation
- aRowMutation
model object.- Returns:
- a
ApiFuture
of typeVoid
will be set when request is successful otherwise exception will be thrown.
-
readModifyWriteRow
public com.google.cloud.bigtable.data.v2.models.Row readModifyWriteRow(com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow readModifyWriteRow)
Description copied from interface:IBigtableDataClient
Perform an atomic read-modify-write operation on a row.- Specified by:
readModifyWriteRow
in interfaceIBigtableDataClient
- Parameters:
readModifyWriteRow
- aReadModifyWriteRow
model object.- Returns:
Row
a modified row.
-
readModifyWriteRowAsync
public com.google.api.core.ApiFuture<com.google.cloud.bigtable.data.v2.models.Row> readModifyWriteRowAsync(com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow readModifyWriteRow)
Description copied from interface:IBigtableDataClient
Perform an atomic read-modify-write operation on a row.- Specified by:
readModifyWriteRowAsync
in interfaceIBigtableDataClient
- Parameters:
readModifyWriteRow
- aReadModifyWriteRow
model object.- Returns:
- a
ApiFuture
of typeRow
will be set when request is successful otherwise exception will be thrown.
-
createBulkMutationBatcher
public IBulkMutation createBulkMutationBatcher()
Description copied from interface:IBigtableDataClient
CreatesIBulkMutation
batcher.- Specified by:
createBulkMutationBatcher
in interfaceIBigtableDataClient
-
checkAndMutateRow
public Boolean checkAndMutateRow(com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation conditionalRowMutation)
Description copied from interface:IBigtableDataClient
Mutate a row atomically dependent on a precondition.- Specified by:
checkAndMutateRow
in interfaceIBigtableDataClient
- Parameters:
conditionalRowMutation
- aConditionalRowMutation
model object.- Returns:
- returns true if predicate returns any result.
-
checkAndMutateRowAsync
public com.google.api.core.ApiFuture<Boolean> checkAndMutateRowAsync(com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation conditionalRowMutation)
Description copied from interface:IBigtableDataClient
Mutate a row atomically dependent on a precondition.- Specified by:
checkAndMutateRowAsync
in interfaceIBigtableDataClient
- Parameters:
conditionalRowMutation
- aConditionalRowMutation
model object.- Returns:
- a
ApiFuture
of typeBoolean
will be set when request is successful otherwise exception will be thrown.
-
sampleRowKeys
public List<com.google.cloud.bigtable.data.v2.models.KeyOffset> sampleRowKeys(String tableId)
Description copied from interface:IBigtableDataClient
Sample row keys from a table.- Specified by:
sampleRowKeys
in interfaceIBigtableDataClient
- Parameters:
tableId
- a String object.- Returns:
- an immutable
List
object.
-
sampleRowKeysAsync
public com.google.api.core.ApiFuture<List<com.google.cloud.bigtable.data.v2.models.KeyOffset>> sampleRowKeysAsync(String tableId)
Description copied from interface:IBigtableDataClient
Sample row keys from a table, returning a Future that will complete when the sampling has completed.- Specified by:
sampleRowKeysAsync
in interfaceIBigtableDataClient
- Parameters:
tableId
- a String object.- Returns:
- a
ApiFuture
object.
-
readRows
public ResultScanner<com.google.cloud.bigtable.data.v2.models.Row> readRows(com.google.cloud.bigtable.data.v2.models.Query request)
Description copied from interface:IBigtableDataClient
Perform a scan overRow
s, in key order.- Specified by:
readRows
in interfaceIBigtableDataClient
- Parameters:
request
- aQuery
object.- Returns:
- a
Row
object.
-
readRowsAsync
public com.google.api.core.ApiFuture<List<com.google.cloud.bigtable.data.v2.models.Row>> readRowsAsync(com.google.cloud.bigtable.data.v2.models.Query request)
Description copied from interface:IBigtableDataClient
Read multipleRow
s into an in-memory list, in key order.- Specified by:
readRowsAsync
in interfaceIBigtableDataClient
- Parameters:
request
- aQuery
object.- Returns:
- a
ApiFuture
that will finish when all reads have completed.
-
readFlatRowsList
public List<FlatRow> readFlatRowsList(com.google.cloud.bigtable.data.v2.models.Query request)
Description copied from interface:IBigtableDataClient
Returns a list ofFlatRow
s, in key order.- Specified by:
readFlatRowsList
in interfaceIBigtableDataClient
- Parameters:
request
- aQuery
object.- Returns:
- a List with
FlatRow
s.
-
readFlatRows
public ResultScanner<FlatRow> readFlatRows(com.google.cloud.bigtable.data.v2.models.Query request)
Description copied from interface:IBigtableDataClient
Perform a scan overFlatRow
s, in key order.- Specified by:
readFlatRows
in interfaceIBigtableDataClient
- Parameters:
request
- aQuery
object.- Returns:
- a
ResultScanner
object.
-
readFlatRowsAsync
public com.google.api.core.ApiFuture<List<FlatRow>> readFlatRowsAsync(com.google.cloud.bigtable.data.v2.models.Query request)
Description copied from interface:IBigtableDataClient
Read multipleFlatRow
s into an in-memory list, in key order.- Specified by:
readFlatRowsAsync
in interfaceIBigtableDataClient
- Parameters:
request
- aQuery
object.- Returns:
- a
ApiFuture
that will finish when all reads have completed.
-
readFlatRowsAsync
public void readFlatRowsAsync(com.google.cloud.bigtable.data.v2.models.Query request, io.grpc.stub.StreamObserver<FlatRow> observer)
Description copied from interface:IBigtableDataClient
ReadFlatRow
asynchronously, and pass them to a stream observer to be processed.- Specified by:
readFlatRowsAsync
in interfaceIBigtableDataClient
- Parameters:
request
- aQuery
object.observer
- aStreamObserver
object.
-
close
public void close() throws Exception
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
-