@Generated(value="by gapic-generator") @BetaApi public class GameServerDeploymentsServiceClient extends Object implements BackgroundResource
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
String formattedName = GameServerDeploymentsServiceClient.formatGameServerDeploymentName("[PROJECT]", "[LOCATION]", "[GAME_SERVER_DEPLOYMENT]");
GameServerDeployment response = gameServerDeploymentsServiceClient.getGameServerDeployment(formattedName);
}
Note: close() needs to be called on the gameServerDeploymentsServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of GameServerDeploymentsServiceSettings to create(). For example:
To customize credentials:
GameServerDeploymentsServiceSettings gameServerDeploymentsServiceSettings =
GameServerDeploymentsServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
GameServerDeploymentsServiceClient.create(gameServerDeploymentsServiceSettings);
To customize the endpoint:
GameServerDeploymentsServiceSettings gameServerDeploymentsServiceSettings =
GameServerDeploymentsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
GameServerDeploymentsServiceClient.create(gameServerDeploymentsServiceSettings);
Modifier and Type | Class and Description |
---|---|
static class |
GameServerDeploymentsServiceClient.ListGameServerDeploymentsFixedSizeCollection |
static class |
GameServerDeploymentsServiceClient.ListGameServerDeploymentsPage |
static class |
GameServerDeploymentsServiceClient.ListGameServerDeploymentsPagedResponse |
Modifier | Constructor and Description |
---|---|
protected |
GameServerDeploymentsServiceClient(GameServerDeploymentsServiceSettings settings)
Constructs an instance of GameServerDeploymentsServiceClient, using the given settings.
|
protected |
GameServerDeploymentsServiceClient(GameServerDeploymentsServiceStub stub) |
protected GameServerDeploymentsServiceClient(GameServerDeploymentsServiceSettings settings) throws IOException
IOException
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") protected GameServerDeploymentsServiceClient(GameServerDeploymentsServiceStub stub)
@Deprecated public static final String formatGameServerDeploymentName(String project, String location, String gameServerDeployment)
GameServerDeploymentName
class instead.@Deprecated public static final String formatLocationName(String project, String location)
LocationName
class instead.@Deprecated public static final String parseProjectFromGameServerDeploymentName(String gameServerDeploymentName)
GameServerDeploymentName
class instead.@Deprecated public static final String parseLocationFromGameServerDeploymentName(String gameServerDeploymentName)
GameServerDeploymentName
class instead.@Deprecated public static final String parseGameServerDeploymentFromGameServerDeploymentName(String gameServerDeploymentName)
GameServerDeploymentName
class instead.@Deprecated public static final String parseProjectFromLocationName(String locationName)
LocationName
class instead.@Deprecated public static final String parseLocationFromLocationName(String locationName)
LocationName
class instead.public static final GameServerDeploymentsServiceClient create() throws IOException
IOException
public static final GameServerDeploymentsServiceClient create(GameServerDeploymentsServiceSettings settings) throws IOException
IOException
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") public static final GameServerDeploymentsServiceClient create(GameServerDeploymentsServiceStub stub)
public final GameServerDeploymentsServiceSettings getSettings()
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") public GameServerDeploymentsServiceStub getStub()
@BetaApi(value="The surface for long-running operations is not stable yet and may change in the future.") public final OperationsClient getOperationsClient()
public final GameServerDeploymentsServiceClient.ListGameServerDeploymentsPagedResponse listGameServerDeployments(String parent)
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
String formattedParent = GameServerDeploymentsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
for (GameServerDeployment element : gameServerDeploymentsServiceClient.listGameServerDeployments(formattedParent).iterateAll()) {
// doThingsWith(element);
}
}
parent
- Required. The parent resource name, using the form:
`projects/{project}/locations/{location}`.ApiException
- if the remote call failspublic final GameServerDeploymentsServiceClient.ListGameServerDeploymentsPagedResponse listGameServerDeployments(ListGameServerDeploymentsRequest request)
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
String formattedParent = GameServerDeploymentsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
ListGameServerDeploymentsRequest request = ListGameServerDeploymentsRequest.newBuilder()
.setParent(formattedParent)
.build();
for (GameServerDeployment element : gameServerDeploymentsServiceClient.listGameServerDeployments(request).iterateAll()) {
// doThingsWith(element);
}
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call failspublic final UnaryCallable<ListGameServerDeploymentsRequest,GameServerDeploymentsServiceClient.ListGameServerDeploymentsPagedResponse> listGameServerDeploymentsPagedCallable()
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
String formattedParent = GameServerDeploymentsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
ListGameServerDeploymentsRequest request = ListGameServerDeploymentsRequest.newBuilder()
.setParent(formattedParent)
.build();
ApiFuture<ListGameServerDeploymentsPagedResponse> future = gameServerDeploymentsServiceClient.listGameServerDeploymentsPagedCallable().futureCall(request);
// Do something
for (GameServerDeployment element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final UnaryCallable<ListGameServerDeploymentsRequest,ListGameServerDeploymentsResponse> listGameServerDeploymentsCallable()
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
String formattedParent = GameServerDeploymentsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
ListGameServerDeploymentsRequest request = ListGameServerDeploymentsRequest.newBuilder()
.setParent(formattedParent)
.build();
while (true) {
ListGameServerDeploymentsResponse response = gameServerDeploymentsServiceClient.listGameServerDeploymentsCallable().call(request);
for (GameServerDeployment element : response.getGameServerDeploymentsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final GameServerDeployment getGameServerDeployment(String name)
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
String formattedName = GameServerDeploymentsServiceClient.formatGameServerDeploymentName("[PROJECT]", "[LOCATION]", "[GAME_SERVER_DEPLOYMENT]");
GameServerDeployment response = gameServerDeploymentsServiceClient.getGameServerDeployment(formattedName);
}
name
- Required. The name of the game server deployment to retrieve, using the form:
`projects/{project}/locations/{location}/gameServerDeployments/{deployment}`
ApiException
- if the remote call failspublic final GameServerDeployment getGameServerDeployment(GetGameServerDeploymentRequest request)
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
String formattedName = GameServerDeploymentsServiceClient.formatGameServerDeploymentName("[PROJECT]", "[LOCATION]", "[GAME_SERVER_DEPLOYMENT]");
GetGameServerDeploymentRequest request = GetGameServerDeploymentRequest.newBuilder()
.setName(formattedName)
.build();
GameServerDeployment response = gameServerDeploymentsServiceClient.getGameServerDeployment(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call failspublic final UnaryCallable<GetGameServerDeploymentRequest,GameServerDeployment> getGameServerDeploymentCallable()
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
String formattedName = GameServerDeploymentsServiceClient.formatGameServerDeploymentName("[PROJECT]", "[LOCATION]", "[GAME_SERVER_DEPLOYMENT]");
GetGameServerDeploymentRequest request = GetGameServerDeploymentRequest.newBuilder()
.setName(formattedName)
.build();
ApiFuture<GameServerDeployment> future = gameServerDeploymentsServiceClient.getGameServerDeploymentCallable().futureCall(request);
// Do something
GameServerDeployment response = future.get();
}
@BetaApi(value="The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<GameServerDeployment,Empty> createGameServerDeploymentAsync(String parent, String deploymentId, GameServerDeployment gameServerDeployment)
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
String formattedParent = GameServerDeploymentsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
String deploymentId = "";
GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
GameServerDeployment response = gameServerDeploymentsServiceClient.createGameServerDeploymentAsync(formattedParent, deploymentId, gameServerDeployment).get();
}
parent
- Required. The parent resource name, using the form:
`projects/{project}/locations/{location}`.deploymentId
- Required. The ID of the game server deployment resource to be created.gameServerDeployment
- Required. The game server deployment resource to be created.ApiException
- if the remote call fails@BetaApi(value="The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<GameServerDeployment,Empty> createGameServerDeploymentAsync(CreateGameServerDeploymentRequest request)
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
String formattedParent = GameServerDeploymentsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
String deploymentId = "";
GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
CreateGameServerDeploymentRequest request = CreateGameServerDeploymentRequest.newBuilder()
.setParent(formattedParent)
.setDeploymentId(deploymentId)
.setGameServerDeployment(gameServerDeployment)
.build();
GameServerDeployment response = gameServerDeploymentsServiceClient.createGameServerDeploymentAsync(request).get();
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call fails@BetaApi(value="The surface for use by generated code is not stable yet and may change in the future.") public final OperationCallable<CreateGameServerDeploymentRequest,GameServerDeployment,Empty> createGameServerDeploymentOperationCallable()
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
String formattedParent = GameServerDeploymentsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
String deploymentId = "";
GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
CreateGameServerDeploymentRequest request = CreateGameServerDeploymentRequest.newBuilder()
.setParent(formattedParent)
.setDeploymentId(deploymentId)
.setGameServerDeployment(gameServerDeployment)
.build();
OperationFuture<GameServerDeployment, Empty> future = gameServerDeploymentsServiceClient.createGameServerDeploymentOperationCallable().futureCall(request);
// Do something
GameServerDeployment response = future.get();
}
public final UnaryCallable<CreateGameServerDeploymentRequest,Operation> createGameServerDeploymentCallable()
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
String formattedParent = GameServerDeploymentsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
String deploymentId = "";
GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
CreateGameServerDeploymentRequest request = CreateGameServerDeploymentRequest.newBuilder()
.setParent(formattedParent)
.setDeploymentId(deploymentId)
.setGameServerDeployment(gameServerDeployment)
.build();
ApiFuture<Operation> future = gameServerDeploymentsServiceClient.createGameServerDeploymentCallable().futureCall(request);
// Do something
Operation response = future.get();
}
@BetaApi(value="The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<Empty,Empty> deleteGameServerDeploymentAsync(String name)
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
String formattedName = GameServerDeploymentsServiceClient.formatGameServerDeploymentName("[PROJECT]", "[LOCATION]", "[GAME_SERVER_DEPLOYMENT]");
gameServerDeploymentsServiceClient.deleteGameServerDeploymentAsync(formattedName).get();
}
name
- Required. The name of the game server deployment to delete, using the form:
`projects/{project}/locations/{location}/gameServerDeployments/{deployment}`
ApiException
- if the remote call fails@BetaApi(value="The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<Empty,Empty> deleteGameServerDeploymentAsync(DeleteGameServerDeploymentRequest request)
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
String formattedName = GameServerDeploymentsServiceClient.formatGameServerDeploymentName("[PROJECT]", "[LOCATION]", "[GAME_SERVER_DEPLOYMENT]");
DeleteGameServerDeploymentRequest request = DeleteGameServerDeploymentRequest.newBuilder()
.setName(formattedName)
.build();
gameServerDeploymentsServiceClient.deleteGameServerDeploymentAsync(request).get();
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call fails@BetaApi(value="The surface for use by generated code is not stable yet and may change in the future.") public final OperationCallable<DeleteGameServerDeploymentRequest,Empty,Empty> deleteGameServerDeploymentOperationCallable()
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
String formattedName = GameServerDeploymentsServiceClient.formatGameServerDeploymentName("[PROJECT]", "[LOCATION]", "[GAME_SERVER_DEPLOYMENT]");
DeleteGameServerDeploymentRequest request = DeleteGameServerDeploymentRequest.newBuilder()
.setName(formattedName)
.build();
OperationFuture<Empty, Empty> future = gameServerDeploymentsServiceClient.deleteGameServerDeploymentOperationCallable().futureCall(request);
// Do something
future.get();
}
public final UnaryCallable<DeleteGameServerDeploymentRequest,Operation> deleteGameServerDeploymentCallable()
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
String formattedName = GameServerDeploymentsServiceClient.formatGameServerDeploymentName("[PROJECT]", "[LOCATION]", "[GAME_SERVER_DEPLOYMENT]");
DeleteGameServerDeploymentRequest request = DeleteGameServerDeploymentRequest.newBuilder()
.setName(formattedName)
.build();
ApiFuture<Operation> future = gameServerDeploymentsServiceClient.deleteGameServerDeploymentCallable().futureCall(request);
// Do something
future.get();
}
@BetaApi(value="The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<GameServerDeployment,Empty> updateGameServerDeploymentAsync(GameServerDeployment gameServerDeployment, FieldMask updateMask)
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
GameServerDeployment response = gameServerDeploymentsServiceClient.updateGameServerDeploymentAsync(gameServerDeployment, updateMask).get();
}
gameServerDeployment
- Required. The game server deployment to be updated. Only fields
specified in update_mask are updated.updateMask
- Required. Mask of fields to update. At least one path must be supplied in
this field. For the `FieldMask` definition, see
https: //developers.google.com/protocol-buffers // /docs/reference/google.protobuf#fieldmask
ApiException
- if the remote call fails@BetaApi(value="The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<GameServerDeployment,Empty> updateGameServerDeploymentAsync(UpdateGameServerDeploymentRequest request)
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
UpdateGameServerDeploymentRequest request = UpdateGameServerDeploymentRequest.newBuilder()
.setGameServerDeployment(gameServerDeployment)
.setUpdateMask(updateMask)
.build();
GameServerDeployment response = gameServerDeploymentsServiceClient.updateGameServerDeploymentAsync(request).get();
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call fails@BetaApi(value="The surface for use by generated code is not stable yet and may change in the future.") public final OperationCallable<UpdateGameServerDeploymentRequest,GameServerDeployment,Empty> updateGameServerDeploymentOperationCallable()
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
UpdateGameServerDeploymentRequest request = UpdateGameServerDeploymentRequest.newBuilder()
.setGameServerDeployment(gameServerDeployment)
.setUpdateMask(updateMask)
.build();
OperationFuture<GameServerDeployment, Empty> future = gameServerDeploymentsServiceClient.updateGameServerDeploymentOperationCallable().futureCall(request);
// Do something
GameServerDeployment response = future.get();
}
public final UnaryCallable<UpdateGameServerDeploymentRequest,Operation> updateGameServerDeploymentCallable()
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
UpdateGameServerDeploymentRequest request = UpdateGameServerDeploymentRequest.newBuilder()
.setGameServerDeployment(gameServerDeployment)
.setUpdateMask(updateMask)
.build();
ApiFuture<Operation> future = gameServerDeploymentsServiceClient.updateGameServerDeploymentCallable().futureCall(request);
// Do something
Operation response = future.get();
}
public final GameServerDeploymentRollout getGameServerDeploymentRollout(GetGameServerDeploymentRolloutRequest request)
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
GetGameServerDeploymentRolloutRequest request = GetGameServerDeploymentRolloutRequest.newBuilder().build();
GameServerDeploymentRollout response = gameServerDeploymentsServiceClient.getGameServerDeploymentRollout(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call failspublic final UnaryCallable<GetGameServerDeploymentRolloutRequest,GameServerDeploymentRollout> getGameServerDeploymentRolloutCallable()
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
GetGameServerDeploymentRolloutRequest request = GetGameServerDeploymentRolloutRequest.newBuilder().build();
ApiFuture<GameServerDeploymentRollout> future = gameServerDeploymentsServiceClient.getGameServerDeploymentRolloutCallable().futureCall(request);
// Do something
GameServerDeploymentRollout response = future.get();
}
public final Operation updateGameServerDeploymentRollout(UpdateGameServerDeploymentRolloutRequest request)
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
UpdateGameServerDeploymentRolloutRequest request = UpdateGameServerDeploymentRolloutRequest.newBuilder().build();
Operation response = gameServerDeploymentsServiceClient.updateGameServerDeploymentRollout(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call failspublic final UnaryCallable<UpdateGameServerDeploymentRolloutRequest,Operation> updateGameServerDeploymentRolloutCallable()
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
UpdateGameServerDeploymentRolloutRequest request = UpdateGameServerDeploymentRolloutRequest.newBuilder().build();
ApiFuture<Operation> future = gameServerDeploymentsServiceClient.updateGameServerDeploymentRolloutCallable().futureCall(request);
// Do something
Operation response = future.get();
}
public final PreviewGameServerDeploymentRolloutResponse previewGameServerDeploymentRollout(PreviewGameServerDeploymentRolloutRequest request)
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
PreviewGameServerDeploymentRolloutRequest request = PreviewGameServerDeploymentRolloutRequest.newBuilder().build();
PreviewGameServerDeploymentRolloutResponse response = gameServerDeploymentsServiceClient.previewGameServerDeploymentRollout(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call failspublic final UnaryCallable<PreviewGameServerDeploymentRolloutRequest,PreviewGameServerDeploymentRolloutResponse> previewGameServerDeploymentRolloutCallable()
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
PreviewGameServerDeploymentRolloutRequest request = PreviewGameServerDeploymentRolloutRequest.newBuilder().build();
ApiFuture<PreviewGameServerDeploymentRolloutResponse> future = gameServerDeploymentsServiceClient.previewGameServerDeploymentRolloutCallable().futureCall(request);
// Do something
PreviewGameServerDeploymentRolloutResponse response = future.get();
}
public final FetchDeploymentStateResponse fetchDeploymentState(FetchDeploymentStateRequest request)
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
FetchDeploymentStateRequest request = FetchDeploymentStateRequest.newBuilder().build();
FetchDeploymentStateResponse response = gameServerDeploymentsServiceClient.fetchDeploymentState(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call failspublic final UnaryCallable<FetchDeploymentStateRequest,FetchDeploymentStateResponse> fetchDeploymentStateCallable()
Sample code:
try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
FetchDeploymentStateRequest request = FetchDeploymentStateRequest.newBuilder().build();
ApiFuture<FetchDeploymentStateResponse> future = gameServerDeploymentsServiceClient.fetchDeploymentStateCallable().futureCall(request);
// Do something
FetchDeploymentStateResponse response = future.get();
}
public final void close()
close
in interface AutoCloseable
public void shutdown()
shutdown
in interface BackgroundResource
public boolean isShutdown()
isShutdown
in interface BackgroundResource
public boolean isTerminated()
isTerminated
in interface BackgroundResource
public void shutdownNow()
shutdownNow
in interface BackgroundResource
public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
awaitTermination
in interface BackgroundResource
InterruptedException
Copyright © 2020 Google LLC. All rights reserved.