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

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

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

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-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

  @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.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;
}
com.netflix.eureka2.registry.datacenterAwsDataCenterInfogetInstanceId

Popular methods of AwsDataCenterInfo

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

Popular in Java

  • Reactive rest calls using spring rest template
  • getApplicationContext (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onRequestPermissionsResult (Fragment)
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • BoxLayout (javax.swing)
  • JOptionPane (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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