Tabnine Logo
com.palantir.conjure.java.okhttp
Code IndexAdd Tabnine to your IDE (free)

How to use com.palantir.conjure.java.okhttp

Best Java code snippets using com.palantir.conjure.java.okhttp (Showing top 20 results out of 315)

origin: com.palantir.conjure.java.runtime/okhttp-clients

/**
 * Creates an OkHttp client from the given {@link ClientConfiguration}. Note that the configured {@link
 * ClientConfiguration#uris URIs} are initialized in random order.
 */
public static OkHttpClient create(
    ClientConfiguration config, UserAgent userAgent, HostEventsSink hostEventsSink, Class<?> serviceClass) {
  return createInternal(config, userAgent, hostEventsSink, serviceClass, true /* randomize URLs */);
}
origin: com.palantir.conjure.java.runtime/okhttp-clients

/**
 * Returns async limiter that users can subscribe to be notified when limit permit has been granted. Caller must
 * notify the listener to release the permit.
 */
ConcurrencyLimiter acquireLimiter(Request request) {
  return acquireLimiterInternal(limiterKey(request));
}
origin: com.palantir.conjure.java.runtime/okhttp-clients

@Override
public Call clone() {
  return doClone();
}
origin: com.palantir.conjure.java.runtime/okhttp-clients

RemotingOkHttpCall newCallWithMutableState(
    Request request, BackoffStrategy backoffStrategy, int maxNumRelocations) {
  return new RemotingOkHttpCall(
      getDelegate().newCall(request),
      backoffStrategy,
      urls,
      this,
      schedulingExecutor,
      executionExecutor,
      concurrencyLimiters.acquireLimiter(request),
      maxNumRelocations);
}
origin: com.palantir.conjure.java.runtime/okhttp-clients

synchronized ListenableFuture<Limiter.Listener> acquire() {
  SettableFuture<Limiter.Listener> future = SettableFuture.create();
  addSlowAcquireMarker(future);
  waitingRequests.add(future);
  processQueue();
  return future;
}
origin: com.palantir.conjure.java.runtime/okhttp-clients

private static boolean isWindowReady(ImmutableSampleWindow sample) {
  return sample.didDrop() || sample.getSampleCount() > WINDOW_SIZE;
}
origin: com.palantir.conjure.java.runtime/okhttp-clients

static RoundRobinUrlInterceptor create(UrlSelector urls) {
  return new RoundRobinUrlInterceptor(urls);
}
origin: com.palantir.conjure.java.runtime/okhttp-clients

static ConcurrencyLimiterListener of(SettableFuture<Limiter.Listener> limiterListener) {
  return ImmutableConcurrencyLimiterListener.of(limiterListener);
}
origin: com.palantir.conjure.java.runtime/okhttp-clients

static CurrentUrlInterceptor create(UrlSelector urls) {
  return new CurrentUrlInterceptor(urls);
}
origin: com.palantir.conjure.java.runtime/okhttp-clients

public static UserAgentInterceptor of(UserAgent userAgent) {
  return new UserAgentInterceptor(userAgent);
}
origin: com.palantir.conjure.java.runtime/okhttp-clients

static UrlSelectorImpl create(Collection<String> baseUrls, boolean randomizeOrder) {
  return createWithFailedUrlCooldown(baseUrls, randomizeOrder, Duration.ZERO);
}
origin: palantir/conjure-java-runtime

private static Optional<RemoteException> decode(String contentType, int status, @CheckForNull String body) {
  return handler.handle(response(status, contentType, body));
}
origin: palantir/conjure-java-runtime

private OkHttpClient createRetryingClient(int maxNumRetries, Duration backoffSlotSize) {
  return createRetryingClient(maxNumRetries, backoffSlotSize, url);
}
origin: palantir/conjure-java-runtime

RemotingOkHttpCall newCallWithMutableState(
    Request request, BackoffStrategy backoffStrategy, int maxNumRelocations) {
  return new RemotingOkHttpCall(
      getDelegate().newCall(request),
      backoffStrategy,
      urls,
      this,
      schedulingExecutor,
      executionExecutor,
      concurrencyLimiters.acquireLimiter(request),
      maxNumRelocations);
}
origin: palantir/conjure-java-runtime

/**
 * Returns async limiter that users can subscribe to be notified when limit permit has been granted. Caller must
 * notify the listener to release the permit.
 */
ConcurrencyLimiter acquireLimiter(Request request) {
  return acquireLimiterInternal(limiterKey(request));
}
origin: palantir/conjure-java-runtime

/**
 * Creates an OkHttp client from the given {@link ClientConfiguration}. Note that the configured {@link
 * ClientConfiguration#uris URIs} are initialized in random order.
 */
public static OkHttpClient create(
    ClientConfiguration config, UserAgent userAgent, HostEventsSink hostEventsSink, Class<?> serviceClass) {
  return createInternal(config, userAgent, hostEventsSink, serviceClass, true /* randomize URLs */);
}
origin: palantir/conjure-java-runtime

@Override
public Call clone() {
  return doClone();
}
origin: palantir/conjure-java-runtime

static RoundRobinUrlInterceptor create(UrlSelector urls) {
  return new RoundRobinUrlInterceptor(urls);
}
origin: palantir/conjure-java-runtime

static ConcurrencyLimiterListener of(SettableFuture<Limiter.Listener> limiterListener) {
  return ImmutableConcurrencyLimiterListener.of(limiterListener);
}
origin: palantir/conjure-java-runtime

static CurrentUrlInterceptor create(UrlSelector urls) {
  return new CurrentUrlInterceptor(urls);
}
com.palantir.conjure.java.okhttp

Most used classes

  • OkHttpClients
  • HostMetricsRegistry
  • BackoffStrategy
    Defines a strategy for waiting in between successive retries of an operation that is subject to fail
  • ConcurrencyLimiterListener
  • ConcurrencyLimiters$ConcurrencyLimiter
    The Netflix library provides either a blocking approach or a non-blocking approach which might say y
  • ConcurrencyLimitingInterceptor,
  • DefaultHostMetrics,
  • ExponentialBackoff,
  • InstrumentedInterceptor,
  • IoExceptionResponseHandler,
  • IoRemoteException,
  • MeshProxyInterceptor,
  • QosExceptionResponseHandler,
  • RemoteExceptionResponseHandler,
  • UrlSelectorImpl,
  • UserAgentInterceptor,
  • ConcurrencyLimitingInterceptor$ReleaseConcurrencyLimitProxy,
  • ConjureWindowedLimit,
  • CurrentUrlInterceptor
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