All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.clickzetta.platform.client.api.Options Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package com.clickzetta.platform.client.api;

import com.clickzetta.platform.client.CZSessionOptions;
import com.clickzetta.platform.client.RegisterStatus;
import com.clickzetta.platform.metrics.MetricConf;
import io.grpc.CallOptions;

import java.util.Properties;

public interface Options {

  Options DEFAULT = CZSessionOptions.DEFAULT_INSTANCE;

  FlushMode getFlushMode();

  Long getFlushInterval();

  int getMutationBufferSpace();

  Integer getMutationBufferMaxNum();

  Integer getMutationBufferLinesNum();

  ErrorTypeHandler getErrorTypeHandler();

  boolean getRequestFailedRetryEnable();

  RetryMode getRequestFailedRetryMode();

  int getRequestFailedRetryTimes();

  long getRequestFailedRetryInternalMs();

  boolean getRequestFailedRetryLogDebugEnable();

  RegisterStatus getRequestFailedRetryStatus();

  MetricConf getMetricDebugConf();

  CallOptions getRpcCallOptions();

  ProtocolType getProtocolType();

  Properties getProperties();

  static Builder builder() {
    return CZSessionOptions.builder();
  }

  Builder toBuilder();

  /**
   * Builder for the {@link Options}.
   */
  interface Builder {

    Builder withFlushMode(FlushMode flushMode);

    Builder withFlushInterval(long flushInterval);

    Builder withMutationBufferSpace(int mutationBufferSpace);

    Builder withMutationBufferMaxNum(int mutationBufferMaxNum);

    Builder withMutationBufferLinesNum(int mutationBufferLinesNum);

    Builder withErrorTypeHandler(ErrorTypeHandler handler);

    Builder withRequestFailedRetryEnable(boolean enabled);

    Builder withRequestFailedRetryMode(RetryMode retryMode);

    Builder withRequestFailedRetryTimes(int retryMaxTimes);

    Builder withRequestFailedRetryInternalMs(long retryInternalMs);

    Builder withRequestFailedRetryLogDebugEnable(boolean logDebugEnable);

    Builder withRequestFailedRetryStatus(RegisterStatus.RetryStatus... retryStatus);

    Builder withMetricDebugConf(MetricConf metricConf);

    Builder withRpcCallOptions(CallOptions callOptions);

    Builder withProtocolType(ProtocolType protocolType);

    Builder withProperties(Properties properties);

    Options build();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy