@InterfaceAudience.Public @InterfaceStability.Unstable public class CloseableTaskPoolSubmitter extends Object implements org.apache.hadoop.util.functional.TaskPool.Submitter, Closeable
Constructor and Description |
---|
CloseableTaskPoolSubmitter(ExecutorService pool)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Shut down the pool.
|
ExecutorService |
getPool()
Get the pool.
|
Future<?> |
submit(Runnable task)
Submit work.
|
public CloseableTaskPoolSubmitter(ExecutorService pool)
pool
- non-null executor.public ExecutorService getPool()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public Future<?> submit(Runnable task)
org.apache.hadoop.util.functional.TaskPool.Submitter
submit
in interface org.apache.hadoop.util.functional.TaskPool.Submitter
task
- task to executeCopyright © 2024 Apache Software Foundation. All rights reserved.