congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
InstanceInfo$Builder.withInstanceInfo
Code IndexAdd Tabnine to your IDE (free)

How to use
withInstanceInfo
method
in
com.netflix.eureka2.registry.InstanceInfo$Builder

Best Java code snippets using com.netflix.eureka2.registry.InstanceInfo$Builder.withInstanceInfo (Showing top 5 results out of 315)

origin: com.netflix.eureka2/eureka-write-server

final long tempNewVersion = currentVersion + 1;
final InstanceInfo tempNewInfo = new InstanceInfo.Builder()
    .withInstanceInfo(newInfo).withVersion(tempNewVersion).build();
origin: com.netflix.eureka2/eureka-write-server

@Override
public Observable<Void> register(final InstanceInfo instanceInfo) {
  logger.debug("Replicated registry entry: {}", instanceInfo);
  if (STATES.Opened != state.get()) {
    return Observable.error(state.get() == STATES.Closed ? CHANNEL_CLOSED_EXCEPTION : IDLE_STATE_EXCEPTION);
  }
  if (replicationLoop) {
    return Observable.error(REPLICATION_LOOP_EXCEPTION);
  }
  if (instanceInfoById.containsKey(instanceInfo.getId())) {
    logger.info("Overwriting existing registration entry for instance {}", instanceInfo.getId());
  }
  InstanceInfo tempNewInfo = new InstanceInfo.Builder()
      .withInstanceInfo(instanceInfo).withVersion(currentVersion++).build();
  return registry.register(tempNewInfo, replicationSource)
      .ignoreElements()
      .cast(Void.class)
      .doOnCompleted(new Action0() {
        @Override
        public void call() {
          instanceInfoById.put(instanceInfo.getId(), instanceInfo);
        }
      });
}
origin: com.netflix.eureka2/eureka-write-server

@Override
public Observable<Void> update(final InstanceInfo newInfo) {
  logger.debug("Updating existing registry entry. New info= {}", newInfo);
  if (STATES.Opened != state.get()) {
    return Observable.error(state.get() == STATES.Closed ? CHANNEL_CLOSED_EXCEPTION : IDLE_STATE_EXCEPTION);
  }
  if (replicationLoop) {
    return Observable.error(REPLICATION_LOOP_EXCEPTION);
  }
  InstanceInfo currentInfo = instanceInfoById.get(newInfo.getId());
  if (currentInfo == null) {
    logger.info("Replication update request for non-existing entry {}; handling it as an initial registration", newInfo.getId());
    return register(newInfo);
  }
  InstanceInfo tempNewInfo = new InstanceInfo.Builder()
      .withInstanceInfo(newInfo).withVersion(currentVersion++).build();
  Set<Delta<?>> deltas = tempNewInfo.diffOlder(currentInfo);
  logger.debug("Set of InstanceInfo modified fields: {}", deltas);
  return registry.update(tempNewInfo, deltas, replicationSource)
      .ignoreElements()
      .cast(Void.class)
      .doOnCompleted(new Action0() {
        @Override
        public void call() {
          instanceInfoById.put(newInfo.getId(), newInfo);
        }
      });
}
origin: com.netflix.eureka2/eureka-write-server

.withInstanceInfo(instanceInfo).withVersion(tempNewVersion).build();
origin: com.netflix.eureka2/eureka-testkit

@Override
public boolean matches(Object item) {
  if (!(item instanceof InstanceInfo)) {
    return false;
  }
  // Versions may be different
  InstanceInfo target = (InstanceInfo) item;
  if (!expectSameVersion) {
    target = new Builder()
        .withInstanceInfo(target)
        .withVersion(expectedValue.getVersion())
        .build();
  }
  return target.equals(expectedValue);
}
com.netflix.eureka2.registryInstanceInfo$BuilderwithInstanceInfo

Popular methods of InstanceInfo$Builder

  • <init>
  • build
  • withApp
  • withDataCenterInfo
  • withHealthCheckUrls
  • withId
  • withStatus
  • withVipAddress
  • withAppGroup
  • withAsg
  • withHomePageUrl
  • withMetaData
  • withHomePageUrl,
  • withMetaData,
  • withPorts,
  • withSecureVipAddress,
  • withStatusPageUrl,
  • withVersion

Popular in Java

  • Making http post requests using okhttp
  • getResourceAsStream (ClassLoader)
  • setScale (BigDecimal)
  • getExternalFilesDir (Context)
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Collectors (java.util.stream)
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Best IntelliJ 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