The SessionController
provides methods to manage interactive sessions.
Equality
Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection>
objects compare equal. Objects that compare equal share the same underlying resources.
Performance
Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.
Thread Safety
Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.
Constructors
SessionControllerClient(SessionControllerClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
SessionControllerClient const &
|
SessionControllerClient(SessionControllerClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
SessionControllerClient &&
|
SessionControllerClient(std::shared_ptr< SessionControllerConnection >, Options)
Parameters | |
---|---|
Name | Description |
connection |
std::shared_ptr< SessionControllerConnection >
|
opts |
Options
|
Operators
operator=(SessionControllerClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
SessionControllerClient const &
|
Returns | |
---|---|
Type | Description |
SessionControllerClient & |
operator=(SessionControllerClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
SessionControllerClient &&
|
Returns | |
---|---|
Type | Description |
SessionControllerClient & |
Functions
CreateSession(std::string const &, google::cloud::dataproc::v1::Session const &, std::string const &, Options)
Create an interactive session asynchronously.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The parent resource where this session will be created. |
session |
google::cloud::dataproc::v1::Session const &
Required. The interactive session to create. |
session_id |
std::string const &
Required. The ID to use for the session, which becomes the final component of the session's resource name. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::dataproc::v1::Session > > |
A |
CreateSession(google::cloud::dataproc::v1::CreateSessionRequest const &, Options)
Create an interactive session asynchronously.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::dataproc::v1::CreateSessionRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::dataproc::v1::Session > > |
A |
GetSession(std::string const &, Options)
Gets the resource representation for an interactive session.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The name of the session to retrieve. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::dataproc::v1::Session > |
the result of the RPC. The response message type (google.cloud.dataproc.v1.Session) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetSession(google::cloud::dataproc::v1::GetSessionRequest const &, Options)
Gets the resource representation for an interactive session.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::dataproc::v1::GetSessionRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::dataproc::v1::Session > |
the result of the RPC. The response message type (google.cloud.dataproc.v1.Session) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ListSessions(std::string const &, Options)
Lists interactive sessions.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The parent, which owns this collection of sessions. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::dataproc::v1::Session > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListSessions(google::cloud::dataproc::v1::ListSessionsRequest, Options)
Lists interactive sessions.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::dataproc::v1::ListSessionsRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::dataproc::v1::Session > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
TerminateSession(std::string const &, Options)
Terminates the interactive session.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The name of the session resource to terminate. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::dataproc::v1::Session > > |
A |
TerminateSession(google::cloud::dataproc::v1::TerminateSessionRequest const &, Options)
Terminates the interactive session.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::dataproc::v1::TerminateSessionRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::dataproc::v1::Session > > |
A |
DeleteSession(std::string const &, Options)
Deletes the interactive session resource.
If the session is not in terminal state, it is terminated, and then deleted.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The name of the session resource to delete. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::dataproc::v1::Session > > |
A |
DeleteSession(google::cloud::dataproc::v1::DeleteSessionRequest const &, Options)
Deletes the interactive session resource.
If the session is not in terminal state, it is terminated, and then deleted.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::dataproc::v1::DeleteSessionRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::dataproc::v1::Session > > |
A |