public class Ec2BootstrapGatewayProvider extends BootstrapGatewayProvider
BootstrapGatewayProvider
implementation that can be used with
GridConnection.connect(String, BootstrapGatewayProvider)
to connect to
ScaleOut hosts running in an Amazon EC2 environment.
If an EC2BootstrapGatewayProvider instance is supplied to
GridConnection.connect(String, BootstrapGatewayProvider)
, the following
exceptions may be thrown during the initial connection or during cache operations
when the library attempts to reconnect to instances of the ScaleOut service:
Exception | Description |
---|---|
Ec2AdapterException |
No EC2 instances were found with the ScaleOut store name supplied to the
EC2BootstrapGatewayProvider's constructor, or a ScaleOut EC2 instance contains
invalid metadata in its __soss_metadata tag.
|
Ec2TagMissingException |
ScaleOut EC2 instances are missing tag metadata (the __soss_metadata tag)
that is required for client connections. This tag is set automatically by the
CloudFormation template used to deploy the ScaleOut service.
|
Ec2Exception | AWS libraries encountered an error while querying EC2 instance metadata (bad credentials, insufficient permissions, incorrect region name, etc.). |
_scaleoutStoreName
Constructor and Description |
---|
Ec2BootstrapGatewayProvider(java.lang.String storeName,
GatewayType gatewayType,
software.amazon.awssdk.services.ec2.Ec2Client client)
Construct the Ec2BootstrapGatewayProvider with the EC2 deployed StoreName, gateway type, and an initialized ec2 client.
|
Ec2BootstrapGatewayProvider(java.lang.String scaleoutStoreName,
GatewayType gatewayType,
java.lang.String awsAccessKeyId,
java.lang.String awsSecretKey,
java.lang.String awsRegionName)
Construct the Ec2BootstrapGatewayProvider with the EC2 deployed StoreName, gateway type, and credentials to initialize an Ec2Client.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<BootstrapGateway> |
getBootstrapGateways()
Retrieves the ScaleOut host's gateway addresses running in an Amazon EC2 environment.
|
getScaleoutStoreName
public Ec2BootstrapGatewayProvider(java.lang.String storeName, GatewayType gatewayType, software.amazon.awssdk.services.ec2.Ec2Client client)
storeName
- the EC2 deployed StoreName.gatewayType
- the type of gateway to return.client
- an initialized client.public Ec2BootstrapGatewayProvider(java.lang.String scaleoutStoreName, GatewayType gatewayType, java.lang.String awsAccessKeyId, java.lang.String awsSecretKey, java.lang.String awsRegionName)
scaleoutStoreName
- the EC2 deployed StoreName.gatewayType
- the type of gateway to return.awsAccessKeyId
- the AWS access key ID.awsSecretKey
- the AWS secret key.awsRegionName
- the AWS region name.public java.util.List<BootstrapGateway> getBootstrapGateways()
getBootstrapGateways
in class BootstrapGatewayProvider