Package com.slack.api.audit
Class AuditConfig
- java.lang.Object
-
- com.slack.api.audit.AuditConfig
-
public class AuditConfig extends Object
Configuration forAuditClient.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAuditConfig.AuditConfigBuilder
-
Field Summary
Fields Modifier and Type Field Description static AuditConfigDEFAULT_SINGLETONThe default configuration.static StringDEFAULT_SINGLETON_EXECUTOR_NAMEIf you don't have a special reason, we recommend going with the singleton executor to track all the traffic your app generated towards the Slack Platform in one place (= in one metrics datastore).
-
Constructor Summary
Constructors Constructor Description AuditConfig()AuditConfig(boolean statsEnabled, String executorName, int maxIdleMills, int defaultThreadPoolSize, Map<String,Integer> customThreadPoolSizes, ExecutorServiceProvider executorServiceProvider, MetricsDatastore metricsDatastore)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AuditConfig.AuditConfigBuilderbuilder()protected booleancanEqual(Object other)booleanequals(Object o)Map<String,Integer>getCustomThreadPoolSizes()Enterprise ID -> thread pool sizeintgetDefaultThreadPoolSize()The default thread pool size used for asynchronous API method calls.StringgetExecutorName()If you need to have multiple executors in the same Slack app, name this accordingly.ExecutorServiceProvidergetExecutorServiceProvider()intgetMaxIdleMills()The max period to keep asynchronous API method calls idle.MetricsDatastoregetMetricsDatastore()The metrics datastore to track the traffic associated to this executor name.inthashCode()booleanisStatsEnabled()voidsetCustomThreadPoolSizes(Map<String,Integer> customThreadPoolSizes)Enterprise ID -> thread pool sizevoidsetDefaultThreadPoolSize(int defaultThreadPoolSize)The default thread pool size used for asynchronous API method calls.voidsetExecutorName(String executorName)If you need to have multiple executors in the same Slack app, name this accordingly.voidsetExecutorServiceProvider(ExecutorServiceProvider executorServiceProvider)voidsetMaxIdleMills(int maxIdleMills)The max period to keep asynchronous API method calls idle.voidsetMetricsDatastore(MetricsDatastore metricsDatastore)The metrics datastore to track the traffic associated to this executor name.voidsetStatsEnabled(boolean statsEnabled)StringtoString()
-
-
-
Field Detail
-
DEFAULT_SINGLETON_EXECUTOR_NAME
public static final String DEFAULT_SINGLETON_EXECUTOR_NAME
If you don't have a special reason, we recommend going with the singleton executor to track all the traffic your app generated towards the Slack Platform in one place (= in one metrics datastore).- See Also:
- Constant Field Values
-
DEFAULT_SINGLETON
public static final AuditConfig DEFAULT_SINGLETON
The default configuration. It's not allowed to modify this runtime for any reasons.
-
-
Constructor Detail
-
AuditConfig
public AuditConfig()
-
AuditConfig
public AuditConfig(boolean statsEnabled, String executorName, int maxIdleMills, int defaultThreadPoolSize, Map<String,Integer> customThreadPoolSizes, ExecutorServiceProvider executorServiceProvider, MetricsDatastore metricsDatastore)
-
-
Method Detail
-
builder
public static AuditConfig.AuditConfigBuilder builder()
-
isStatsEnabled
public boolean isStatsEnabled()
-
getExecutorName
public String getExecutorName()
If you need to have multiple executors in the same Slack app, name this accordingly.
-
getMaxIdleMills
public int getMaxIdleMills()
The max period to keep asynchronous API method calls idle.
-
getDefaultThreadPoolSize
public int getDefaultThreadPoolSize()
The default thread pool size used for asynchronous API method calls.
-
getCustomThreadPoolSizes
public Map<String,Integer> getCustomThreadPoolSizes()
Enterprise ID -> thread pool size
-
getExecutorServiceProvider
public ExecutorServiceProvider getExecutorServiceProvider()
-
getMetricsDatastore
public MetricsDatastore getMetricsDatastore()
The metrics datastore to track the traffic associated to this executor name.
-
setStatsEnabled
public void setStatsEnabled(boolean statsEnabled)
-
setExecutorName
public void setExecutorName(String executorName)
If you need to have multiple executors in the same Slack app, name this accordingly.
-
setMaxIdleMills
public void setMaxIdleMills(int maxIdleMills)
The max period to keep asynchronous API method calls idle.
-
setDefaultThreadPoolSize
public void setDefaultThreadPoolSize(int defaultThreadPoolSize)
The default thread pool size used for asynchronous API method calls.
-
setCustomThreadPoolSizes
public void setCustomThreadPoolSizes(Map<String,Integer> customThreadPoolSizes)
Enterprise ID -> thread pool size
-
setExecutorServiceProvider
public void setExecutorServiceProvider(ExecutorServiceProvider executorServiceProvider)
-
setMetricsDatastore
public void setMetricsDatastore(MetricsDatastore metricsDatastore)
The metrics datastore to track the traffic associated to this executor name.
-
canEqual
protected boolean canEqual(Object other)
-
-