Tabnine Logo
AwsDataCenterInfo
Code IndexAdd Tabnine to your IDE (free)

How to use
AwsDataCenterInfo
in
com.netflix.eureka2.registry.datacenter

Best Java code snippets using com.netflix.eureka2.registry.datacenter.AwsDataCenterInfo (Showing top 6 results out of 315)

origin: com.netflix.eureka/eureka2-core

public Builder withAwsDataCenter(AwsDataCenterInfo dataCenter) {
  this.region = dataCenter.getRegion();
  this.zone = dataCenter.getZone();
  this.placementGroup = dataCenter.getPlacementGroup();
  this.amiId = dataCenter.getAmiId();
  this.instanceId = dataCenter.getInstanceId();
  this.instanceType = dataCenter.getInstanceType();
  this.privateIP = dataCenter.getPrivateAddress().getIpAddress();
  this.privateHostName = dataCenter.getPrivateAddress().getHostName();
  this.publicIP = dataCenter.getPublicAddress().getIpAddress();
  this.publicHostName = dataCenter.getPublicAddress().getHostName();
  this.eth0mac = dataCenter.getEth0mac();
  this.vpcId = dataCenter.getVpcId();
  this.accountId = dataCenter.getAccountId();
  return this;
}
origin: com.netflix.eureka/eureka2-core

  @Override
  public AwsDataCenterInfo build() {
    if (region == null && zone != null && !zone.isEmpty()) { // We will take it from zone name
      region = zone.substring(0, zone.length() - 1);
    }
    return new AwsDataCenterInfo(this);
  }
}
origin: com.netflix.eureka/eureka2-karyon-admin

  @Override
  public JsonElement serialize(InstanceInfo instanceInfo, Type typeOfSrc, JsonSerializationContext context) {
    JsonObject result = new JsonObject();
    if (AwsDataCenterInfo.class.isAssignableFrom(instanceInfo.getDataCenterInfo().getClass())) {
      final AwsDataCenterInfo dataCenterInfo = (AwsDataCenterInfo) instanceInfo.getDataCenterInfo();
      result.addProperty("instId", dataCenterInfo.getInstanceId());
      if(dataCenterInfo.getPublicAddress() != null) {
        result.addProperty("ip", dataCenterInfo.getPublicAddress().getIpAddress());
        result.addProperty("hostname", dataCenterInfo.getPublicAddress().getHostName());
      }
      result.addProperty("zone", dataCenterInfo.getZone());
      result.addProperty("reg", dataCenterInfo.getRegion());
    }
    result.addProperty("appId", instanceInfo.getApp());
    result.addProperty("status", instanceInfo.getStatus().name());
    result.addProperty("vip", instanceInfo.getVipAddress());
    return result;
  }
}
origin: com.netflix.eureka2/eureka-dashboard

private static String extractInstanceId(InstanceInfo instanceInfo) {
  if (instanceInfo != null &&
      instanceInfo.getDataCenterInfo() != null &&
      AwsDataCenterInfo.class.isAssignableFrom(instanceInfo.getDataCenterInfo().getClass())) {
    final AwsDataCenterInfo dataCenterInfo = (AwsDataCenterInfo) instanceInfo.getDataCenterInfo();
    return dataCenterInfo.getInstanceId();
  }
  return instanceInfo.getId();
}
origin: com.netflix.eureka/eureka2-karyon-admin

public static String extractHostname(InstanceInfo instanceInfo) {
  if (AwsDataCenterInfo.class.isAssignableFrom(instanceInfo.getDataCenterInfo().getClass())) {
    final AwsDataCenterInfo dataCenterInfo = (AwsDataCenterInfo) instanceInfo.getDataCenterInfo();
    return dataCenterInfo.getPublicAddress().getHostName();
  }
  return "";
}
origin: com.netflix.eureka/eureka2-dashboard

private static String extractInstanceId(InstanceInfo instanceInfo) {
  if (instanceInfo != null &&
      instanceInfo.getDataCenterInfo() != null &&
      AwsDataCenterInfo.class.isAssignableFrom(instanceInfo.getDataCenterInfo().getClass())) {
    final AwsDataCenterInfo dataCenterInfo = (AwsDataCenterInfo) instanceInfo.getDataCenterInfo();
    return dataCenterInfo.getInstanceId();
  }
  return instanceInfo.getId();
}
com.netflix.eureka2.registry.datacenterAwsDataCenterInfo

Javadoc

This class represents a location of a server in AWS datacenter.

Most used methods

  • getInstanceId
  • getPublicAddress
  • getRegion
  • getZone
  • <init>
  • getAccountId
  • getAmiId
  • getEth0mac
  • getInstanceType
  • getPlacementGroup
  • getPrivateAddress
  • getVpcId
  • getPrivateAddress,
  • getVpcId

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • getSupportFragmentManager (FragmentActivity)
  • startActivity (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now