Class GCPSpannerInsertOp
java.lang.Object
io.nosqlbench.adapter.gcpspanner.ops.GCPSpannerBaseOp<Long,com.google.cloud.Timestamp>
io.nosqlbench.adapter.gcpspanner.ops.GCPSpannerInsertOp
- All Implemented Interfaces:
CycleOp<com.google.cloud.Timestamp>,LongFunction<com.google.cloud.Timestamp>
This class represents an operation to insert a vector into a Google Cloud Spanner database.
It extends the GCPSpannerBaseOp class and provides the implementation for the applyOp method.
-
Field Summary
Fields inherited from class io.nosqlbench.adapter.gcpspanner.ops.GCPSpannerBaseOp
apiCall, logger, request, spannerClient -
Constructor Summary
ConstructorsConstructorDescriptionGCPSpannerInsertOp(com.google.cloud.spanner.Spanner searchIndexClient, Long requestParam, com.google.cloud.spanner.Mutation mutation, com.google.cloud.spanner.DatabaseClient dbClient) Constructs a new GCPSpannerInsertVectorOp. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.cloud.TimestampapplyOp(long value) Applies the insert operation using the provided mutation.Methods inherited from class io.nosqlbench.adapter.gcpspanner.ops.GCPSpannerBaseOp
apply, toString
-
Constructor Details
-
GCPSpannerInsertOp
public GCPSpannerInsertOp(com.google.cloud.spanner.Spanner searchIndexClient, Long requestParam, com.google.cloud.spanner.Mutation mutation, com.google.cloud.spanner.DatabaseClient dbClient) Constructs a new GCPSpannerInsertVectorOp.- Parameters:
searchIndexClient- the Spanner client used to interact with the databaserequestParam- the request parametermutation- the Mutation object representing the data to be inserteddbClient- the DatabaseClient used to execute the mutation
-
-
Method Details
-
applyOp
public com.google.cloud.Timestamp applyOp(long value) Applies the insert operation using the provided mutation.- Specified by:
applyOpin classGCPSpannerBaseOp<Long,com.google.cloud.Timestamp> - Parameters:
value- the value to be used in the operation- Returns:
- the result of the write operation
-