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

How to use
SampleInstanceInfo
in
com.netflix.eureka2.testkit.data.builder

Best Java code snippets using com.netflix.eureka2.testkit.data.builder.SampleInstanceInfo (Showing top 20 results out of 315)

origin: com.netflix.eureka/eureka2-testkit

SampleDelta() {
  this(SampleInstanceInfo.DiscoveryServer.build());
}
origin: com.netflix.eureka/eureka2-testkit

  @Override
  public Collection<InstanceInfo> collectionOf(int n) {
    return collectionOf("Discovery", n, SampleInstanceInfo.DiscoveryServer.builder());
  }
};
origin: com.netflix.eureka/eureka2-testkit

public Iterator<InstanceInfo> cluster() {
  return collectionOf(name(), build());
}
origin: com.netflix.eureka/eureka2-testkit

public Builder builder() {
  return templateFor(this.name());
}
origin: com.netflix.eureka/eureka2-test-utils

/**
 * Upload a given number of instances to the registry, forged from the provided
 * template.
 */
public void uploadClusterToRegistry(InstanceInfo template, int size) {
  Iterator<InstanceInfo> instanceIt = SampleInstanceInfo.collectionOf(template.getApp(), template);
  for (int i = 0; i < size; i++) {
    uploadToRegistry(instanceIt.next());
  }
}
origin: com.netflix.eureka/eureka2-test-utils

/**
 * Upload a given number of instances to the registry.
 */
public String uploadClusterToRegistry(SampleInstanceInfo sample, int size) {
  String appName = null;
  for (InstanceInfo item : sample.clusterOf(size)) {
    appName = item.getApp();
    uploadToRegistry(item);
  }
  return appName;
}
origin: com.netflix.eureka/eureka2-testkit

public List<InstanceInfo> clusterOf(int clusterSize) {
  List<InstanceInfo> cluster = new ArrayList<>();
  Iterator<InstanceInfo> clusterIt = cluster();
  for (int i = 0; i < clusterSize; i++) {
    cluster.add(clusterIt.next());
  }
  return cluster;
}
origin: com.netflix.eureka2/eureka-testkit

protected Builder eurekaWriteTemplate(int idx) {
  Builder builder = templateFor(this.name() + '#' + idx);
  builder.withPorts(Sets.asSet(
      SampleServicePort.EurekaRegistrationPort.build(),
      SampleServicePort.EurekaDiscoveryPort.build(),
      SampleServicePort.EurekaReplicationPort.build()
  ));
  return builder;
}
origin: com.netflix.eureka/eureka2-test-utils

public void uploadClusterBatchToRegistry(InstanceInfo template, int size) {
  Iterator<InstanceInfo> instanceIt = SampleInstanceInfo.collectionOf(template.getApp(), template);
  InstanceInfo first = instanceIt.next();
  batchStartFor(first);
  uploadToRegistry(first);
  for (int i = 1; i < size; i++) {
    uploadToRegistry(instanceIt.next());
  }
  batchEndFor(first);
}
origin: com.netflix.eureka/eureka2-test-utils

public String uploadClusterBatchToRegistry(SampleInstanceInfo sample, int size) {
  InstanceInfo first = null;
  for (InstanceInfo item : sample.clusterOf(size)) {
    if (first == null) {
      first = item;
      batchStartFor(item);
    }
    uploadToRegistry(item);
  }
  batchEndFor(first);
  return first.getApp();
}
origin: com.netflix.eureka2/eureka-testkit

SampleDelta() {
  this(SampleInstanceInfo.DiscoveryServer.build());
}
origin: com.netflix.eureka/eureka2-testkit

protected Builder eurekaWriteTemplate(int idx) {
  Builder builder = templateFor(this.name() + '#' + idx);
  builder.withPorts(ExtCollections.asSet(
      SampleServicePort.EurekaRegistrationPort.build(),
      SampleServicePort.EurekaDiscoveryPort.build(),
      SampleServicePort.EurekaReplicationPort.build()
  ));
  return builder;
}
origin: com.netflix.eureka/eureka2-testkit

  @Override
  public Collection<InstanceInfo> collectionOf(int n) {
    return collectionOf("Zuul", n, SampleInstanceInfo.ZuulServer.builder());
  }
},
origin: com.netflix.eureka/eureka2-testkit

@Override
public ChangeNotification<InstanceInfo> newNotification() {
  return newNotification(SampleInstanceInfo.CliServer.build());
}
origin: com.netflix.eureka2/eureka-testkit

  @Override
  public Collection<InstanceInfo> collectionOf(int n) {
    return collectionOf("Zuul", n, SampleInstanceInfo.ZuulServer.builder());
  }
},
origin: com.netflix.eureka/eureka2-test-utils

  @Override
  public AddInstance newMessage() {
    return newMessage(SampleInstanceInfo.ZuulServer.build());
  }
},
origin: com.netflix.eureka2/eureka-testkit

  @Override
  public Collection<InstanceInfo> collectionOf(int n) {
    return collectionOf("Discovery", n, SampleInstanceInfo.DiscoveryServer.builder());
  }
};
origin: com.netflix.eureka/eureka2-test-utils

  @Override
  public AddInstance newMessage() {
    return newMessage(SampleInstanceInfo.DiscoveryServer.build());
  }
};
origin: com.netflix.eureka2/eureka-testkit

public InstanceInfo build() {
  return builder().build();
}
origin: com.netflix.eureka2/eureka-test-utils

  @Override
  public AddInstance newMessage() {
    return newMessage(SampleInstanceInfo.ZuulServer.build());
  }
},
com.netflix.eureka2.testkit.data.builderSampleInstanceInfo

Most used methods

  • build
  • builder
  • collectionOf
  • name
  • templateFor
  • cluster
  • clusterOf

Popular in Java

  • Creating JSON documents from java classes using gson
  • getApplicationContext (Context)
  • startActivity (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top PhpStorm plugins
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