Codota Logo
org.apache.bookkeeper.clients.config
Code IndexAdd Codota to your IDE (free)

How to use org.apache.bookkeeper.clients.config

Best Java code snippets using org.apache.bookkeeper.clients.config (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

/** Creates a new builder using {@code value} as a template. */
public static StorageClientSettings.Builder from(StorageClientSettings value) {
 return StorageClientSettings.newBuilder().mergeFrom(value);
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

static Builder newBuilder() {
  // builder with default values
  return new Builder();
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

/**
 * If the value to be returned by {@link StorageClientSettings#statsLogger()} is present, replaces
 * it by applying {@code mapper} to it and using the result.
 *
 * <p>If the result is null, clears the value.
 *
 * @return this {@code Builder} object
 * @throws NullPointerException if {@code mapper} is null
 */
public StorageClientSettings.Builder mapStatsLogger(UnaryOperator<StatsLogger> mapper) {
 return statsLogger(statsLogger().map(mapper));
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

  @Override
  public StorageClientSettings build() {
    StorageClientSettings settings = super.build();
    // create a service uri to ensure the service uri is valid
    ServiceURI.create(serviceUri());
    return settings;
  }
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

/** Resets the state of this builder. */
public StorageClientSettings.Builder clear() {
 StorageClientSettings_Builder _defaults = StorageClientSettings.newBuilder();
 numWorkerThreads = _defaults.numWorkerThreads;
 serviceUri = _defaults.serviceUri;
 endpointResolver = _defaults.endpointResolver;
 usePlaintext = _defaults.usePlaintext;
 clientName = _defaults.clientName;
 statsLogger = _defaults.statsLogger;
 backoffPolicy = _defaults.backoffPolicy;
 enableServerSideRouting = _defaults.enableServerSideRouting;
 _unsetProperties.clear();
 _unsetProperties.addAll(_defaults._unsetProperties);
 return (StorageClientSettings.Builder) this;
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

/**
 * Sets the value to be returned by {@link StorageClientSettings#statsLogger()}.
 *
 * @return this {@code Builder} object
 */
public StorageClientSettings.Builder nullableStatsLogger(@Nullable StatsLogger statsLogger) {
 if (statsLogger != null) {
  return statsLogger(statsLogger);
 } else {
  return clearStatsLogger();
 }
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

/**
 * Sets the value to be returned by {@link StorageClientSettings#clientName()}.
 *
 * @return this {@code Builder} object
 */
public StorageClientSettings.Builder nullableClientName(@Nullable String clientName) {
 if (clientName != null) {
  return clientName(clientName);
 } else {
  return clearClientName();
 }
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

  @Override
  public StorageServerChannel apply(Endpoint endpoint) {
    StorageServerChannel channel = new StorageServerChannel(
      endpoint,
      Optional.empty(),
      settings.usePlaintext(),
      settings.endpointResolver());
    return interceptor
      .map(interceptor -> channel.intercept(interceptor))
      .orElse(channel);
  }
};
origin: org.apache.bookkeeper/stream-storage-java-client

protected SimpleClientBase(StorageClientSettings settings,
              Resource<OrderedScheduler> schedulerResource) {
  this(
    settings,
    schedulerResource,
    GrpcChannels.createChannelBuilder(settings.serviceUri(), settings).build(),
    true);
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

/**
 * If the value to be returned by {@link StorageClientSettings#clientName()} is present, replaces
 * it by applying {@code mapper} to it and using the result.
 *
 * <p>If the result is null, clears the value.
 *
 * @return this {@code Builder} object
 * @throws NullPointerException if {@code mapper} is null
 */
public StorageClientSettings.Builder mapClientName(UnaryOperator<String> mapper) {
 return clientName(clientName().map(mapper));
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

/**
 * Replaces the value to be returned by {@link StorageClientSettings#usePlaintext()} by applying
 * {@code mapper} to it and using the result.
 *
 * @return this {@code Builder} object
 * @throws NullPointerException if {@code mapper} is null or returns null
 */
public StorageClientSettings.Builder mapUsePlaintext(UnaryOperator<Boolean> mapper) {
 return usePlaintext(mapper.apply(usePlaintext()));
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

/**
 * Replaces the value to be returned by {@link StorageClientSettings#enableServerSideRouting()} by
 * applying {@code mapper} to it and using the result.
 *
 * @return this {@code Builder} object
 * @throws NullPointerException if {@code mapper} is null or returns null
 */
public StorageClientSettings.Builder mapEnableServerSideRouting(UnaryOperator<Boolean> mapper) {
 return enableServerSideRouting(mapper.apply(enableServerSideRouting()));
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

/**
 * Replaces the value to be returned by {@link StorageClientSettings#endpointResolver()} by
 * applying {@code mapper} to it and using the result.
 *
 * @return this {@code Builder} object
 * @throws NullPointerException if {@code mapper} is null or returns null
 */
public StorageClientSettings.Builder mapEndpointResolver(UnaryOperator<EndpointResolver> mapper) {
 return endpointResolver(mapper.apply(endpointResolver()));
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

/**
 * Replaces the value to be returned by {@link StorageClientSettings#numWorkerThreads()} by
 * applying {@code mapper} to it and using the result.
 *
 * @return this {@code Builder} object
 * @throws NullPointerException if {@code mapper} is null or returns null
 */
public StorageClientSettings.Builder mapNumWorkerThreads(UnaryOperator<Integer> mapper) {
 return numWorkerThreads(mapper.apply(numWorkerThreads()));
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

/**
 * Replaces the value to be returned by {@link StorageClientSettings#backoffPolicy()} by applying
 * {@code mapper} to it and using the result.
 *
 * @return this {@code Builder} object
 * @throws NullPointerException if {@code mapper} is null or returns null
 */
public StorageClientSettings.Builder mapBackoffPolicy(UnaryOperator<Backoff.Policy> mapper) {
 return backoffPolicy(mapper.apply(backoffPolicy()));
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

/**
 * Returns a newly-created partial {@link StorageClientSettings} for use in unit tests. State
 * checking will not be performed. Unset properties will throw an {@link
 * UnsupportedOperationException} when accessed via the partial object.
 *
 * <p>Partials should only ever be used in tests. They permit writing robust test cases that won't
 * fail if this type gains more application-level constraints (e.g. new required fields) in
 * future. If you require partially complete values in production code, consider using a Builder.
 */
@VisibleForTesting()
public StorageClientSettings buildPartial() {
 return new StorageClientSettings_Builder.Partial(this);
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

/**
 * Replaces the value to be returned by {@link StorageClientSettings#serviceUri()} by applying
 * {@code mapper} to it and using the result.
 *
 * @return this {@code Builder} object
 * @throws NullPointerException if {@code mapper} is null or returns null
 * @throws IllegalStateException if the field has not been set
 */
public StorageClientSettings.Builder mapServiceUri(UnaryOperator<String> mapper) {
 Preconditions.checkNotNull(mapper);
 return serviceUri(mapper.apply(serviceUri()));
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

/**
 * Returns a newly-created {@link StorageClientSettings} based on the contents of the {@code
 * Builder}.
 *
 * @throws IllegalStateException if any field has not been set
 */
public StorageClientSettings build() {
 Preconditions.checkState(_unsetProperties.isEmpty(), "Not set: %s", _unsetProperties);
 return new StorageClientSettings_Builder.Value(this);
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

/**
 * Sets the value to be returned by {@link StorageClientSettings#statsLogger()}.
 *
 * @return this {@code Builder} object
 */
public StorageClientSettings.Builder statsLogger(Optional<? extends StatsLogger> statsLogger) {
 if (statsLogger.isPresent()) {
  return statsLogger(statsLogger.get());
 } else {
  return clearStatsLogger();
 }
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

/**
 * Sets the value to be returned by {@link StorageClientSettings#clientName()}.
 *
 * @return this {@code Builder} object
 */
public StorageClientSettings.Builder clientName(Optional<? extends String> clientName) {
 if (clientName.isPresent()) {
  return clientName(clientName.get());
 } else {
  return clearClientName();
 }
}
org.apache.bookkeeper.clients.config

Most used classes

  • StorageClientSettings
    Settings to configure a stream storage client.
  • StorageClientSettings$Builder
    Builder of StorageClientSettings instances.
  • StorageClientSettings_Builder$Partial
  • StorageClientSettings_Builder$Value
  • StorageClientSettings_Builder
    Auto-generated superclass of StorageClientSettings.Builder, derived from the API of StorageClientSet
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now