197 строки
16 KiB
YAML
197 строки
16 KiB
YAML
### YamlMime:JavaType
|
|
uid: "com.azure.core.util.SharedExecutorService"
|
|
fullName: "com.azure.core.util.SharedExecutorService"
|
|
name: "SharedExecutorService"
|
|
nameWithType: "SharedExecutorService"
|
|
summary: "An <xref uid=\"java.util.concurrent.ExecutorService\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ExecutorService\"></xref> that is shared by multiple consumers."
|
|
inheritances:
|
|
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
|
|
inheritedClassMethods:
|
|
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
|
|
methodsRef:
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
|
|
syntax: "public final class **SharedExecutorService**</br> implements <a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html\">ExecutorService</a>"
|
|
methods:
|
|
- uid: "com.azure.core.util.SharedExecutorService.<T>invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>>)"
|
|
fullName: "com.azure.core.util.SharedExecutorService.invokeAll(Collection<? extends Callable<T>> tasks)"
|
|
name: "invokeAll(Collection<? extends Callable<T>> tasks)"
|
|
nameWithType: "SharedExecutorService.invokeAll(Collection<? extends Callable<T>> tasks)"
|
|
parameters:
|
|
- name: "tasks"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html\">Collection</a><<xref href=\"? extends java.util.concurrent.Callable?alt=? extends java.util.concurrent.Callable&text=Callable\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>>"
|
|
syntax: "public List<Future<T>> <T>invokeAll(Collection<? extends Callable<T>> tasks)"
|
|
exceptions:
|
|
- type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html\">InterruptedException</a>"
|
|
returns:
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html\">Future</a><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.core.util.SharedExecutorService.<T>invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>>,long,java.util.concurrent.TimeUnit)"
|
|
fullName: "com.azure.core.util.SharedExecutorService.invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)"
|
|
name: "invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)"
|
|
nameWithType: "SharedExecutorService.invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)"
|
|
parameters:
|
|
- name: "tasks"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html\">Collection</a><<xref href=\"? extends java.util.concurrent.Callable?alt=? extends java.util.concurrent.Callable&text=Callable\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- name: "timeout"
|
|
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
|
|
- name: "unit"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html\">TimeUnit</a>"
|
|
syntax: "public List<Future<T>> <T>invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)"
|
|
exceptions:
|
|
- type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html\">InterruptedException</a>"
|
|
returns:
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html\">Future</a><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.core.util.SharedExecutorService.<T>invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>>)"
|
|
fullName: "com.azure.core.util.SharedExecutorService.invokeAny(Collection<? extends Callable<T>> tasks)"
|
|
name: "invokeAny(Collection<? extends Callable<T>> tasks)"
|
|
nameWithType: "SharedExecutorService.invokeAny(Collection<? extends Callable<T>> tasks)"
|
|
parameters:
|
|
- name: "tasks"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html\">Collection</a><<xref href=\"? extends java.util.concurrent.Callable?alt=? extends java.util.concurrent.Callable&text=Callable\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>>"
|
|
syntax: "public T <T>invokeAny(Collection<? extends Callable<T>> tasks)"
|
|
exceptions:
|
|
- type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html\">InterruptedException</a>"
|
|
- type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutionException.html\">ExecutionException</a>"
|
|
returns:
|
|
type: "<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.core.util.SharedExecutorService.<T>invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>>,long,java.util.concurrent.TimeUnit)"
|
|
fullName: "com.azure.core.util.SharedExecutorService.invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)"
|
|
name: "invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)"
|
|
nameWithType: "SharedExecutorService.invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)"
|
|
parameters:
|
|
- name: "tasks"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html\">Collection</a><<xref href=\"? extends java.util.concurrent.Callable?alt=? extends java.util.concurrent.Callable&text=Callable\" data-throw-if-not-resolved=\"False\" /><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- name: "timeout"
|
|
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
|
|
- name: "unit"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html\">TimeUnit</a>"
|
|
syntax: "public T <T>invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)"
|
|
exceptions:
|
|
- type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html\">InterruptedException</a>"
|
|
- type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutionException.html\">ExecutionException</a>"
|
|
- type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeoutException.html\">TimeoutException</a>"
|
|
returns:
|
|
type: "<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.core.util.SharedExecutorService.<T>submit(java.lang.Runnable,T)"
|
|
fullName: "com.azure.core.util.SharedExecutorService.submit(Runnable task, T result)"
|
|
name: "submit(Runnable task, T result)"
|
|
nameWithType: "SharedExecutorService.submit(Runnable task, T result)"
|
|
parameters:
|
|
- name: "task"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html\">Runnable</a>"
|
|
- name: "result"
|
|
type: "<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Future<T> <T>submit(Runnable task, T result)"
|
|
returns:
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html\">Future</a><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.core.util.SharedExecutorService.<T>submit(java.util.concurrent.Callable<T>)"
|
|
fullName: "com.azure.core.util.SharedExecutorService.submit(Callable<T> task)"
|
|
name: "submit(Callable<T> task)"
|
|
nameWithType: "SharedExecutorService.submit(Callable<T> task)"
|
|
parameters:
|
|
- name: "task"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Callable.html\">Callable</a><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>"
|
|
syntax: "public Future<T> <T>submit(Callable<T> task)"
|
|
returns:
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html\">Future</a><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.core.util.SharedExecutorService.awaitTermination(long,java.util.concurrent.TimeUnit)"
|
|
fullName: "com.azure.core.util.SharedExecutorService.awaitTermination(long timeout, TimeUnit unit)"
|
|
name: "awaitTermination(long timeout, TimeUnit unit)"
|
|
nameWithType: "SharedExecutorService.awaitTermination(long timeout, TimeUnit unit)"
|
|
summary: "Shutdown isn't supported for this executor service as it is shared by multiple consumers."
|
|
parameters:
|
|
- description: "The amount of time to wait for the executor service to shutdown."
|
|
name: "timeout"
|
|
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "The unit of time for the timeout."
|
|
name: "unit"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html\">TimeUnit</a>"
|
|
syntax: "public boolean awaitTermination(long timeout, TimeUnit unit)"
|
|
desc: "Shutdown isn't supported for this executor service as it is shared by multiple consumers.\n\nCalling this method will result in an <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"UnsupportedOperationException\"></xref> being thrown."
|
|
returns:
|
|
description: "Nothing will be returned as an exception will always be thrown."
|
|
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.core.util.SharedExecutorService.execute(java.lang.Runnable)"
|
|
fullName: "com.azure.core.util.SharedExecutorService.execute(Runnable command)"
|
|
name: "execute(Runnable command)"
|
|
nameWithType: "SharedExecutorService.execute(Runnable command)"
|
|
parameters:
|
|
- name: "command"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html\">Runnable</a>"
|
|
syntax: "public void execute(Runnable command)"
|
|
- uid: "com.azure.core.util.SharedExecutorService.getInstance()"
|
|
fullName: "com.azure.core.util.SharedExecutorService.getInstance()"
|
|
name: "getInstance()"
|
|
nameWithType: "SharedExecutorService.getInstance()"
|
|
summary: "Gets the shared instance of the executor service."
|
|
modifiers:
|
|
- "static"
|
|
syntax: "public static SharedExecutorService getInstance()"
|
|
desc: "Gets the shared instance of the executor service."
|
|
returns:
|
|
description: "The shared instance of the executor service."
|
|
type: "<xref href=\"com.azure.core.util.SharedExecutorService?alt=com.azure.core.util.SharedExecutorService&text=SharedExecutorService\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.core.util.SharedExecutorService.isShutdown()"
|
|
fullName: "com.azure.core.util.SharedExecutorService.isShutdown()"
|
|
name: "isShutdown()"
|
|
nameWithType: "SharedExecutorService.isShutdown()"
|
|
summary: "Checks if the executor service is shutdown."
|
|
syntax: "public boolean isShutdown()"
|
|
desc: "Checks if the executor service is shutdown.\n\nWill always return false as the shared executor service cannot be shut down."
|
|
returns:
|
|
description: "False, as the shared executor service cannot be shut down."
|
|
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.core.util.SharedExecutorService.isTerminated()"
|
|
fullName: "com.azure.core.util.SharedExecutorService.isTerminated()"
|
|
name: "isTerminated()"
|
|
nameWithType: "SharedExecutorService.isTerminated()"
|
|
summary: "Checks if the executor service is terminated."
|
|
syntax: "public boolean isTerminated()"
|
|
desc: "Checks if the executor service is terminated.\n\nWill always return false as the shared executor service cannot be terminated."
|
|
returns:
|
|
description: "False, as the shared executor service cannot be terminated."
|
|
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.core.util.SharedExecutorService.shutdown()"
|
|
fullName: "com.azure.core.util.SharedExecutorService.shutdown()"
|
|
name: "shutdown()"
|
|
nameWithType: "SharedExecutorService.shutdown()"
|
|
summary: "Shutdown isn't supported for this executor service as it is shared by multiple consumers."
|
|
syntax: "public void shutdown()"
|
|
desc: "Shutdown isn't supported for this executor service as it is shared by multiple consumers.\n\nCalling this method will result in an <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"UnsupportedOperationException\"></xref> being thrown."
|
|
- uid: "com.azure.core.util.SharedExecutorService.shutdownNow()"
|
|
fullName: "com.azure.core.util.SharedExecutorService.shutdownNow()"
|
|
name: "shutdownNow()"
|
|
nameWithType: "SharedExecutorService.shutdownNow()"
|
|
summary: "Shutdown isn't supported for this executor service as it is shared by multiple consumers."
|
|
syntax: "public List<Runnable> shutdownNow()"
|
|
desc: "Shutdown isn't supported for this executor service as it is shared by multiple consumers.\n\nCalling this method will result in an <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"UnsupportedOperationException\"></xref> being thrown."
|
|
returns:
|
|
description: "Nothing will be returned as an exception will always be thrown."
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html\">Runnable</a>>"
|
|
- uid: "com.azure.core.util.SharedExecutorService.submit(java.lang.Runnable)"
|
|
fullName: "com.azure.core.util.SharedExecutorService.submit(Runnable task)"
|
|
name: "submit(Runnable task)"
|
|
nameWithType: "SharedExecutorService.submit(Runnable task)"
|
|
parameters:
|
|
- name: "task"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html\">Runnable</a>"
|
|
syntax: "public Future<?> submit(Runnable task)"
|
|
returns:
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html\">Future</a><?>"
|
|
type: "class"
|
|
desc: "An <xref uid=\"java.util.concurrent.ExecutorService\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ExecutorService\"></xref> that is shared by multiple consumers.\n\nThe shared executor service is created using the following configuration settings:\n\n * `azure.sdk.shared.threadpool.maxpoolsize` system property or `AZURE_SDK_SHARED_THREADPOOL_MAXPOOLSIZE` environment variable - The maximum pool size of the shared executor service. If not set, it defaults to 10 times the number of available processors.\n * `azure.sdk.shared.threadpool.keepalivemillis` system property or \\{code AZURE\\_SDK\\_SHARED\\_THREADPOOL\\_KEEPALIVEMILLIS\\} environment variable - The keep alive time in millis for threads in the shared executor service. If not set, it defaults to 60 seconds. Limited to integer size.\n * `azure.sdk.shared.threadpool.usevirtualthreads` system property or `AZURE_SDK_SHARED_THREADPOOL_USEVIRTUALTHREADS` environment variable - A boolean flag to indicate if the shared executor service should use virtual threads. If not set, it defaults to true. Ignored if virtual threads are not available in the runtime."
|
|
implements:
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html\">ExecutorService</a>"
|
|
metadata: {}
|
|
package: "com.azure.core.util"
|
|
artifact: com.azure:azure-core:1.52.0
|