com.google.cloud.bigtable.hbase.adapters
Class HBaseMutationAdapter
- java.lang.Object
-
- com.google.cloud.bigtable.hbase.adapters.MutationAdapter<Mutation>
-
- com.google.cloud.bigtable.hbase.adapters.HBaseMutationAdapter
-
- All Implemented Interfaces:
- OperationAdapter<Mutation,com.google.cloud.bigtable.data.v2.models.MutationApi<?>>
public class HBaseMutationAdapter extends MutationAdapter<Mutation>
Adapt a generic Mutation to a Google Cloud JavaMutationApi
.This class uses instanceof checking to determine an appropriate adaptation to apply.
- Version:
- $Id: $Id
- Author:
- sduskis
-
-
Constructor Summary
Constructors Constructor and Description HBaseMutationAdapter(MutationAdapter<Delete> deleteAdapter, MutationAdapter<Put> putAdapter, MutationAdapter<Increment> incrementAdapter, MutationAdapter<Append> appendAdapter)
Constructor for MutationAdapter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
adapt(Mutation mutation, com.google.cloud.bigtable.data.v2.models.MutationApi<?> mutationModel)
Converts an HBaseRow
which represents a set of changes to a single row from an HBase perspective to a Google Cloud JavaMutationApi
which represent the set of changes.-
Methods inherited from class com.google.cloud.bigtable.hbase.adapters.MutationAdapter
getBytes
-
-
-
-
Constructor Detail
-
HBaseMutationAdapter
public HBaseMutationAdapter(MutationAdapter<Delete> deleteAdapter, MutationAdapter<Put> putAdapter, MutationAdapter<Increment> incrementAdapter, MutationAdapter<Append> appendAdapter)
Constructor for MutationAdapter.- Parameters:
deleteAdapter
- aOperationAdapter
object.putAdapter
- aOperationAdapter
object.incrementAdapter
- aOperationAdapter
object.appendAdapter
- aOperationAdapter
object.
-
-
Method Detail
-
adapt
public void adapt(Mutation mutation, com.google.cloud.bigtable.data.v2.models.MutationApi<?> mutationModel)
Converts an HBaseRow
which represents a set of changes to a single row from an HBase perspective to a Google Cloud JavaMutationApi
which represent the set of changes.- Specified by:
adapt
in interfaceOperationAdapter<Mutation,com.google.cloud.bigtable.data.v2.models.MutationApi<?>>
- Specified by:
adapt
in classMutationAdapter<Mutation>
- Parameters:
mutation
- The HBaseRow
to convertmutationModel
- The modelMutationApi
-
-