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(NoAwaitTag, std::string const &, google::cloud::dataproc::v1::Session const &, std::string const &, Options)
Create an interactive session asynchronously.
Specifying the NoAwaitTag
immediately returns the [google::longrunning::Operation
] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.
Parameters | |
---|---|
Name | Description |
|
NoAwaitTag
|
parent |
std::string const &
|
session |
google::cloud::dataproc::v1::Session const &
|
session_id |
std::string const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
StatusOr< google::longrunning::Operation > |
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 |
CreateSession(NoAwaitTag, google::cloud::dataproc::v1::CreateSessionRequest const &, Options)
Create an interactive session asynchronously.
Specifying the NoAwaitTag
immediately returns the [google::longrunning::Operation
] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.
Parameters | |
---|---|
Name | Description |
|
NoAwaitTag
|
request |
google::cloud::dataproc::v1::CreateSessionRequest const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
StatusOr< google::longrunning::Operation > |
CreateSession(google::longrunning::Operation const &, Options)
Create an interactive session asynchronously.
This method accepts a google::longrunning::Operation
that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.
Parameters | |
---|---|
Name | Description |
operation |
google::longrunning::Operation const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::dataproc::v1::Session > > |
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(NoAwaitTag, std::string const &, Options)
Terminates the interactive session.
Specifying the NoAwaitTag
immediately returns the [google::longrunning::Operation
] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.
Parameters | |
---|---|
Name | Description |
|
NoAwaitTag
|
name |
std::string const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
StatusOr< google::longrunning::Operation > |
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 |
TerminateSession(NoAwaitTag, google::cloud::dataproc::v1::TerminateSessionRequest const &, Options)
Terminates the interactive session.
Specifying the NoAwaitTag
immediately returns the [google::longrunning::Operation
] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.
Parameters | |
---|---|
Name | Description |
|
NoAwaitTag
|
request |
google::cloud::dataproc::v1::TerminateSessionRequest const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
StatusOr< google::longrunning::Operation > |
TerminateSession(google::longrunning::Operation const &, Options)
Terminates the interactive session.
This method accepts a google::longrunning::Operation
that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.
Parameters | |
---|---|
Name | Description |
operation |
google::longrunning::Operation const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::dataproc::v1::Session > > |
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(NoAwaitTag, std::string const &, Options)
Deletes the interactive session resource.
Specifying the NoAwaitTag
immediately returns the [google::longrunning::Operation
] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.
Parameters | |
---|---|
Name | Description |
|
NoAwaitTag
|
name |
std::string const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
StatusOr< google::longrunning::Operation > |
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 |
DeleteSession(NoAwaitTag, google::cloud::dataproc::v1::DeleteSessionRequest const &, Options)
Deletes the interactive session resource.
Specifying the NoAwaitTag
immediately returns the [google::longrunning::Operation
] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.
Parameters | |
---|---|
Name | Description |
|
NoAwaitTag
|
request |
google::cloud::dataproc::v1::DeleteSessionRequest const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
StatusOr< google::longrunning::Operation > |
DeleteSession(google::longrunning::Operation const &, Options)
Deletes the interactive session resource.
This method accepts a google::longrunning::Operation
that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.
Parameters | |
---|---|
Name | Description |
operation |
google::longrunning::Operation const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::dataproc::v1::Session > > |