Class CloudExecutor
- java.lang.Object
-
- com.google.cloud.executor.spanner.CloudExecutor
-
- Direct Known Subclasses:
CloudClientExecutor
public abstract class CloudExecutor extends Object
Superclass of cloud Java Client implementations for cloud requests.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CloudExecutor.Metadata
Metadata is used to hold and retrieve metadata of tables and columns involved in a transaction.class
CloudExecutor.OutcomeSender
OutcomeSender is a utility class used for sending action outcomes back to the client.
-
Field Summary
Fields Modifier and Type Field Description protected static Pattern
DB_NAME
protected boolean
enableGrpcFaultInjector
protected static com.google.auth.http.HttpTransportFactory
HTTP_TRANSPORT_FACTORY
protected static String
PROJECT_ID
-
Constructor Summary
Constructors Constructor Description CloudExecutor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static String
timestampToString(boolean useNanosPrecision, long timestampInMicros)
Converts timestamp microseconds to query-friendly timestamp string.protected static com.google.rpc.Status
toProto(io.grpc.Status status)
Convert a Status to a Status Proto.protected io.grpc.Status
toStatus(SpannerException e)
Map Cloud ErrorCode to Status.
-
-
-
Field Detail
-
DB_NAME
protected static final Pattern DB_NAME
-
PROJECT_ID
protected static final String PROJECT_ID
- See Also:
- Constant Field Values
-
HTTP_TRANSPORT_FACTORY
protected static final com.google.auth.http.HttpTransportFactory HTTP_TRANSPORT_FACTORY
-
enableGrpcFaultInjector
protected boolean enableGrpcFaultInjector
-
-
Method Detail
-
toStatus
protected io.grpc.Status toStatus(SpannerException e)
Map Cloud ErrorCode to Status.
-
toProto
protected static com.google.rpc.Status toProto(io.grpc.Status status)
Convert a Status to a Status Proto.
-
timestampToString
protected static String timestampToString(boolean useNanosPrecision, long timestampInMicros)
Converts timestamp microseconds to query-friendly timestamp string. If useNanosPrecision is set to true it pads input timestamp with 3 random digits treating it as timestamp nanoseconds.
-
-