public class TiSession extends Object implements AutoCloseable
TiSession is thread-safe but it's also recommended to have multiple session avoiding lock contention
Constructor and Description |
---|
TiSession(TiConfiguration conf) |
public TiSession(TiConfiguration conf)
public void warmUp()
public static TiSession create(TiConfiguration conf)
@Deprecated public static TiSession getInstance(TiConfiguration conf)
public RawKVClient createRawClient()
public SmartRawKVClient createSmartRawClient()
public KVClient createKVClient()
public TxnKVClient createTxnClient()
public RegionStoreClient.RegionStoreClientBuilder getRegionStoreClientBuilder()
public ImporterStoreClient.ImporterStoreClientBuilder getImporterRegionStoreClientBuilder()
public TiConfiguration getConf()
public TiTimestamp getTimestamp()
public Snapshot createSnapshot()
public Snapshot createSnapshot(TiTimestamp ts)
public PDClient getPDClient()
public Catalog getCatalog()
public RegionManager getRegionManager()
public ExecutorService getThreadPoolForIndexScan()
public ExecutorService getThreadPoolForTableScan()
public ExecutorService getThreadPoolForBatchPut()
public ExecutorService getThreadPoolForBatchGet()
public ExecutorService getThreadPoolForBatchDelete()
public ExecutorService getThreadPoolForBatchScan()
public ExecutorService getThreadPoolForDeleteRange()
public ChannelFactory getChannelFactory()
public SwitchTiKVModeClient getSwitchTiKVModeClient()
public void splitRegionAndScatter(List<byte[]> splitKeys, int splitRegionBackoffMS, int scatterRegionBackoffMS, int scatterWaitMS)
splitKeys
- splitRegionBackoffMS
- scatterRegionBackoffMS
- scatterWaitMS
- public void splitRegionAndScatter(List<byte[]> splitKeys)
splitKeys
- public void closeAwaitTermination(long timeoutMS) throws Exception
Exception
public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2024 PingCAP. All rights reserved.