Package net.dv8tion.jda.api.sharding
Class ThreadPoolProvider.LazySharedProvider<T extends ExecutorService>
java.lang.Object
net.dv8tion.jda.api.sharding.ThreadPoolProvider.LazySharedProvider<T>
- All Implemented Interfaces:
- ThreadPoolProvider<T>
- Enclosing interface:
- ThreadPoolProvider<T extends ExecutorService>
public static final class ThreadPoolProvider.LazySharedProvider<T extends ExecutorService>
extends Object
implements ThreadPoolProvider<T>
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.dv8tion.jda.api.sharding.ThreadPoolProviderThreadPoolProvider.LazySharedProvider<T extends ExecutorService>
- 
Method SummaryMethods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.dv8tion.jda.api.sharding.ThreadPoolProvidershouldShutdownAutomatically
- 
Method Details- 
initpublic void init(int shardTotal) Called with the shard total to initialize the shared pool.This also destroys the temporary pool created for fetching the recommended shard total. - Parameters:
- shardTotal- The shard total
 
- 
shutdownpublic void shutdown()Shuts down the shared pool and the temporary pool.
- 
provideProvides the initialized pool or the temporary pool if not initialized yet.- Specified by:
- providein interface- ThreadPoolProvider<T extends ExecutorService>
- Parameters:
- shardId- The current shard id
- Returns:
- The thread pool instance
 
 
-