com.google.cloud.bigtable.grpc
Class BigtableSessionSharedThreadPools
- java.lang.Object
-
- com.google.cloud.bigtable.grpc.BigtableSessionSharedThreadPools
-
public class BigtableSessionSharedThreadPools extends Object
This class contains executors and other thread pool related resources that can be reused across a fewBigtableSession
s. All executors are automatically expand if there is higher use.- Version:
- $Id: $Id
- Author:
- sduskis
-
-
Field Summary
Fields Modifier and Type Field and Description protected ExecutorService
batchThreadPool
This is used to do i/o work.static int
RETRY_THREAD_COUNT
Number of threads to use to initiate retry callsprotected ScheduledExecutorService
retryExecutor
Used for a few cases that benefit from retries, such as puts, gets and scans.
-
Constructor Summary
Constructors Constructor and Description BigtableSessionSharedThreadPools()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description ExecutorService
getBatchThreadPool()
Getter for the fieldbatchThreadPool
.static BigtableSessionSharedThreadPools
getInstance()
Get the shared instance of ThreadPools.ScheduledExecutorService
getRetryExecutor()
Getter for the fieldretryExecutor
.
-
-
-
Field Detail
-
RETRY_THREAD_COUNT
public static final int RETRY_THREAD_COUNT
Number of threads to use to initiate retry calls- See Also:
- Constant Field Values
-
batchThreadPool
protected ExecutorService batchThreadPool
This is used to do i/o work.
-
retryExecutor
protected ScheduledExecutorService retryExecutor
Used for a few cases that benefit from retries, such as puts, gets and scans.
-
-
Method Detail
-
getInstance
public static BigtableSessionSharedThreadPools getInstance()
Get the shared instance of ThreadPools.- Returns:
- a
BigtableSessionSharedThreadPools
object.
-
getBatchThreadPool
public ExecutorService getBatchThreadPool()
Getter for the fieldbatchThreadPool
.- Returns:
- a
ExecutorService
object.
-
getRetryExecutor
public ScheduledExecutorService getRetryExecutor()
Getter for the fieldretryExecutor
.- Returns:
- a
ScheduledExecutorService
object.
-
-