Codota Logo
PooledClientProvider
Code IndexAdd Codota to your IDE (free)

How to use
PooledClientProvider
in
org.apache.tephra.distributed

Best Java code snippets using org.apache.tephra.distributed.PooledClientProvider (Showing top 10 results out of 315)

  • Common ways to obtain PooledClientProvider
private void myMethod () {
PooledClientProvider p =
  • Codota IconConfiguration conf;DiscoveryServiceClient discoveryServiceClient;new PooledClientProvider(conf, discoveryServiceClient)
  • Smart code suggestions by Codota
}
origin: apache/phoenix

PooledClientProvider pooledClientProvider = new PooledClientProvider(
    config, zkDiscoveryService);
TransactionServiceClient txClient = new TransactionServiceClient(config,pooledClientProvider);
origin: org.apache.tephra/tephra-core

 private TxClientPool getClientPool() {
  if (clients != null) {
   return clients;
  }

  synchronized (this) {
   if (clients == null) {
    try {
     initializePool();
    } catch (TException e) {
     throw new RuntimeException("Failed to initialize transaction client provider: " + this, e);
    }
   }
  }
  return clients;
 }
}
origin: org.apache.tephra/tephra-core

@Override
protected TransactionServiceThriftClient create() throws TException {
 return newClient();
}
origin: org.apache.tephra/tephra-core

@Override
public void returnClient(TransactionServiceThriftClient client) {
 getClientPool().release(client);
}
origin: org.apache.tephra/tephra-core

@Override
public CloseableThriftClient getCloseableClient() throws TException, TimeoutException, InterruptedException {
 TransactionServiceThriftClient client = getClientPool().obtain(obtainClientTimeoutMs, TimeUnit.MILLISECONDS);
 return new CloseableThriftClient(this, client);
}
origin: org.apache.tephra/tephra-core

 @Override
 public ThriftClientProvider get() {
  // configure the client provider
  String provider = cConf.get(TxConstants.Service.CFG_DATA_TX_CLIENT_PROVIDER,
                TxConstants.Service.DEFAULT_DATA_TX_CLIENT_PROVIDER);
  ThriftClientProvider clientProvider;
  if ("pool".equals(provider)) {
   clientProvider = new PooledClientProvider(cConf, discoveryServiceClient);
  } else if ("thread-local".equals(provider)) {
   clientProvider = new ThreadLocalClientProvider(cConf, discoveryServiceClient);
  } else {
   String message = "Unknown Transaction Service Client Provider '" + provider + "'.";
   throw new IllegalArgumentException(message);
  }
  return clientProvider;
 }
}
origin: cdapio/cdap

 @Override
 public ThriftClientProvider get() {
  // configure the client provider
  String provider = cConf.get(TxConstants.Service.CFG_DATA_TX_CLIENT_PROVIDER,
                TxConstants.Service.DEFAULT_DATA_TX_CLIENT_PROVIDER);
  ThriftClientProvider clientProvider;
  if ("pool".equals(provider)) {
   clientProvider = new PooledClientProvider(hConf, discoveryServiceClient);
  } else if ("thread-local".equals(provider)) {
   clientProvider = new ThreadLocalClientProvider(hConf, discoveryServiceClient);
  } else {
   String message = "Unknown Transaction Service Client Provider '" + provider + "'.";
   LOG.error(message);
   throw new IllegalArgumentException(message);
  }
  return clientProvider;
 }
}
origin: co.cask.cdap/cdap-data-fabric

 @Override
 public ThriftClientProvider get() {
  // configure the client provider
  String provider = cConf.get(TxConstants.Service.CFG_DATA_TX_CLIENT_PROVIDER,
                TxConstants.Service.DEFAULT_DATA_TX_CLIENT_PROVIDER);
  ThriftClientProvider clientProvider;
  if ("pool".equals(provider)) {
   clientProvider = new PooledClientProvider(hConf, discoveryServiceClient);
  } else if ("thread-local".equals(provider)) {
   clientProvider = new ThreadLocalClientProvider(hConf, discoveryServiceClient);
  } else {
   String message = "Unknown Transaction Service Client Provider '" + provider + "'.";
   LOG.error(message);
   throw new IllegalArgumentException(message);
  }
  return clientProvider;
 }
}
origin: com.aliyun.phoenix/ali-phoenix-core

PooledClientProvider pooledClientProvider = new PooledClientProvider(
    config, zkDiscoveryService);
TransactionServiceClient txClient = new TransactionServiceClient(config,pooledClientProvider);
origin: org.apache.phoenix/phoenix-core

PooledClientProvider pooledClientProvider = new PooledClientProvider(
    config, zkDiscoveryService);
TransactionServiceClient txClient = new TransactionServiceClient(config,pooledClientProvider);
org.apache.tephra.distributedPooledClientProvider

Javadoc

This is an tx client provider that uses a bounded size pool of connections.

Most used methods

  • <init>
  • getClientPool
  • initializePool
  • newClient

Popular in Java

  • Making http requests using okhttp
  • onCreateOptionsMenu (Activity)
  • getExternalFilesDir (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
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