Package system.threading
Class ThreadPool
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.threading.ThreadPool
-
- All Implemented Interfaces:
IJCOBridgeReflected
public class ThreadPool extends NetObject
The base .NET class managing System.Threading.ThreadPool, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Threading.ThreadPool
Powered by JCOBridge: more info at https://www.jcobridge.com
- Author:
- MASES s.r.l https://masesgroup.com
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringassemblyFullNameFully assembly qualified name: System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798estatic java.lang.StringassemblyShortNameAssembly name: System.Private.CoreLibstatic java.lang.StringclassNameQualified class name: System.Threading.ThreadPoolstatic org.mases.jcobridge.JCTypeclassTypeThe type managed from JCOBridge.
-
Constructor Summary
Constructors Constructor Description ThreadPool()ThreadPool(java.lang.Object instance)Internal constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanBindHandle(SafeHandle osHandle)static ThreadPoolcast(IJCOBridgeReflected from)Try to cast theIJCOBridgeReflectedinstance intoThreadPool, a cast assert is made to check if types are compatible.static voidGetAvailableThreads(JCORefOut<java.util.concurrent.atomic.AtomicInteger> workerThreads, JCORefOut<java.util.concurrent.atomic.AtomicInteger> completionPortThreads)static longgetCompletedWorkItemCount()java.lang.StringgetJCOAssemblyName()Returns the reflected Assembly namejava.lang.StringgetJCOClassName()Returns the reflected Class namejava.lang.ObjectgetJCOInstance()Returns the instantiated classjava.lang.StringgetJCOObjectName()Returns the reflected Class name used to build the objectorg.mases.jcobridge.JCTypegetJCOType()Returns the instantiated class Typestatic voidGetMaxThreads(JCORefOut<java.util.concurrent.atomic.AtomicInteger> workerThreads, JCORefOut<java.util.concurrent.atomic.AtomicInteger> completionPortThreads)static voidGetMinThreads(JCORefOut<java.util.concurrent.atomic.AtomicInteger> workerThreads, JCORefOut<java.util.concurrent.atomic.AtomicInteger> completionPortThreads)static longgetPendingWorkItemCount()static intgetThreadCount()static booleanQueueUserWorkItem(WaitCallback callBack)static booleanQueueUserWorkItem(WaitCallback callBack, NetObject state)static RegisteredWaitHandleRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, int millisecondsTimeOutInterval, boolean executeOnlyOnce)static RegisteredWaitHandleRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, long millisecondsTimeOutInterval, boolean executeOnlyOnce)static RegisteredWaitHandleRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, TimeSpan timeout, boolean executeOnlyOnce)static RegisteredWaitHandleRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, UInt32 millisecondsTimeOutInterval, boolean executeOnlyOnce)voidsetJCOInstance(org.mases.jcobridge.JCObject instance)static booleanSetMaxThreads(int workerThreads, int completionPortThreads)static booleanSetMinThreads(int workerThreads, int completionPortThreads)static booleanUnsafeQueueUserWorkItem(IThreadPoolWorkItem callBack, boolean preferLocal)static booleanUnsafeQueueUserWorkItem(WaitCallback callBack, NetObject state)static RegisteredWaitHandleUnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, int millisecondsTimeOutInterval, boolean executeOnlyOnce)static RegisteredWaitHandleUnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, long millisecondsTimeOutInterval, boolean executeOnlyOnce)static RegisteredWaitHandleUnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, TimeSpan timeout, boolean executeOnlyOnce)static RegisteredWaitHandleUnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, UInt32 millisecondsTimeOutInterval, boolean executeOnlyOnce)
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: System.Private.CoreLib- See Also:
- Constant Field Values
-
className
public static final java.lang.String className
Qualified class name: System.Threading.ThreadPool- See Also:
- Constant Field Values
-
classType
public static org.mases.jcobridge.JCType classType
The type managed from JCOBridge. SeeJCType
-
-
Method Detail
-
getJCOAssemblyName
public java.lang.String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Assembly name- Specified by:
getJCOAssemblyNamein interfaceIJCOBridgeReflected- Overrides:
getJCOAssemblyNamein classNetObject- Returns:
- A
Stringrepresenting the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name- Specified by:
getJCOClassNamein interfaceIJCOBridgeReflected- Overrides:
getJCOClassNamein classNetObject- Returns:
- A
Stringrepresenting the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name used to build the object- Specified by:
getJCOObjectNamein interfaceIJCOBridgeReflected- Overrides:
getJCOObjectNamein classNetObject- Returns:
- A
Stringrepresenting the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class- Specified by:
getJCOInstancein interfaceIJCOBridgeReflected- Overrides:
getJCOInstancein classNetObject- Returns:
- An
Objectrepresenting the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(org.mases.jcobridge.JCObject instance)
- Overrides:
setJCOInstancein classNetObject
-
getJCOType
public org.mases.jcobridge.JCType getJCOType()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class Type- Specified by:
getJCOTypein interfaceIJCOBridgeReflected- Overrides:
getJCOTypein classNetObject- Returns:
- A
JCTyperepresenting the CLR Type of the instantiated Class
-
cast
public static ThreadPool cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflectedinstance intoThreadPool, a cast assert is made to check if types are compatible.- Parameters:
from-IJCOBridgeReflectedinstance to be casted- Returns:
ThreadPoolinstance- Throws:
java.lang.Throwable- in case of error during cast operation
-
BindHandle
public static boolean BindHandle(SafeHandle osHandle) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, ObjectDisposedException, OutOfMemoryException, PlatformNotSupportedException, ApplicationException
-
QueueUserWorkItem
public static boolean QueueUserWorkItem(WaitCallback callBack, NetObject state) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ArgumentNullException, ObjectDisposedException, RankException, IndexOutOfRangeException, EventSourceException, LockRecursionException, SynchronizationLockException, OutOfMemoryException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionPlatformNotSupportedExceptionArrayTypeMismatchExceptionNotSupportedExceptionArgumentNullExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionEventSourceExceptionLockRecursionExceptionSynchronizationLockExceptionOutOfMemoryException
-
QueueUserWorkItem
public static boolean QueueUserWorkItem(WaitCallback callBack) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, EventSourceException, LockRecursionException, SynchronizationLockException, OutOfMemoryException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionArgumentNullExceptionEventSourceExceptionLockRecursionExceptionSynchronizationLockExceptionOutOfMemoryException
-
SetMaxThreads
public static boolean SetMaxThreads(int workerThreads, int completionPortThreads) throws java.lang.Throwable, PlatformNotSupportedException- Throws:
java.lang.ThrowablePlatformNotSupportedException
-
SetMinThreads
public static boolean SetMinThreads(int workerThreads, int completionPortThreads) throws java.lang.Throwable, PlatformNotSupportedException, ArgumentNullException, ArgumentException, ObjectDisposedException, OutOfMemoryException, ArgumentOutOfRangeException, AbandonedMutexException
-
UnsafeQueueUserWorkItem
public static boolean UnsafeQueueUserWorkItem(IThreadPoolWorkItem callBack, boolean preferLocal) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ArgumentNullException, ObjectDisposedException, RankException, IndexOutOfRangeException, EventSourceException, LockRecursionException, SynchronizationLockException, OutOfMemoryException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionPlatformNotSupportedExceptionArrayTypeMismatchExceptionNotSupportedExceptionArgumentNullExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionEventSourceExceptionLockRecursionExceptionSynchronizationLockExceptionOutOfMemoryException
-
UnsafeQueueUserWorkItem
public static boolean UnsafeQueueUserWorkItem(WaitCallback callBack, NetObject state) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ArgumentNullException, ObjectDisposedException, RankException, IndexOutOfRangeException, EventSourceException, LockRecursionException, SynchronizationLockException, OutOfMemoryException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionPlatformNotSupportedExceptionArrayTypeMismatchExceptionNotSupportedExceptionArgumentNullExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionEventSourceExceptionLockRecursionExceptionSynchronizationLockExceptionOutOfMemoryException
-
RegisterWaitForSingleObject
public static RegisteredWaitHandle RegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, int millisecondsTimeOutInterval, boolean executeOnlyOnce) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, FormatException, OutOfMemoryException, WaitHandleCannotBeOpenedException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionPlatformNotSupportedExceptionArrayTypeMismatchExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionFormatExceptionOutOfMemoryExceptionWaitHandleCannotBeOpenedException
-
RegisterWaitForSingleObject
public static RegisteredWaitHandle RegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, long millisecondsTimeOutInterval, boolean executeOnlyOnce) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, FormatException, OutOfMemoryException, WaitHandleCannotBeOpenedException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionPlatformNotSupportedExceptionArrayTypeMismatchExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionFormatExceptionOutOfMemoryExceptionWaitHandleCannotBeOpenedException
-
RegisterWaitForSingleObject
public static RegisteredWaitHandle RegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, TimeSpan timeout, boolean executeOnlyOnce) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, FormatException, OutOfMemoryException, WaitHandleCannotBeOpenedException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionPlatformNotSupportedExceptionArrayTypeMismatchExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionFormatExceptionOutOfMemoryExceptionWaitHandleCannotBeOpenedException
-
RegisterWaitForSingleObject
public static RegisteredWaitHandle RegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, UInt32 millisecondsTimeOutInterval, boolean executeOnlyOnce) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, IndexOutOfRangeException, RankException, CultureNotFoundException, ObjectDisposedException, OutOfMemoryException, WaitHandleCannotBeOpenedException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionPlatformNotSupportedExceptionArrayTypeMismatchExceptionNotSupportedExceptionIndexOutOfRangeExceptionRankExceptionCultureNotFoundExceptionObjectDisposedExceptionOutOfMemoryExceptionWaitHandleCannotBeOpenedException
-
UnsafeRegisterWaitForSingleObject
public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, int millisecondsTimeOutInterval, boolean executeOnlyOnce) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, FormatException, OutOfMemoryException, WaitHandleCannotBeOpenedException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionPlatformNotSupportedExceptionArrayTypeMismatchExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionFormatExceptionOutOfMemoryExceptionWaitHandleCannotBeOpenedException
-
UnsafeRegisterWaitForSingleObject
public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, long millisecondsTimeOutInterval, boolean executeOnlyOnce) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, FormatException, OutOfMemoryException, WaitHandleCannotBeOpenedException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionPlatformNotSupportedExceptionArrayTypeMismatchExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionFormatExceptionOutOfMemoryExceptionWaitHandleCannotBeOpenedException
-
UnsafeRegisterWaitForSingleObject
public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, TimeSpan timeout, boolean executeOnlyOnce) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, FormatException, OutOfMemoryException, WaitHandleCannotBeOpenedException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionPlatformNotSupportedExceptionArrayTypeMismatchExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionFormatExceptionOutOfMemoryExceptionWaitHandleCannotBeOpenedException
-
UnsafeRegisterWaitForSingleObject
public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, UInt32 millisecondsTimeOutInterval, boolean executeOnlyOnce) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, IndexOutOfRangeException, RankException, CultureNotFoundException, ObjectDisposedException, OutOfMemoryException, WaitHandleCannotBeOpenedException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionPlatformNotSupportedExceptionArrayTypeMismatchExceptionNotSupportedExceptionIndexOutOfRangeExceptionRankExceptionCultureNotFoundExceptionObjectDisposedExceptionOutOfMemoryExceptionWaitHandleCannotBeOpenedException
-
GetAvailableThreads
public static void GetAvailableThreads(JCORefOut<java.util.concurrent.atomic.AtomicInteger> workerThreads, JCORefOut<java.util.concurrent.atomic.AtomicInteger> completionPortThreads) throws java.lang.Throwable, NotSupportedException, ArgumentException, PlatformNotSupportedException
- Throws:
java.lang.ThrowableNotSupportedExceptionArgumentExceptionPlatformNotSupportedException
-
GetMaxThreads
public static void GetMaxThreads(JCORefOut<java.util.concurrent.atomic.AtomicInteger> workerThreads, JCORefOut<java.util.concurrent.atomic.AtomicInteger> completionPortThreads) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException
- Throws:
java.lang.ThrowableArgumentExceptionNotSupportedExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedException
-
GetMinThreads
public static void GetMinThreads(JCORefOut<java.util.concurrent.atomic.AtomicInteger> workerThreads, JCORefOut<java.util.concurrent.atomic.AtomicInteger> completionPortThreads) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException
- Throws:
java.lang.ThrowableArgumentExceptionNotSupportedExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedException
-
getThreadCount
public static int getThreadCount() throws java.lang.Throwable, NotSupportedException, ArgumentException, PlatformNotSupportedException- Throws:
java.lang.ThrowableNotSupportedExceptionArgumentExceptionPlatformNotSupportedException
-
getCompletedWorkItemCount
public static long getCompletedWorkItemCount() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
getPendingWorkItemCount
public static long getPendingWorkItemCount() throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, LockRecursionException, SynchronizationLockException, PlatformNotSupportedException
-
-